yangys
2025-09-13 3ffe33aaa24386337e3638558eca731c62f25521
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/execute/TryFlowCompleteService.java
@@ -44,16 +44,16 @@
   @Override
   public void completeTask(String taskId, String processInstanceId, String comment, Map<String, Object> variables) {
      Task task = currentTask(taskId);
      // 非空判断
      if (Func.isEmpty(variables)) {
         variables = Kv.create();
      }
      String operateResult = this.getApproveResult(variables);
      FlowProgramProperties props = flowCommonService.getProgramProperties(processInstanceId);
      if(!variables.containsKey("assignee")) {
         throw new ServiceException("请指定流程下一步处理人");
      }
      // 非空判断
      if (Func.isEmpty(variables)) {
         variables = Kv.create();
      }
      if(task.getTaskDefinitionKey().equals("programmingTask") ) {//编制节点
@@ -68,9 +68,9 @@
            runtimeService.setVariable(task.getExecutionId(),FlowContants.PROGRAMMER_NAME,userCommonService.getUserNameById(Func.toLong(variables.get("assignee"))));
         }
      }else if(task.getTaskDefinitionKey().equals("check")){
         runtimeService.setVariable(task.getExecutionId(),FlowVariableContants.ACT_CHECKER,Func.toLong(variables.get("assignee")));
         variables.put(FlowVariableContants.ACT_CHECKER,Func.toStr(AuthUtil.getUserId()));
      }else if(task.getTaskDefinitionKey().equals("approveTask")){
         runtimeService.setVariable(task.getExecutionId(),FlowVariableContants.ACT_SENIOR,Func.toLong(variables.get("assignee")));
         variables.put(FlowVariableContants.ACT_SENIOR,Func.toStr(AuthUtil.getUserId()));
      }
      variables.remove("programOnMachine");//其他节点,忽略现场编程标记
      if (StringUtil.isNoneBlank(processInstanceId, comment)) {