| | |
| | | import com.zy.acs.manager.manager.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | private AgvDetailService agvDetailService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private BusService busService; |
| | | |
| | | @Override |
| | | public List<MissionVo> getList(Long agvId, String groupNo) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Boolean resend(List<Action> actionList) { |
| | | if (Cools.isEmpty(actionList)) { |
| | | return Boolean.FALSE; |
| | |
| | | for (Action action : newActionList) { |
| | | action.setPriority(i); |
| | | if (!actionService.save(action)) { |
| | | throw new BusinessException(action.getName() + "动作更新失败"); |
| | | throw new BusinessException(action.getName() + " Action Update Fail!"); |
| | | } |
| | | i -= 1; |
| | | } |
| | |
| | | task.setUpdateTime(now); |
| | | task.setIoTime(now); |
| | | if (!taskService.updateById(task)) { |
| | | throw new BusinessException(task.getUuid() + "任务更新失败"); |
| | | throw new BusinessException(task.getUuid() + " Task Update Fail!"); |
| | | } |
| | | busIds.add(task.getBusId()); |
| | | } |
| | |
| | | bus.setBusSts(BusStsType.PROGRESS.val()); |
| | | bus.setUpdateTime(now); |
| | | if (!busService.updateById(bus)) { |
| | | throw new BusinessException(bus.getUuid() + "总线更新失败"); |
| | | throw new BusinessException(bus.getUuid() + " Bus Update Fail!"); |
| | | } |
| | | } |
| | | } |