| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.mdm.basesetting.machine.vo.MachineSaveVO; |
| | | import org.springblade.mdm.flow.excution.StartDispatcher; |
| | | import org.springblade.mdm.flow.vo.TaskAssignVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private StartDispatcher dispatcher; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | |
| | | @Operation(summary = "任务计划(派工流程)", description = "启动派工流程") |
| | | public R<Boolean> save(@RequestBody TaskAssignVO startVO) { |
| | | dispatcher.start(startVO); |
| | | return R.<Boolean>status(true); |
| | | return R.status(true); |
| | | } |
| | | |
| | | @Operation(summary = "完成任务", description = "流向下一个节点") |
| | | @PostMapping("completeTask") |
| | | public R<Void> completeTask(String taskId, String processInstanceId, String comment,@Parameter(name="variables",description = "任务变量")@RequestBody Map<String, Object> variables) { |
| | | public R<Void> completeTask(String taskId, String processInstanceId, String comment, @Parameter(name = "variables", description = "任务变量") @RequestBody Map<String, Object> variables) { |
| | | // 增加评论 |
| | | if (StringUtil.isNoneBlank(processInstanceId, comment)) { |
| | | taskService.addComment(taskId, processInstanceId, comment); |