| | |
| | | return cacheMapDeviceId.get(deviceId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 针对一个分机对廒间的情况 |
| | | * |
| | | * @param deviceSn |
| | | * @return |
| | | */ |
| | | public static GatewayDevice getCacheByDeviceSn(String deviceSn) { |
| | | Collection<GatewayDevice> list = allCacheDevice(); |
| | | if (null == list || list.isEmpty()) return null; |
| | |
| | | |
| | | return null; |
| | | } |
| | | public static GatewayDevice getCacheByDeviceSIp(String ip) { |
| | | Collection<GatewayDevice> list = allCacheDevice(); |
| | | if (null == list || list.isEmpty()) return null; |
| | | |
| | | for (GatewayDevice device : list) { |
| | | if (ip.equals(device.getIp())) return device; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 针对一个通讯分机对多个仓情况 |