| | |
| | | |
| | | @SuppressWarnings("all") |
| | | @Transactional |
| | | public void generateBusAndTask(OpenBusSubmitParam busSubmitParam, String memo) { |
| | | public Bus generateBusAndTask(OpenBusSubmitParam busSubmitParam, String memo) { |
| | | String errorMsg = busService.checkoutValid(busSubmitParam); |
| | | if (!Cools.isEmpty(errorMsg)) { |
| | | throw new BusinessException(errorMsg); |
| | | } |
| | | String batch = busSubmitParam.getBatch(); |
| | | List<TaskDto> taskDtoList = busSubmitParam.getTaskList(); |
| | | if (Cools.isEmpty(taskDtoList)) { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | return bus; |
| | | } |
| | | |
| | | /** |
| | |
| | | return 0; |
| | | } |
| | | }); |
| | | if (taskList.size() > agv.getStage()) { |
| | | taskList = taskList.subList(0, agv.getStage()); |
| | | Integer backpack = agvService.getBackpack(agv); |
| | | if (taskList.size() > backpack) { |
| | | taskList = taskList.subList(0, backpack); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | } |
| | | |
| | | if (backpackLev > agv.getStage()) { |
| | | if (backpackLev > backpack) { |
| | | throw new BusinessException("解析Task失败,AGV背篓已满......"); |
| | | } |
| | | |
| | |
| | | } |
| | | for (Action action : actionList) { |
| | | action.setActionSts(ActionStsType.ISSUED.val()); |
| | | action.setStartTime(now); |
| | | action.setUpdateTime(now); |
| | | if (!actionService.updateById(action)) { |
| | | throw new BusinessException(action.getPriority() + " - " + action.getName() + "动作更新失败"); |
| | |
| | | |
| | | if (null != action) { |
| | | action.setActionSts(ActionStsType.FINISH.val()); |
| | | action.setEndTime(now); |
| | | action.setUpdateTime(now); |
| | | if (!actionService.updateById(action)) { |
| | | log.error("Action [{}] 更新失败 !!!", action.getPriority() + " - " + action.getName()); |
| | |
| | | ); |
| | | if (null != action) { |
| | | action.setActionSts(ActionStsType.FINISH.val()); |
| | | action.setEndTime(now); |
| | | action.setUpdateTime(now); |
| | | if (!actionService.updateById(action)) { |
| | | log.error("Action [{}] 更新失败 !!!", action.getPriority() + " - " + action.getName()); |
| | |
| | | ); |
| | | for (Action action : actionList) { |
| | | action.setActionSts(ActionStsType.FINISH.val()); |
| | | action.setEndTime(now); |
| | | action.setUpdateTime(now); |
| | | if (!actionService.updateById(action)) { |
| | | log.error("Action [{}] 更新失败 !!!", action.getPriority() + " - " + action.getName()); |