fix(企标稽查整改): 81685

This commit is contained in:
yjz
2024-02-05 11:39:47 +08:00
parent 1ea337c5d4
commit c979352963
@@ -88,6 +88,8 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
@Resource
private TaskService taskService;
private static final String RESPONSIBLE = "responsible";
@Override
public void flowStart(EsInspectRectifyFlowVO esInspectReportFlowVO) {
// 流程信息
@@ -170,7 +172,7 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
.singleResult();
// 更新流程审批信息
processApprovalRecord.setUserId((String) map.get("responsible"));
processApprovalRecord.setUserId((String) map.get(RESPONSIBLE));
processApprovalRecord.setProjectId(processAll.getProjectId());
processApprovalRecord.setFinishFlag(FinishFlagEnum.INCOMPLETE.getValue());
processApprovalRecordService.update(processApprovalRecord,
@@ -217,7 +219,7 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
// 保存infoJsonStr信息
Map<String, Object> map = esInspectReportFlowVO.getMap();
map.put("responsible_dictText", sysUserService.dictByIdsOrUserNames(String.valueOf(map.get("responsible")), ""));
map.put("responsible_dictText", sysUserService.dictByIdsOrUserNames(String.valueOf(map.get(RESPONSIBLE)), ""));
ProcessEsInspectRectify processEsInspectRectify = esInspectReportFlowVO.getProcessEsInspectRectify();
ProcessEsInspectRectifyVO processEsInspectRectifyVO = processEsInspectRectifyService.queryByProjectId(processEsInspectRectify.getProjectId());
JSONObject jsonObject = new JSONObject();
@@ -349,6 +351,8 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
Task task = taskService.createTaskQuery().taskId(processAll.getTaskId()).singleResult();
if (task!= null) {
// 如果是第一节点,说明是强制撤回后的,需要更新报错第一个节点人填写的业务信息
updateInfoJsonStr(esInspectReportFlowVO);
// 完成任务
taskService.complete(task.getId(), map);
// 再次更新流程审批信息
@@ -405,7 +409,7 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
// 处理人员信息
Map<String, Object> newMap = new HashMap<>();
newMap.put("responsible", enterpriseStandardInspectRectifyPlan.getResponseUser());
newMap.put(RESPONSIBLE, enterpriseStandardInspectRectifyPlan.getResponseUser());
newMap.put("leader", "请选择");
newMap.put("responsibleApproval", "请选择");
newEsInspectReportFlowVO.setMap(newMap);
@@ -428,6 +432,18 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
}
}
private void updateInfoJsonStr(EsInspectRectifyFlowVO esInspectReportFlowVO) {
ProcessApprovalRecord processApprovalRecord = esInspectReportFlowVO.getProcessApprovalRecord();
if (StringUtils.isNotBlank(processApprovalRecord.getNodeId())
&& EsInspectRectifyCommon.PROCESS_NODE_1.equals(processApprovalRecord.getNodeId())){
processDraftService.update(
new LambdaUpdateWrapper<ProcessDraft>()
.eq(ProcessDraft::getProjectId, esInspectReportFlowVO.getProcessAll().getProjectId())
.eq(ProcessDraft::getSaveSource, "3")
.set(ProcessDraft::getInfoJsonStr, esInspectReportFlowVO.getInfoJsonStr()));
}
}
@Override
public void flowTransfer(String taskId, String userId) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();