Browse Source

!1340 fix(bpm):修复自选审批人时存在多个并行节点时审批人覆盖问题
Merge pull request !1340 from whc/master-jdk17

芋道源码 6 months ago
parent
commit
edb302521f

+ 5 - 0
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java

@@ -646,6 +646,11 @@ public class BpmTaskServiceImpl implements BpmTaskService {
                     approveUserSelectAssignees = new HashMap<>();
                 }
                 approveUserSelectAssignees.put(nextFlowNode.getId(), assignees);
+                @SuppressWarnings("unchecked")
+                Map<String,List<Long>> existing = (Map<String,List<Long>>) variables.get(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES);
+                if(CollUtil.isNotEmpty(existing)) {
+                    approveUserSelectAssignees.putAll(existing);
+                }
                 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, approveUserSelectAssignees);
             }
         }