fix: 企标立项变更流程逻辑变更
This commit is contained in:
+8
-5
@@ -126,7 +126,6 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
actFlowCommonService.putIfNotNull(map, "newMainDraftUserLeaderLeader", initChangeFlowUserVO.getNewMainDraftUserLeaderLeader());
|
actFlowCommonService.putIfNotNull(map, "newMainDraftUserLeaderLeader", initChangeFlowUserVO.getNewMainDraftUserLeaderLeader());
|
||||||
actFlowCommonService.putIfNotNull(map, "newMainDraftUserLeader", initChangeFlowUserVO.getNewMainDraftUserLeader());
|
actFlowCommonService.putIfNotNull(map, "newMainDraftUserLeader", initChangeFlowUserVO.getNewMainDraftUserLeader());
|
||||||
actFlowCommonService.putIfNotNull(map, "relatedUserList", Optional.ofNullable(initChangeFlowUserVO.getRelatedUser()).map(s -> Arrays.asList(s.split(","))).orElse(null));
|
actFlowCommonService.putIfNotNull(map, "relatedUserList", Optional.ofNullable(initChangeFlowUserVO.getRelatedUser()).map(s -> Arrays.asList(s.split(","))).orElse(null));
|
||||||
actFlowCommonService.putIfNotNull(map, "copyUser", initChangeFlowUserVO.getCopyUser());
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +174,12 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
private InitChangeFlowUserVO getProcessUserInfo(String processDefinitionId, String processInstanceId) {
|
private InitChangeFlowUserVO getProcessUserInfo(String processDefinitionId, String processInstanceId) {
|
||||||
List<ProcessNode> nodeList = processNodeService.getNodeList(processDefinitionId, processInstanceId);
|
List<ProcessNode> nodeList = processNodeService.getNodeList(processDefinitionId, processInstanceId);
|
||||||
InitChangeFlowUserVO initChangeFlowUserVO = new InitChangeFlowUserVO();
|
InitChangeFlowUserVO initChangeFlowUserVO = new InitChangeFlowUserVO();
|
||||||
Map<String, ProcessNode> userMap = nodeList.stream().collect(Collectors.toMap(ProcessNode::getVariableName, node -> node));
|
Map<String, ProcessNode> userMap = nodeList.stream()
|
||||||
|
.collect(Collectors.groupingBy(ProcessNode::getVariableName))
|
||||||
|
.values()
|
||||||
|
.stream()
|
||||||
|
.map(nodes -> nodes.get(0)) // 选择每组的第一个元素
|
||||||
|
.collect(Collectors.toMap(ProcessNode::getVariableName, node -> node));
|
||||||
Optional.ofNullable(userMap.get("createUser")).ifPresent(node -> initChangeFlowUserVO.setCreateUser(node.getLinkUserIds()));
|
Optional.ofNullable(userMap.get("createUser")).ifPresent(node -> initChangeFlowUserVO.setCreateUser(node.getLinkUserIds()));
|
||||||
Optional.ofNullable(userMap.get("contactUser")).ifPresent(node -> initChangeFlowUserVO.setContactUser(node.getLinkUserIds()));
|
Optional.ofNullable(userMap.get("contactUser")).ifPresent(node -> initChangeFlowUserVO.setContactUser(node.getLinkUserIds()));
|
||||||
Optional.ofNullable(userMap.get("standardExpertList")).ifPresent(node -> initChangeFlowUserVO.setStandardExpert(node.getLinkUserIds()));
|
Optional.ofNullable(userMap.get("standardExpertList")).ifPresent(node -> initChangeFlowUserVO.setStandardExpert(node.getLinkUserIds()));
|
||||||
@@ -185,7 +189,6 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
Optional.ofNullable(userMap.get("newMainDraftUserLeaderLeader")).ifPresent(node -> initChangeFlowUserVO.setNewMainDraftUserLeaderLeader(node.getLinkUserIds()));
|
Optional.ofNullable(userMap.get("newMainDraftUserLeaderLeader")).ifPresent(node -> initChangeFlowUserVO.setNewMainDraftUserLeaderLeader(node.getLinkUserIds()));
|
||||||
Optional.ofNullable(userMap.get("newMainDraftUserLeader")).ifPresent(node -> initChangeFlowUserVO.setNewMainDraftUserLeader(node.getLinkUserIds()));
|
Optional.ofNullable(userMap.get("newMainDraftUserLeader")).ifPresent(node -> initChangeFlowUserVO.setNewMainDraftUserLeader(node.getLinkUserIds()));
|
||||||
Optional.ofNullable(userMap.get("relatedUserList")).ifPresent(node -> initChangeFlowUserVO.setRelatedUser(node.getLinkUserIds()));
|
Optional.ofNullable(userMap.get("relatedUserList")).ifPresent(node -> initChangeFlowUserVO.setRelatedUser(node.getLinkUserIds()));
|
||||||
Optional.ofNullable(userMap.get("copyUser")).ifPresent(node -> initChangeFlowUserVO.setCopyUser(node.getLinkUserIds()));
|
|
||||||
return initChangeFlowUserVO;
|
return initChangeFlowUserVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,10 +216,10 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
actFlowCommonService.setProcessVariables(processInstanceId, variables);
|
actFlowCommonService.setProcessVariables(processInstanceId, variables);
|
||||||
processNodeLinkService.saveNodeUserLink(processDefinitionId, processInstanceId, this.getUserMap(variables));
|
processNodeLinkService.saveNodeUserLink(processDefinitionId, processInstanceId, this.getUserMap(variables));
|
||||||
}
|
}
|
||||||
runtimeService.setVariable(processInstanceId, "pass", true);
|
runtimeService.setVariableLocal(processInstanceId, "pass", true);
|
||||||
} else {
|
} else {
|
||||||
// 设置流程变量
|
// 设置流程变量
|
||||||
runtimeService.setVariable(processInstanceId, "pass", false);
|
runtimeService.setVariableLocal(processInstanceId, "pass", false);
|
||||||
}
|
}
|
||||||
// 更新审批表为完成,填充数据
|
// 更新审批表为完成,填充数据
|
||||||
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
||||||
|
|||||||
Reference in New Issue
Block a user