| | |
| | | if (Utils.getLev(locNo) != shuttleProtocol.getPoint().getZ()) { |
| | | //目标库位和小车库位处于不同一楼层,需要通过提升机调度 |
| | | //获取穿梭车最近且空闲的提升机输送站点 |
| | | LiftStaProtocol liftSta = this.getRecentLiftSta(shuttleNo); |
| | | LiftStaProtocol liftSta = this.getRecentLiftSta(shuttleNo, Utils.getLev(locNo)); |
| | | if (liftSta == null) { |
| | | return false;//没有可用且空闲的输送站点 |
| | | } |
| | |
| | | /** |
| | | * 获取穿梭车最近且空闲的提升机输送站点 |
| | | */ |
| | | public LiftStaProtocol getRecentLiftSta(Integer shuttleNo) { |
| | | public LiftStaProtocol getRecentLiftSta(Integer shuttleNo, Integer targetLev) { |
| | | //获取四向穿梭车线程 |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo); |
| | | if (shuttleThread == null) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | //判断目标楼层站点是否无托盘 |
| | | LiftStaProtocol targetLiftStaProtocol = NyLiftUtils.getLiftStaByLev(slave.getId(), targetLev); |
| | | if (targetLiftStaProtocol == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (targetLiftStaProtocol.getHasTray()) { |
| | | continue;//有托盘跳过 |
| | | } |
| | | |
| | | list.add(liftStaProtocol); |
| | | } |
| | | |