| | |
| | | |
| | | @PostMapping("/force-start") |
| | | @Operation(summary = "强制启动派工", description = "从任务异常记录启动派工流程") |
| | | public R<Boolean> forceStart(long id) { |
| | | public R<Boolean> forceStart(long id,Long producePlanId) { |
| | | try { |
| | | TaskDispatch dispatch = taskDispatchService.getById(id); |
| | | |
| | | TaskAssignVO startVO = new TaskAssignVO(); |
| | | BeanUtils.copyProperties(dispatch, startVO); |
| | | startVO.setTitle(startVO.getDrawingNo()+"-"+startVO.getProcessNo()+"-"+startVO.getProcessEdition()+"数控程序编制"); |
| | | if(producePlanId != null){ |
| | | startVO.setProducePlanId(producePlanId); |
| | | } |
| | | try { |
| | | FlowStartResult result = dispatcher.start(startVO); |
| | | dispatch.setStatus(TaskDispatch.STATUS_STARTED); |