vince
2023-12-19 c8a4f3f8327b4a2290d719503211adb8845e6fd8
src/main/java/com/fzzy/gateway/GatewayUtils.java
@@ -42,6 +42,13 @@
        return cacheMapDeviceId.get(deviceId);
    }
    /**
     * 针对一个分机对廒间的情况
     *
     * @param deviceSn
     * @return
     */
    public static GatewayDevice getCacheByDeviceSn(String deviceSn) {
        Collection<GatewayDevice> list = allCacheDevice();
        if (null == list || list.isEmpty()) return null;
@@ -52,6 +59,15 @@
        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;
    }
    /**
     * 针对一个通讯分机对多个仓情况