mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-28 20:43:38 +08:00 
			
		
		
		
	fix(bpm):修复自选审批人时存在多个并行节点时审批人覆盖问题
多个并行节点中只有最后一个节点的审批人会被保存,其他都为空
This commit is contained in:
		| @ -597,6 +597,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { | |||||||
|      * @param nextAssignees 下一个节点审批人集合(参数) |      * @param nextAssignees 下一个节点审批人集合(参数) | ||||||
|      * @param processInstance 流程实例 |      * @param processInstance 流程实例 | ||||||
|      */ |      */ | ||||||
|  |     @SuppressWarnings("unchecked") | ||||||
|     private Map<String, Object> validateAndSetNextAssignees(String taskDefinitionKey, Map<String, Object> variables, BpmnModel bpmnModel, |     private Map<String, Object> validateAndSetNextAssignees(String taskDefinitionKey, Map<String, Object> variables, BpmnModel bpmnModel, | ||||||
|                                                             Map<String, List<Long>> nextAssignees, ProcessInstance processInstance) { |                                                             Map<String, List<Long>> nextAssignees, ProcessInstance processInstance) { | ||||||
|         // simple 设计器第一个节点默认为发起人节点,不校验是否存在审批人 |         // simple 设计器第一个节点默认为发起人节点,不校验是否存在审批人 | ||||||
| @ -646,10 +647,10 @@ public class BpmTaskServiceImpl implements BpmTaskService { | |||||||
|                     approveUserSelectAssignees = new HashMap<>(); |                     approveUserSelectAssignees = new HashMap<>(); | ||||||
|                 } |                 } | ||||||
|                 approveUserSelectAssignees.put(nextFlowNode.getId(), assignees); |                 approveUserSelectAssignees.put(nextFlowNode.getId(), assignees); | ||||||
|                 @SuppressWarnings("unchecked") |                 Map<String,List<Long>> existingApproveUserSelectAssignees = (Map<String,List<Long>>) variables.get( | ||||||
|                 Map<String,List<Long>> existing = (Map<String,List<Long>>) variables.get(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES); |                         BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES); | ||||||
|                 if(CollUtil.isNotEmpty(existing)) { |                 if (CollUtil.isNotEmpty(existingApproveUserSelectAssignees)) { | ||||||
|                     approveUserSelectAssignees.putAll(existing); |                     approveUserSelectAssignees.putAll(existingApproveUserSelectAssignees); | ||||||
|                 } |                 } | ||||||
|                 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, approveUserSelectAssignees); |                 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, approveUserSelectAssignees); | ||||||
|             } |             } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV