| | |
| | | return true;//无充电任务放行 || 去充电桩中放行 |
| | | } |
| | | |
| | | /** |
| | | * 获取楼层可用小车数量 |
| | | */ |
| | | public int getShuttleCountByLev(int lev) { |
| | | int count = 0; |
| | | for (ShuttleSlave slave : slaveProperties.getShuttle()) { |
| | | //获取四向穿梭车线程 |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, slave.getId()); |
| | | if (shuttleThread == null) { |
| | | continue; |
| | | } |
| | | |
| | | NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | if (shuttleProtocol == null || shuttleProtocol.getShuttleNo() == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (checkChargeWrk(slave.getId())) { |
| | | continue;//存在充电任务,过滤小车 |
| | | } |
| | | |
| | | if (shuttleProtocol.getWorkingMode() == 0) { |
| | | continue;//手动状态 |
| | | } |
| | | |
| | | if (shuttleProtocol.getSuspendState() == 1) { |
| | | //小车处于管制中 |
| | | continue; |
| | | } |
| | | |
| | | if (shuttleProtocol.getPoint().getZ() == lev) { |
| | | //同一楼层可用小车 |
| | | count++; |
| | | continue; |
| | | } |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | } |