mac
2024-06-25 2bc156ec08369884b44961cd446201d35a66fff0
app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -137,7 +137,7 @@
     * @param homeId 电站id
     * @param mac    逆变器mac
     */
    public void removeLocalCacheMemoryGateway(String homeId, String mac) {
    public void removeLocalCacheMemoryGatewayToMac(String homeId, String mac) {
        if (TextUtils.isEmpty(mac)) {
            return;
        }
@@ -159,6 +159,33 @@
    }
    /**
     * 移除缓存列表里面逆变器
     *
     * @param homeId   电站id
     * @param deviceId 逆变器deviceId
     */
    public void removeLocalCacheMemoryGatewayToDeviceId(String homeId, String deviceId) {
        if (TextUtils.isEmpty(deviceId)) {
            return;
        }
        List<GatewayBean> list = getCurrentHomeGatewayList(homeId);
        if (list == null || list.size() == 0) {
            return;
        }
        int index = -1;
        for (int i = 0; i < list.size(); i++) {
            GatewayBean gatewayBean = list.get(i);
            if (gatewayBean.getDeviceId().equals(deviceId)) {
                index = i;
                break;
            }
        }
        if (index > 0) {
            list.remove(index);
        }
    }
    /**
     * 添加【设备列表】到本地缓存
     *
     * @param list -设备列表