Commit 62b0fc00 by Your Name

更新部门下不能新增岗位员工

parent 977d9af2
......@@ -1000,7 +1000,7 @@ public class SpmkController {
*/
@PostMapping(value = "/approved_addDetail")
@ApiOperation(value = "A审核详情数据转换", httpMethod = "POST", notes = "")
public void addApproveDetail(){
spmkService.addApproveDetail();
public void addApproveDetail(String status){
spmkService.addApproveDetail(status);
}
}
......@@ -5,7 +5,6 @@ import java.util.List;
import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
import com.fasterxml.jackson.core.JsonProcessingException;
public interface SpmkService {
......@@ -15,7 +14,7 @@ public interface SpmkService {
List<SpmkApprovalG> selectListAg(UserBean userBean);
void addApproveDetail();
void addApproveDetail(String status);
}
......@@ -11,7 +11,6 @@ import cn.timer.api.dao.spmk.*;
import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.Router;
import com.alibaba.fastjson.JSON;
import javafx.scene.text.Text;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -153,56 +152,53 @@ public class SpmkServiceImpl implements SpmkService{
/**
* 审核汇总详情数据转换
* @param status
*/
@Override
public void addApproveDetail() {
QueryWrapper queryWrapper = new QueryWrapper<SpmkApproveDetail>().select("id,approve_summary_id","name","department_name","request_data","froms","router","flow_children");
public void addApproveDetail(String status) {
if ("1".equals(status)) {
QueryWrapper queryWrapper = new QueryWrapper<SpmkApproveDetail>().select("id,approve_summary_id", "name", "department_name", "request_data", "froms", "router", "flow_children");
List<SpmkApproveDetail> spmkApproveDetails = spmkApproveDetailMapper.selectList(queryWrapper);
spmkApproveDetails.forEach (t -> {
spmkApproveDetails.forEach(t -> {
SpmkApproveDetailSummary spmkApproveDetailSummary = new SpmkApproveDetailSummary();
spmkApproveDetailSummary.setApproveSummaryId(t.getApproveSummaryId());
spmkApproveDetailSummary.setDepartmentName(t.getDepartmentName());
spmkApproveDetailSummary.setName(t.getName());
SpmkApproveDetailSummary sca = SpmkApproveDetailSummary.builder().build();
try {
Object deserialize2 = ObjectUtil.deserialize(t.getFlowChildren());
String flowChidren = JSON.toJSONString(deserialize2);
spmkApproveDetailSummary.setFlowChildren(flowChidren);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}finally {
} finally {
try {
Object deserialize1 = ObjectUtil.deserialize(t.getFroms());
String froms = JSON.toJSONString(deserialize1);
spmkApproveDetailSummary.setFroms(froms);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}finally {
} finally {
try {
Object deserialize = ObjectUtil.deserialize(t.getRequestData());
String s = JSON.toJSONString(deserialize);
spmkApproveDetailSummary.setRequestData(s);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}finally {
} finally {
try {
Router router = ObjectUtil.deserialize(t.getRouter());
String s = JSON.toJSONString(router);
spmkApproveDetailSummary.setRouter(s);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
finally {
} finally {
spmkApproveDetailSummary.insert();
BeanUtil.copyProperties(spmkApproveDetailSummary, sca, "id");
sca.insert();
}
}
}
}
});
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment