Explorar el Código

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

gssong hace 1 año
padre
commit
8e99dd306a

+ 7 - 3
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwTaskServiceImpl.java

@@ -183,7 +183,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);
@@ -194,9 +194,13 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
     /**
      * 设置下一环节处理人
      *
-     * @param instanceId 实例ID
+     * @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();