| | |
| | | @Autowired |
| | | private LocService locService; |
| | | @Autowired |
| | | private AgvModelService agvModelService; |
| | | private TravelService travelService; |
| | | @Autowired |
| | | private TransferStationHandler transferStationHandler; |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | private void startupBus() throws InterruptedException { |
| | | // if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | if (!this.lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS)) { return; } |
| | | List<Bus> busList = busService.selectInSts(BusStsType.RECEIVE, BusStsType.PROGRESS); |
| | | for (Bus bus : busList) { |
| | |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | private void calculateSeg() throws InterruptedException { |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | if (!this.lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS)) { return; } |
| | | List<Task> taskList = taskService.selectBySts(TaskStsType.WAITING); |
| | | |
| | |
| | | for (Segment segment : segments) { |
| | | if (transferStationHandler.hasDelayAtSta(segment)) { |
| | | continue; |
| | | } else { |
| | | travelService.clearRollerWaiting(segment.getTravelId()); |
| | | } |
| | | try { |
| | | txTemplate.executeWithoutResult(status -> { |