Commit 57f575bf2e52e84304a757512ca2f58b95183135
1 parent
bb538ba4
fix: 并行分支后的,审核人自选问题修复。https://t.zsxq.com/daxv1
Showing
1 changed file
with
5 additions
and
1 deletions
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
| @@ -698,8 +698,12 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -698,8 +698,12 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 698 | 698 | ||
| 699 | // 2.2 情况二:如果节点中的审批人策略为 审批人,在审批时选择下一个节点的审批人,并且该节点的审批人为空 | 699 | // 2.2 情况二:如果节点中的审批人策略为 审批人,在审批时选择下一个节点的审批人,并且该节点的审批人为空 |
| 700 | if (ObjUtil.equals(candidateStrategy, BpmTaskCandidateStrategyEnum.APPROVE_USER_SELECT.getStrategy())) { | 700 | if (ObjUtil.equals(candidateStrategy, BpmTaskCandidateStrategyEnum.APPROVE_USER_SELECT.getStrategy())) { |
| 701 | - // 如果节点存在,但未配置审批人 | 701 | + // 特殊:如果当前节点已经存在审批人,则不允许覆盖。 例如并行节点后,设置的审批人自选节点。 https://t.zsxq.com/daxv1 |
| 702 | Map<String, List<Long>> approveUserSelectAssignees = FlowableUtils.getApproveUserSelectAssignees(processInstance.getProcessVariables()); | 702 | Map<String, List<Long>> approveUserSelectAssignees = FlowableUtils.getApproveUserSelectAssignees(processInstance.getProcessVariables()); |
| 703 | + if (approveUserSelectAssignees != null && CollUtil.isNotEmpty(approveUserSelectAssignees.get(nextFlowNode.getId()))) { | ||
| 704 | + continue; | ||
| 705 | + } | ||
| 706 | + // 如果节点存在,但未配置审批人 | ||
| 703 | List<Long> assignees = nextAssignees != null ? nextAssignees.get(nextFlowNode.getId()) : null; | 707 | List<Long> assignees = nextAssignees != null ? nextAssignees.get(nextFlowNode.getId()) : null; |
| 704 | if (CollUtil.isEmpty(assignees)) { | 708 | if (CollUtil.isEmpty(assignees)) { |
| 705 | throw exception(PROCESS_INSTANCE_APPROVE_USER_SELECT_ASSIGNEES_NOT_CONFIG, nextFlowNode.getName()); | 709 | throw exception(PROCESS_INSTANCE_APPROVE_USER_SELECT_ASSIGNEES_NOT_CONFIG, nextFlowNode.getName()); |