From 7794f0f1dd03f24713a11a58761253f092de9939 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Mon, 29 Jan 2024 13:58:41 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B3=95=E8=A7=84=E5=90=88=E8=A7=84?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/流程图导入后初始sql.sql | 2 +- .../common/ProcessProjectStandardCommon.java | 12 +- .../ProcessProjectStandardService.java | 37 +- .../main/resources/bpmn/法规合规评估流程.bpmn | 1265 ++++++++++++----- .../bpmn/法规合规评估流程camund.bpmn | 1265 ++++++++++++----- 5 files changed, 1928 insertions(+), 653 deletions(-) diff --git a/db/流程图导入后初始sql.sql b/db/流程图导入后初始sql.sql index 08eeabc8..c0620712 100644 --- a/db/流程图导入后初始sql.sql +++ b/db/流程图导入后初始sql.sql @@ -18,7 +18,7 @@ ORDER BY process_definition_id, sort; update process_node set is_view = 0 where process_definition_id like 'standard-assessment:%' - and substr(xml_node_id, -2) in ('_2', '_3', '_4', '_5'); + and substr(xml_node_id, -2) in ('_2', '_3', '_4', '_5', '_6', '_7', '_8'); # 更新是否可跳过 update process_node set is_skip = 1 diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/common/ProcessProjectStandardCommon.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/common/ProcessProjectStandardCommon.java index f9a94bac..ac3e6d96 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/common/ProcessProjectStandardCommon.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/common/ProcessProjectStandardCommon.java @@ -9,18 +9,23 @@ public class ProcessProjectStandardCommon { public static final String STANDARDS_ENGINEER = "standardsEngineer"; public static final String MANAGER_LEADER_LIST = "managerLeaderList"; + public static final String MANAGER_LEADER_LIST_SIZE = "managerLeaderListSize"; public static final String MODULE_OWNER_LIST = "moduleOwnerList"; public static final String MODULE_OWNER_LIST_SIZE = "moduleOwnerListSize"; public static final String DESIGN_ENGINEER_LIST = "designEngineerList"; public static final String DESIGN_ENGINEER_LIST_SIZE = "designEngineerListSize"; - public static final String NOT_INVOLVED_MODULE_OWNER_LIST_SIZE = "notInvolvedModuleOwnerListSize"; + public static final String NOT_INVOLVED_MODULE_OWNER_LIST = "notInvolvedModuleOwnerList"; + public static final String NOT_INVOLVED_MODULE_OWNER_LIST_SIZE = "notInvolvedModuleOwnerListSize"; + + public static final String NOT_INVOLVED_MANAGER_LEADER_LIST = "notInvolvedManagerLeaderList"; + public static final String NOT_INVOLVED_MANAGER_LEADER_LIST_SIZE = "notInvolvedManagerLeaderListSize"; //法规工程师发起 public static final String FGGCSFQ = "fggcsfq"; //部所主管级领导下发 - public static final String BSZGJLDXF = "bszgjldxf"; + public static final String BSZGJLDXF_ = "bszgjldxf_"; //模块责任人分发 public static final String MKZRRFF_ = "mkzrrff_"; public static final String MKZRRFF_1 = "mkzrrff_1"; @@ -28,6 +33,9 @@ public class ProcessProjectStandardCommon { public static final String MKZRRFF_3 = "mkzrrff_3"; public static final String MKZRRFF_4 = "mkzrrff_4"; public static final String MKZRRFF_5 = "mkzrrff_5"; + public static final String MKZRRFF_6 = "mkzrrff_6"; + public static final String MKZRRFF_7 = "mkzrrff_7"; + public static final String MKZRRFF_8 = "mkzrrff_8"; //设计工程师评估 public static final String SJGCSPG_ = "sjgcspg_"; public static final String SJGCSPG_1 = "sjgcspg_1"; diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/service/ProcessProjectStandardService.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/service/ProcessProjectStandardService.java index 69f2ef33..ea4b077b 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/service/ProcessProjectStandardService.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/projectstandard/service/ProcessProjectStandardService.java @@ -3,7 +3,6 @@ package com.jero.modules.activiti.process.projectstandard.service; import cn.hutool.core.collection.CollStreamUtil; import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -64,7 +63,6 @@ import com.jero.modules.activiti.process.projectstandard.mapper.ProcessProjectSt import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; import java.util.*; import java.util.stream.Collectors; @@ -148,16 +146,18 @@ public class ProcessProjectStandardService extends ServiceImpl termUserList = new ArrayList<>(); switch (taskDefinitionKey) { //部所主管级领导下发 - case ProcessProjectStandardCommon.BSZGJLDXF: + case ProcessProjectStandardCommon.BSZGJLDXF_: processProjectStandardTermList = termMapper.getByResponsibleUnitLeader(processId, originUserId, false); break; //模块责任人分发 case ProcessProjectStandardCommon.MKZRRFF_1: + case ProcessProjectStandardCommon.MKZRRFF_6: processProjectStandardTermList = termMapper.getByModuleOwner(processId, originUserId, executionParentId, false); break; //驳回后模块责任人分发 case ProcessProjectStandardCommon.MKZRRFF_4: case ProcessProjectStandardCommon.MKZRRFF_5: + case ProcessProjectStandardCommon.MKZRRFF_8: processProjectStandardTermList = termMapper.getByRejectModuleOwner(processId, originUserId, executionParentId); break; //设计工程师评估 @@ -381,16 +381,18 @@ public class ProcessProjectStandardService extends ServiceImpl processInfoVO, ProcessDTO processDTO, boolean pass) { Task task = processDTO.getTask(); @@ -519,6 +522,7 @@ public class ProcessProjectStandardService extends ServiceImpl processInfoVO, ProcessDTO processDTO, boolean pass) { String businessId = processInfoVO.getBusinessId(); @@ -618,26 +622,37 @@ public class ProcessProjectStandardService extends ServiceImpl variables = new HashMap<>(); variables.put(ProcessProjectStandardCommon.PASS, pass); - List designEngineerList; if (pass){ - designEngineerList = updateTermList.stream() + List designEngineerList = updateTermList.stream() .map(ProcessProjectStandardTerm::getDesignEngineer) .filter(Objects::nonNull) .distinct() .collect(Collectors.toList()); + variables.put(ProcessProjectStandardCommon.DESIGN_ENGINEER_LIST, designEngineerList); + variables.put(ProcessProjectStandardCommon.DESIGN_ENGINEER_LIST_SIZE, designEngineerList.size()); }else { LambdaQueryWrapper wrapper1 = new LambdaQueryWrapper<>(); wrapper1.eq(ProcessProjectStandardTermUser::getProcessId, businessId); wrapper1.isNotNull(ProcessProjectStandardTermUser::getResponsibleUnitLeader); List termUserList = termUserService.list(wrapper1); - designEngineerList = termUserList.stream() + //选择不涉及的模块责任人 + List notInvolvedManagerLeaderList = termUserList.stream() + .filter(i -> StringUtils.isBlank(i.getModuleOwner())) .map(ProcessProjectStandardTermUser::getResponsibleUnitLeader) - .filter(Objects::nonNull) .distinct() .collect(Collectors.toList()); + //选择设计工程师的模块责任人 + List managerLeaderList = termUserList.stream() + .filter(i -> StringUtils.isNotBlank(i.getModuleOwner())) + .map(ProcessProjectStandardTermUser::getResponsibleUnitLeader) + .distinct() + .collect(Collectors.toList()); + variables.put(ProcessProjectStandardCommon.NOT_INVOLVED_MANAGER_LEADER_LIST, notInvolvedManagerLeaderList); + variables.put(ProcessProjectStandardCommon.NOT_INVOLVED_MANAGER_LEADER_LIST_SIZE, notInvolvedManagerLeaderList.size()); + variables.put(ProcessProjectStandardCommon.MANAGER_LEADER_LIST, managerLeaderList); + variables.put(ProcessProjectStandardCommon.MANAGER_LEADER_LIST_SIZE, managerLeaderList.size()); } - variables.put(ProcessProjectStandardCommon.DESIGN_ENGINEER_LIST, designEngineerList); - variables.put(ProcessProjectStandardCommon.DESIGN_ENGINEER_LIST_SIZE, designEngineerList.size()); + taskService.complete(taskId, variables); if (pass){ //发送消息 @@ -686,6 +701,8 @@ public class ProcessProjectStandardService extends ServiceImpl Flow_1g6zc95 - - + + Flow_1g6zc95 Flow_06h9ihd @@ -92,7 +92,7 @@ ${designEngineerListSize > 0} - + Flow_06h9ihd Flow_1yporul @@ -285,7 +285,7 @@ Flow_0w3nr57 - Flow_03v0fem + Flow_1d9erg0 Flow_1gw9i5e @@ -296,14 +296,11 @@ - Flow_0mngw8y - Flow_03v0fem + Flow_03grjn9 + Flow_0yfb531 ${nrOfInstances == nrOfCompletedInstances} - - Flow_0x6qt62 - Flow_0x6qt62 Flow_0uhjeie @@ -465,593 +462,1221 @@ + + Flow_0x6qt62 + - + ${!pass} - + + + Flow_0yfb531 + Flow_0x35643 + Flow_1d9erg0 + + + Flow_0mngw8y + Flow_03grjn9 + Flow_067fs3q + + + ${managerLeaderListSize > 0} + + + + + ${notInvolvedManagerLeaderListSize > 0} + + + Flow_067fs3q + Flow_0x35643 + + ${nrOfInstances == nrOfCompletedInstances} + + + Flow_0q4xoqy + Flow_0xbmrsd + Flow_0hpuexg + + + Flow_0hpuexg + Flow_14m4664 + Flow_16ifeqw + + + Flow_16ifeqw + + + Flow_14m4664 + Flow_0epd47x + Flow_0gtzh06 + + + Flow_0elxtw0 + Flow_184uarj + Flow_0xbmrsd + + + Flow_0epd47x + Flow_0elxtw0 + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + Flow_1im30fq + Flow_1qy2qhv + + + Flow_1qy2qhv + Flow_0pc4bzx + Flow_0on9v50 + + + Flow_0on9v50 + + + Flow_0nzw80j + + + + + + Flow_0pc4bzx + Flow_11r05ia + Flow_1im30fq + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + + + Flow_0nzw80j + Flow_11r05ia + + + + + ${!pass} + + + ${pass} + + + + + + Flow_0gtzh06 + Flow_184uarj + + ${nrOfInstances == nrOfCompletedInstances} + + + Flow_02naor5 + + + + + + Flow_02naor5 + Flow_16y47ea + + + Flow_1gwfkl5 + + + Flow_16y47ea + Flow_1gwfkl5 + Flow_0jmj18j + + + + + + Flow_0jmj18j + Flow_0fzqe69 + Flow_1jr37d1 + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + + Flow_1jr37d1 + Flow_1ctnsbg + + + Flow_1ctnsbg + Flow_0fzqe69 + Flow_1tge35x + + + Flow_1tge35x + + + + + ${designEngineerListSize == 0} + + + ${designEngineerListSize > 0} + + + ${!pass} + + + + + ${pass} + + + + + + + ${!pass} + + + ${pass} + + + ${moduleOwnerListSize > 0} + + + ${notInvolvedModuleOwnerListSize > 0} + + + + + Flow_0ch4vcf + + + Flow_0ch4vcf + Flow_0p2u3az + + + Flow_0wxq37t + Flow_0q4xoqy + + ${nrOfInstances == nrOfCompletedInstances} + + + Flow_0wg5djk + + + + + + Flow_0juzpm4 + Flow_1cf67vx + Flow_0z1dtop + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + + Flow_0z1dtop + Flow_18mw38n + + + Flow_18mw38n + Flow_0juzpm4 + Flow_1e126ma + + + Flow_1e126ma + + + + + + Flow_0wg5djk + Flow_1925osb + + + Flow_1925osb + Flow_1cf67vx + Flow_12hf7sf + + + Flow_12hf7sf + + + + ${!pass} + + + ${designEngineerListSize > 0} + + + + + ${pass} + + + + ${designEngineerListSize == 0} + + + + Flow_0p2u3az + Flow_0wxq37t + Flow_02fli1m + + + Flow_02fli1m + + + + + ${moduleOwnerListSize > 0} + + + ${moduleOwnerListSize == 0} + + - + - + + + + + + + + + + + + + + + + + + + + - + - + - - + + + + + + + + - + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + + - - - - + + + + - - - - - - - - - - - - - - - - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - - - - + + + + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - - + + - - - - + + + + - - - - - - - - - - - - - - - - + - - + + - - - - - - - - - - - - - + + + - - - + + + - - - + + + - + + + + + + + + + - - + + - + + + + + + + + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + + + + - - - + + + - + - - + + - + - - + + - - - - - - - - + - - + + - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - - - + + + + - + - - + + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - - - - + + + + - + - - + + - - + + - - + + - + - - + + - - - - - + + + + + - - - - - - - - - - - - - - + + - - + + - + - - + + - + + + + + + + + - - - + + + - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + - - + + - - + + - + + + + + + + + - - + + - - - + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/laws-modules/src/main/resources/bpmn/法规合规评估流程camund.bpmn b/laws-modules/src/main/resources/bpmn/法规合规评估流程camund.bpmn index d845d2fd..56c72915 100644 --- a/laws-modules/src/main/resources/bpmn/法规合规评估流程camund.bpmn +++ b/laws-modules/src/main/resources/bpmn/法规合规评估流程camund.bpmn @@ -19,8 +19,8 @@ Flow_1g6zc95 - - + + Flow_1g6zc95 Flow_06h9ihd @@ -92,7 +92,7 @@ ${designEngineerListSize > 0} - + Flow_06h9ihd Flow_1yporul @@ -285,7 +285,7 @@ Flow_0w3nr57 - Flow_03v0fem + Flow_1d9erg0 Flow_1gw9i5e @@ -296,14 +296,11 @@ - Flow_0mngw8y - Flow_03v0fem + Flow_03grjn9 + Flow_0yfb531 ${nrOfInstances == nrOfCompletedInstances} - - Flow_0x6qt62 - Flow_0x6qt62 Flow_0uhjeie @@ -465,593 +462,1221 @@ + + Flow_0x6qt62 + - + ${!pass} - + + + Flow_0yfb531 + Flow_0x35643 + Flow_1d9erg0 + + + Flow_0mngw8y + Flow_03grjn9 + Flow_067fs3q + + + ${managerLeaderListSize > 0} + + + + + ${notInvolvedManagerLeaderListSize > 0} + + + Flow_067fs3q + Flow_0x35643 + + ${nrOfInstances == nrOfCompletedInstances} + + + Flow_0q4xoqy + Flow_0xbmrsd + Flow_0hpuexg + + + Flow_0hpuexg + Flow_14m4664 + Flow_16ifeqw + + + Flow_16ifeqw + + + Flow_14m4664 + Flow_0epd47x + Flow_0gtzh06 + + + Flow_0elxtw0 + Flow_184uarj + Flow_0xbmrsd + + + Flow_0epd47x + Flow_0elxtw0 + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + Flow_1im30fq + Flow_1qy2qhv + + + Flow_1qy2qhv + Flow_0pc4bzx + Flow_0on9v50 + + + Flow_0on9v50 + + + Flow_0nzw80j + + + + + + Flow_0pc4bzx + Flow_11r05ia + Flow_1im30fq + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + + + Flow_0nzw80j + Flow_11r05ia + + + + + ${!pass} + + + ${pass} + + + + + + Flow_0gtzh06 + Flow_184uarj + + ${nrOfInstances == nrOfCompletedInstances} + + + Flow_02naor5 + + + + + + Flow_02naor5 + Flow_16y47ea + + + Flow_1gwfkl5 + + + Flow_16y47ea + Flow_1gwfkl5 + Flow_0jmj18j + + + + + + Flow_0jmj18j + Flow_0fzqe69 + Flow_1jr37d1 + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + + Flow_1jr37d1 + Flow_1ctnsbg + + + Flow_1ctnsbg + Flow_0fzqe69 + Flow_1tge35x + + + Flow_1tge35x + + + + + ${designEngineerListSize == 0} + + + ${designEngineerListSize > 0} + + + ${!pass} + + + + + ${pass} + + + + + + + ${!pass} + + + ${pass} + + + ${moduleOwnerListSize > 0} + + + ${notInvolvedModuleOwnerListSize > 0} + + + + + Flow_0ch4vcf + + + Flow_0ch4vcf + Flow_0p2u3az + + + Flow_0wxq37t + Flow_0q4xoqy + + ${nrOfInstances == nrOfCompletedInstances} + + + Flow_0wg5djk + + + + + + Flow_0juzpm4 + Flow_1cf67vx + Flow_0z1dtop + + ${nrOfInstances == nrOfCompletedInstances} + + + + + + + Flow_0z1dtop + Flow_18mw38n + + + Flow_18mw38n + Flow_0juzpm4 + Flow_1e126ma + + + Flow_1e126ma + + + + + + Flow_0wg5djk + Flow_1925osb + + + Flow_1925osb + Flow_1cf67vx + Flow_12hf7sf + + + Flow_12hf7sf + + + + ${!pass} + + + ${designEngineerListSize > 0} + + + + + ${pass} + + + + ${designEngineerListSize == 0} + + + + Flow_0p2u3az + Flow_0wxq37t + Flow_02fli1m + + + Flow_02fli1m + + + + + ${moduleOwnerListSize > 0} + + + ${moduleOwnerListSize == 0} + + - + - + + + + + + + + + + + + + + + + + + + + - + - + - - + + + + + + + + - + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + + - - - - + + + + - - - - - - - - - - - - - - - - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - - - - + + + + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - - + + - - - - + + + + - - - - - - - - - - - - - - - - + - - + + - - - - - - - - - - - - - + + + - - - + + + - - - + + + - + + + + + + + + + - - + + - + + + + + + + + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + + + + - - - + + + - + - - + + - + - - + + - - - - - - - - + - - + + - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - - - + + + + - + - - + + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - - - - + + + + - + - - + + - - + + - - + + - + - - + + - - - - - + + + + + - - - - - - - - - - - - - - + + - - + + - + - - + + - + + + + + + + + - - - + + + - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + - - + + - - + + - + + + + + + + + - - + + - - - + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +