| | |
| | | int targetLev = Utils.getLev(shuttleProtocol.getCurrentLocNo()); |
| | | if (object == null || liftProtocol.getLev() != targetLev) { |
| | | //获取提升机命令 |
| | | LiftCommand liftCommand = liftThread.getMoveCommand(wrkMast.getWrkNo(), liftProtocol.getLev(), targetLev); |
| | | LiftStaProtocol startSta = LiftUtils.getLiftStaByLev(liftProtocol.getLiftNo(), liftProtocol.getLev()); |
| | | LiftStaProtocol targetSta = LiftUtils.getLiftStaByLev(liftProtocol.getLiftNo(), targetLev); |
| | | if (startSta == null || targetSta == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}号提升机,站点数据不存在", wrkMast.getWrkNo(), wrkMast.getLiftNo()); |
| | | return false; |
| | | } |
| | | LiftCommand liftCommand = liftThread.getMoveCommand(commonService.getWorkNo(WrkIoType.PREVIEW_LIFT_MOVE.id), startSta.getSiteId(), targetSta.getSiteId()); |
| | | ArrayList<LiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | | |
| | |
| | | liftAction.assignWork(wrkMast.getLiftNo(), assignCommand); |
| | | News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}号提升机在{}层,提升机不在小车层,调度移动中", wrkMast.getWrkNo(), liftProtocol.getLev(), wrkMast.getLiftNo()); |
| | | redisUtil.set(RedisKeyType.LIFT_MOVE_TO_SHUTTLE_LIMIT.key + wrkMast.getWrkNo(), "lift_moving", 60 * 3); |
| | | redisUtil.set(RedisKeyType.TASK_RUN_LIMIT.key + wrkMast.getWrkNo(), "lock", 8); |
| | | return false; |
| | | } |
| | | |
| | | Object limitObj = redisUtil.get(RedisKeyType.TASK_RUN_LIMIT.key + wrkMast.getWrkNo()); |
| | | if (limitObj != null) { |
| | | return false; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //获取提升机命令 |
| | | LiftCommand liftCommand = liftThread.getShuttleSwitchCommand(wrkMast.getWrkNo(), sourceLiftSta.getLev(), liftSta.getLev()); |
| | | LiftCommand liftCommand = liftThread.getShuttleSwitchCommand(wrkMast.getWrkNo(), sourceLiftSta.getSiteId(), liftSta.getSiteId()); |
| | | ArrayList<LiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | | |