| | |
| | | return false;//指定楼层没有穿梭车 |
| | | } |
| | | |
| | | //检测库位组是否存在小车,存在返回小车号。 |
| | | public static Integer checkGroupLocHasShuttle(List<String> groupLoc) { |
| | | if (groupLoc == null) { |
| | | return null; |
| | | } |
| | | |
| | | if (groupLoc.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | SlaveProperties slaveProperties = SpringUtils.getBean(SlaveProperties.class); |
| | | if (slaveProperties == null) { |
| | | return null; |
| | | } |
| | | |
| | | for (String loc : groupLoc) { |
| | | 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) { |
| | | continue; |
| | | } |
| | | |
| | | if (shuttleProtocol.getCurrentLocNo() == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (shuttleProtocol.getCurrentLocNo().equals(loc)) { |
| | | //存在小车 |
| | | return slave.getId(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | } |