From 2f85ff4cdd33b6d3fe11cade274ec7125a705864 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Fri, 26 Jul 2024 10:46:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(87474):=20=20=E6=A0=87=E5=87=86=E8=A7=A3?= =?UTF-8?q?=E8=AF=BB=E6=B5=81=E7=A8=8B=20--=E6=9C=80=E5=90=8E=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E8=8A=82=E7=82=B9=E7=BC=BA=E5=B0=91=E5=8A=A0=E7=AD=BE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/StandardInterpretCommon.java | 8 ++++ .../service/impl/StandardInterpretFlow.java | 39 +++++++++++++++---- .../StandardInterpretFlowServiceImpl.java | 16 ++++---- .../activiti/service/ProcessAllService.java | 3 ++ .../activiti/vo/DelegateTaskParam.java | 2 + 5 files changed, 53 insertions(+), 15 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/common/StandardInterpretCommon.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/common/StandardInterpretCommon.java index 1acea7b3..df3408e1 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/common/StandardInterpretCommon.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/common/StandardInterpretCommon.java @@ -106,10 +106,18 @@ public class StandardInterpretCommon { /** * 部门科室经理 */ + public static final String DEPARTMENT_MANAGER_LIST = "departmentManagerList"; + /** + * 部门科室经理(每人) + */ public static final String DEPARTMENT_MANAGER = "departmentManager"; /** * 技术官 */ + public static final String TECHNICAL_OFFICER_LIST = "technicalOfficerList"; + /** + * 技术官(每人) + */ public static final String TECHNICAL_OFFICER = "technicalOfficer"; /** diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlow.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlow.java index da962e7d..1f22afa4 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlow.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlow.java @@ -52,7 +52,8 @@ public class StandardInterpretFlow implements WorkCenterService { * @param userId */ @Override - public void handleTransfer(ProcessAll processAll, ProcessApprovalRecord processApprovalRecord, String toUserId, String userId) { + public void handleTransfer(ProcessAll processAll, ProcessApprovalRecord processApprovalRecord, + String toUserId, String userId) { ProcessAllService processAllService = SpringContextUtil.getBean(ProcessAllService.class); processAllService.specialTransfer(processAll, processApprovalRecord, toUserId, userId); // 解读人填写信息(分发) @@ -76,23 +77,47 @@ public class StandardInterpretFlow implements WorkCenterService { } } + /** + * 加签 + * @param param + */ @Override public void flowCountersign(DelegateTaskParam param) { String projectId = param.getProjectId(); String userId = param.getUserId(); + String nodeId = param.getNodeId(); + ProcessStandardInterpretService processStandardInterpretService = SpringContextUtil.getBean(ProcessStandardInterpretService.class); ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne( new LambdaQueryWrapper() .eq(ProcessStandardInterpret::getProjectId, projectId)); + if (!Objects.isNull(processStandardInterpret)){ - // 处理业务表 - String newCountersignPersonIds = processStandardInterpret.getCountersignPersonIds() + "," + userId; + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(ProcessStandardInterpret::getId, processStandardInterpret.getId()); + + switch (nodeId){ + case StandardInterpretCommon.JOINTLY_SIGN_1: + case StandardInterpretCommon.JOINTLY_SIGN_2: + String newCountersignPersonIds = processStandardInterpret.getCountersignPersonIds() + "," + userId; + updateWrapper.set(ProcessStandardInterpret::getCountersignPersonIds, newCountersignPersonIds); + break; + case StandardInterpretCommon.DEPARTMENT_MANAGER_APPROVE_1: + case StandardInterpretCommon.DEPARTMENT_MANAGER_APPROVE_2: + String newUploader = processStandardInterpret.getUploader() + "," + userId; + updateWrapper.set(ProcessStandardInterpret::getUploader, newUploader); + break; + case StandardInterpretCommon.TECHNICAL_OFFICER_APPROVAL_1: + case StandardInterpretCommon.TECHNICAL_OFFICER_APPROVAL_2: + String newApprovePersonId = processStandardInterpret.getApprovePersonId() + "," + userId; + updateWrapper.set(ProcessStandardInterpret::getApprovePersonId, newApprovePersonId); + break; + default: + return; + } // 更新会签人员信息 - processStandardInterpretService.update( - new LambdaUpdateWrapper() - .eq(ProcessStandardInterpret::getId, processStandardInterpret.getId()) - .set(ProcessStandardInterpret::getCountersignPersonIds, newCountersignPersonIds)); + processStandardInterpretService.update(updateWrapper); } } } diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java index 2ba3bda4..84c2a3a4 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java @@ -1474,10 +1474,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe processStandardInterpretService.updateById(processStandardInterpret); map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST, Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(","))); - map.put(StandardInterpretCommon.DEPARTMENT_MANAGER, - processStandardInterpret.getUploader()); - map.put(StandardInterpretCommon.TECHNICAL_OFFICER, - processStandardInterpret.getApprovePersonId()); + map.put(StandardInterpretCommon.DEPARTMENT_MANAGER_LIST, + Arrays.asList(processStandardInterpret.getUploader().split(","))); + map.put(StandardInterpretCommon.TECHNICAL_OFFICER_LIST, + Arrays.asList(processStandardInterpret.getApprovePersonId().split(","))); // 删除旧数据 processStandardInterpretClauseService.removeByIds(processAllDelIds); @@ -1559,10 +1559,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe processStandardInterpretService.updateById(processStandardInterpret); map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST, Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(","))); - map.put(StandardInterpretCommon.DEPARTMENT_MANAGER, - processStandardInterpret.getUploader()); - map.put(StandardInterpretCommon.TECHNICAL_OFFICER, - processStandardInterpret.getApprovePersonId()); + map.put(StandardInterpretCommon.DEPARTMENT_MANAGER_LIST, + Arrays.asList(processStandardInterpret.getUploader().split(","))); + map.put(StandardInterpretCommon.TECHNICAL_OFFICER_LIST, + Arrays.asList(processStandardInterpret.getApprovePersonId().split(","))); processStandardInterpretClauseSublistService .saveOrUpdateBatch(processStandardInterpretClauseSublistList); break; diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/service/ProcessAllService.java b/laws-modules/src/main/java/com/jero/modules/activiti/service/ProcessAllService.java index f6771f41..903a69f5 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/service/ProcessAllService.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/service/ProcessAllService.java @@ -331,6 +331,8 @@ public class ProcessAllService extends ServiceImpl processNodeLinkService.save(processNodeLink); if (StandardInterpretCommon.JOINTLY_SIGN_LIST.equals(processNode.getVariableName()) || + StandardInterpretCommon.DEPARTMENT_MANAGER_LIST.equals(processNode.getVariableName()) || + StandardInterpretCommon.TECHNICAL_OFFICER_LIST.equals(processNode.getVariableName()) || ProcessStandardComplianceCheckConstants.COUNTERSIGN_USER_LIST.equals(processNode.getVariableName()) || ProcessStandardComplianceCheckConstants.MANAGER_LIST.equals(processNode.getVariableName()) || ProcessStandardComplianceCheckConstants.SENIOR_MANAGER_LIST.equals(processNode.getVariableName())){ @@ -346,6 +348,7 @@ public class ProcessAllService extends ServiceImpl Object o = Class.forName(ProcessTypeEnum.getClassByValue(prcType)).newInstance(); if (o instanceof WorkCenterService){ classByValue = (WorkCenterService) o; + param.setNodeId(xmlNodeId); classByValue.flowCountersign(param); } }catch (Exception e) { diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/vo/DelegateTaskParam.java b/laws-modules/src/main/java/com/jero/modules/activiti/vo/DelegateTaskParam.java index 557c240a..78d14f24 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/vo/DelegateTaskParam.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/vo/DelegateTaskParam.java @@ -17,4 +17,6 @@ public class DelegateTaskParam { String projectId; @ApiModelProperty(value = "流程类型") Integer prcType; + @ApiModelProperty(value = "节点id") + private String nodeId; }