From c979352963887ea72842ebc009bcf6e9e4462c69 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Mon, 5 Feb 2024 11:39:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BC=81=E6=A0=87=E7=A8=BD=E6=9F=A5?= =?UTF-8?q?=E6=95=B4=E6=94=B9):=2081685?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EsInspectRectifyFlowServiceImpl.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/esinspectrectify/service/impl/EsInspectRectifyFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/esinspectrectify/service/impl/EsInspectRectifyFlowServiceImpl.java index 73247572..12f7482d 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/esinspectrectify/service/impl/EsInspectRectifyFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/esinspectrectify/service/impl/EsInspectRectifyFlowServiceImpl.java @@ -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 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 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() + .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();