fix(征求意见流程): 80236
This commit is contained in:
+9
-9
@@ -596,7 +596,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
switch (taskDefinitionKey) {
|
||||
case ConsultationTaskKey.DEPART_LEADER_START_1:
|
||||
log.info("各部所主管级领导 {} 分发", realName);
|
||||
processDepartLeaderStart_1(processInfoVO); // 各部所主管级领导分发
|
||||
processDepartLeaderStart_1(processInfoVO, taskDefinitionKey); // 各部所主管级领导分发
|
||||
break;
|
||||
case ConsultationTaskKey.DESIGN_ENGINEER_1: // 设计工程师填写征求意见(分发给模块负责人)
|
||||
case ConsultationTaskKey.DESIGN_ENGINEER_2: // 设计工程师填写征求意见(不分发给模块负责人)
|
||||
@@ -613,7 +613,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
break;
|
||||
case ConsultationTaskKey.MODULE_OWNER_START: // 模块负责人分发
|
||||
log.info("模块负责人 {} 分发", realName);
|
||||
moduleOwnerStart(processInfoVO);
|
||||
moduleOwnerStart(processInfoVO, taskDefinitionKey);
|
||||
break;
|
||||
default:
|
||||
throw new JeroBootException(EXCEPTION);
|
||||
@@ -692,7 +692,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
* @Date: 2023/11/21 15:07
|
||||
* @Description: 模块负责人分发
|
||||
**/
|
||||
private void moduleOwnerStart(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
private void moduleOwnerStart(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO, String taskDefinitionKey) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
String designEngineerId = businessInfoDTO.getProcessFbConsultationUserLink().getDesignEngineerId();
|
||||
|
||||
@@ -735,7 +735,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
List<String> ids = userLinkList.stream().map(ProcessFbConsultationUserLink::getId).collect(Collectors.toList());
|
||||
String processInstanceId = task.getProcessInstanceId();
|
||||
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_DESIGN_ENGINEER_LIST, ids);
|
||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIdList);
|
||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIdList, taskDefinitionKey);
|
||||
|
||||
// 完成任务
|
||||
taskService.complete(taskId);
|
||||
@@ -899,7 +899,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
* @Date: 2023/11/14 9:35
|
||||
* @Description: 各部所主管级领导分发
|
||||
**/
|
||||
private void processDepartLeaderStart_1(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
private void processDepartLeaderStart_1(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO, String taskDefinitionKey) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
ProcessFbConsultationUserLink userLink = businessInfoDTO.getProcessFbConsultationUserLink(); // 业务分派信息
|
||||
|
||||
@@ -930,7 +930,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||
variables.put(FbCommon.VARIABLE_PASS_FIRST, true);
|
||||
variables.put(FbCommon.VARIABLE_MODULE_OWNER_LIST, moduleOwnerIds);
|
||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.MODULE_OWNER_LIST, moduleOwnerIds);
|
||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.MODULE_OWNER_LIST, moduleOwnerIds, taskDefinitionKey);
|
||||
} else { // 设计工程师
|
||||
if (StringUtils.isBlank(userLink.getDesignEngineerId())) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, FbCommon.VARIABLE_DESIGN_ENGINEER_ID);
|
||||
@@ -947,7 +947,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||
variables.put(FbCommon.VARIABLE_PASS_FIRST, false);
|
||||
variables.put(FbCommon.VARIABLE_DESIGN_ENGINEER_LIST, designEngineerIds);
|
||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIds);
|
||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIds, taskDefinitionKey);
|
||||
}
|
||||
|
||||
runtimeService.setVariablesLocal(processInstanceId, variables);
|
||||
@@ -1002,7 +1002,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
* @Date: 2023/11/17 15:09
|
||||
* @Description: 保存流程定义节点用户
|
||||
**/
|
||||
private void saveNodeUserLink(String processInstanceId, Integer sort, List<String> userIdList) {
|
||||
private void saveNodeUserLink(String processInstanceId, Integer sort, List<String> userIdList, String taskDefinitionKey) {
|
||||
String processDefinitionId = runtimeService.createProcessInstanceQuery()
|
||||
.processInstanceId(processInstanceId).singleResult().getProcessDefinitionId();
|
||||
|
||||
@@ -1034,7 +1034,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
processNodeLinkService.save(link);
|
||||
}
|
||||
|
||||
if (Objects.equals(sort, ConsultationNodeSort.DESIGN_ENGINEER_LIST)){
|
||||
if (Objects.equals(sort, ConsultationNodeSort.DESIGN_ENGINEER_LIST) && Objects.equals(taskDefinitionKey, ConsultationTaskKey.DEPART_LEADER_START_1)){
|
||||
// 各部所主管级领导汇总
|
||||
LambdaQueryWrapper<ProcessNode> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(ProcessNode::getProcessDefinitionId, processDefinitionId);
|
||||
|
||||
Reference in New Issue
Block a user