| | |
| | | @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") ) {//编制节点 |
| | |
| | | taskService.addComment(taskId, processInstanceId, comment); |
| | | } |
| | | |
| | | variables.put(FlowContants.LAST_STEP_USER_NICKNAME, AuthUtil.getNickName()); |
| | | variables.put(FlowVariableContants.LAST_STEP_USER_NICKNAME, AuthUtil.getNickName()); |
| | | |
| | | addApproveRecord(taskId,comment,variables); |
| | | |
| | | variables.remove(FlowContants.PROCESS_EDITION);//不要升版了 |
| | | variables.remove(FlowVariableContants.PROCESS_EDITION);//不要升版了 |
| | | |
| | | if("confirmIsUseableTask".equals(task.getTaskDefinitionKey())){ |
| | | variables.put(FlowContants.CURE_PROGRAM_USEABLE,operateResult); |