Parcourir la source

fix 修复选择弹窗会签人员后,会签审批出现每个任务的审批人都是选择的多人 https://gitee.com/dromara/RuoYi-Vue-Plus/issues/IBYCY7

疯狂的狮子Li il y a 1 an
Parent
commit
09fb5bb2da

+ 6 - 2
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwTaskServiceImpl.java

@@ -186,7 +186,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
             // 消息通知
             flwCommonService.sendMessage(definition.getFlowName(), ins.getId(), messageType, notice);
             //设置下一环节处理人
-            setNextHandler(ins.getId());
+            setNextHandler(ins.getId(), completeTaskBo.getAssigneeMap());
             return true;
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -198,8 +198,12 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
      * 设置下一环节处理人
      *
      * @param instanceId 实例ID
+     * @param assigneeMap 办理人
      */
-    private void setNextHandler(Long instanceId) {
+    private void setNextHandler(Long instanceId, Map<String, Object> assigneeMap) {
+        if (CollUtil.isEmpty(assigneeMap)) {
+            return;
+        }
         Instance inst = insService.getById(instanceId);
         List<FlowTask> flowTaskList = selectByInstId(instanceId);
         Map<String, Object> variableMap = inst.getVariableMap();