| | |
| | | * @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; |
| | | } |
| | |
| | | list.remove(index); |
| | | } |
| | | } |
| | | /** |
| | | * 移除缓存列表里面逆变器 |
| | | * |
| | | * @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); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加【设备列表】到本地缓存 |