| | |
| | | @Autowired |
| | | private LiftAction liftAction; |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | public synchronized void executeShuttle() { |
| | | List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>() |
| | | .eq(Device::getStatus, 1) |
| | | .eq(Device::getDeviceType, DeviceCtgType.SHUTTLE.val())); |
| | | for (Device device : list) { |
| | | //小车空闲且有跑库程序 |
| | | shuttleAction.moveLoc(device); |
| | | |
| | | Object object = redisUtil.get(DeviceRedisConstant.SHUTTLE_FLAG + device.getDeviceNo()); |
| | | if (object == null) { |
| | | continue; |
| | | } |
| | | |
| | | Integer taskNo = Integer.valueOf(String.valueOf(object)); |
| | | if (taskNo != 0) { |
| | | //存在任务需要执行 |
| | | boolean result = shuttleAction.executeWork(device, taskNo); |
| | | } |
| | | } |
| | | } |
| | | // @Scheduled(cron = "0/1 * * * * ? ") |
| | | // public synchronized void executeShuttle() { |
| | | // List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>() |
| | | // .eq(Device::getStatus, 1) |
| | | // .eq(Device::getDeviceType, DeviceCtgType.SHUTTLE.val())); |
| | | // for (Device device : list) { |
| | | // |
| | | // } |
| | | // } |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | public synchronized void executeLift() { |