| | |
| | | if (!taskService.removeById(task.getId())) { |
| | | throw new BusinessException("failed to remove task"); |
| | | } |
| | | task = null; |
| | | if (!mainLockWrapService.buildMinorTask(agv.getId(), param.getTaskMode(), endCode.getData(), null)) { |
| | | return R.error(); |
| | | } |
| | |
| | | if (!taskService.removeById(task.getId())) { |
| | | throw new BusinessException("failed to remove task"); |
| | | } |
| | | task = null; |
| | | if (!mainLockWrapService.buildMinorTask(agv.getId(), param.getTaskMode(), null, null)) { |
| | | return R.error(); |
| | | } |
| | |
| | | break; |
| | | } |
| | | |
| | | if (!taskService.updateById(task)) { |
| | | throw new BusinessException("任务更新失败"); |
| | | if (null != task) { |
| | | if (!taskService.updateById(task)) { |
| | | throw new BusinessException("任务更新失败"); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |