| | |
| | | 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.constants.FlowVariableContants; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | |
| | | @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); |
| | | |
| | | if(task.getTaskDefinitionKey().equals("replaceProgrammingTask")) {//编制节点 |
| | | variables.put(FlowVariableContants.ACT_PROGRAMMER,Func.toStr(AuthUtil.getUserId())); |
| | | |
| | | flowProgramFileService.checkProgramFiles(processInstanceId,"Y".equals(operateResult)); |
| | | } |
| | | if (StringUtil.isNoneBlank(processInstanceId, comment)) { |
| | | taskService.addComment(taskId, processInstanceId, comment); |
| | | } |
| | | // 非空判断 |
| | | if (Func.isEmpty(variables)) { |
| | | variables = Kv.create(); |
| | | } |
| | | |
| | | variables.put(FlowContants.LAST_STEP_USER_NICKNAME, AuthUtil.getNickName()); |
| | | |
| | | if(!variables.containsKey("assignee")) { |