yangys
2025-08-02 e1c6d113abb7c36c48573009e09d30a42513417a
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/DispatchController.java
@@ -7,6 +7,7 @@
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
import org.springblade.core.secure.utils.AuthUtil;
@@ -15,6 +16,7 @@
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.mdm.flow.constants.FlowContants;
import org.springblade.mdm.flow.entity.ApproveRecord;
import org.springblade.mdm.flow.excution.StartDispatcher;
import org.springblade.mdm.flow.service.ApproveRecordService;
@@ -42,7 +44,7 @@
   private final StartDispatcher dispatcher;
   private final TaskService taskService;
   private final RuntimeService runtimeService;
   private final ProcessProgRefService processProgRefService;
   private ApproveRecordService approveRecordService;
@@ -69,8 +71,9 @@
         variables = Kv.create();
      }
      String programIds = null;
      if(variables.containsKey("programIds")){
      if(variables.containsKey(FlowContants.PROGRAM_IDS_KEY)){
         programIds = variables.get("programIds").toString();
         runtimeService.setVariable(taskId, FlowContants.PROGRAM_IDS_KEY, programIds);
      }
      if(StringUtils.isNotEmpty(programIds)) {
         processProgRefService.addRelations(processInstanceId,Func.toLongList(programIds));