| | |
| | | //添加流程变量 |
| | | if(!processVariables.isEmpty()) taskService.setVariables(taskId,processVariables); |
| | | taskService.addComment(taskId, task.getProcessInstanceId(), FlowComment.SUBMIT.getType(), "完成提交"); |
| | | // // 判断当前任务是不是转办过的 |
| | | // Boolean delegation = flowLogService.taskDelegation(task.getProcessInstanceId(), task.getId()); |
| | | // if (delegation) { |
| | | // taskService.resolveTask(taskId, newV); |
| | | // } |
| | | if (DelegationState.PENDING.equals(task.getDelegationState())) { |
| | | taskService.resolveTask(taskId, newV); |
| | | } else { |
| | | // 先让当前用户认领这个任务 |
| | | taskService.claim(taskId, SecurityUtils.getUserId() + ""); |
| | | taskService.complete(taskId, newV); |
| | | |
| | | } |
| | | return AjaxResult.success("提交成功"); |
| | | } |
| | | |