From 3b7a44351f3c961812ffa837302518646eae5b0d Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 15 四月 2025 17:14:24 +0800
Subject: [PATCH] 2025年04月15日17:05:13

---
 app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java                    |    2 
 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java |    4 
 app/src/main/java/com/hdl/photovoltaic/ui/test/TestMainActivity.java               |    4 
 app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java               |    6 +-
 app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java        |    5 +
 app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java                      |    2 
 sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java              |    2 
 app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java               |    2 
 app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java                   |  105 +++++++++++++++++++++-------------
 9 files changed, 78 insertions(+), 54 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
index bdaec7d..eef84cd 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -89,14 +89,22 @@
 
     /**
      * 鑾峰彇褰撳墠浣忓畢鐨勯�嗗彉鍣ㄥ垪琛�(鍖呮嫭浠庣殑閫嗗彉鍣�)
+     *
+     * @param homeId                  鐢电珯ID
+     * @param cloudInverterDeviceList 杩滅涓婄殑閫嗗彉鍣ㄥ垪琛紙骞剁綉锛岀缃戯紝璐熻浇涓績锛�
      */
-    public List<GatewayBean> getCurrentHomeGatewayList(String homeId) {
+    public List<GatewayBean> getCurrentHomeGatewayList(String homeId, List<CloudInverterDeviceBean> cloudInverterDeviceList) {
         List<GatewayBean> newList = new ArrayList<>();
         List<GatewayBean> list = HDLLinkLocalGateway.getInstance().getGatewayList();
         if (list.size() > 0) {
             for (int i = 0; i < list.size(); i++) {
                 GatewayBean gatewayBean = list.get(i);
-                if (TextUtils.isEmpty(gatewayBean.getDevice_mac())) {
+                if (!getGatewaySpk().contains(gatewayBean.getGatewayType())) {
+                    continue;
+                }
+                if (TextUtils.isEmpty(gatewayBean.getDevice_mac())
+                        || TextUtils.isEmpty(gatewayBean.getSid())
+                        || TextUtils.isEmpty(gatewayBean.getOid())) {
                     continue;
                 }
                 //鐢╤omeId绛涢�夊綋鍓嶄綇瀹呯殑閫嗗彉鍣ㄥ垪琛�
@@ -105,8 +113,24 @@
                 }
             }
         }
+        //杩藉姞杩欎釜鏉′欢鏄洜涓轰笂闈㈡妸HDLLinkLocalGateway.getInstance().getGatewayList()鍒楄〃澶勭悊瀹屽悗,鎺ョ潃鎼滅储灞�鍩熺綉鍙堣繕鍘熷垪琛ㄦ暟鎹紝瀵艰嚧鍑虹幇鏃ф暟鎹紱
+        if (cloudInverterDeviceList != null && cloudInverterDeviceList.size() > 0) {
+            List<GatewayBean> checkNewList = new ArrayList<>();
+            for (int i = 0; i < cloudInverterDeviceList.size(); i++) {
+                CloudInverterDeviceBean cloudInverterDevice = cloudInverterDeviceList.get(i);
+                for (GatewayBean gatewayBean : newList) {
+                    if (cloudInverterDevice.getOsn().equals(gatewayBean.getDevice_mac())) {
+                        checkNewList.add(gatewayBean);
+                        break;
+                    }
+                }
+            }
+            newList.clear();
+            newList.addAll(checkNewList);
+        }
         return newList;
     }
+
 
     /**
      * 娣诲姞閫嗗彉鍣ㄥ埌缂撳瓨鍒楄〃閲岄潰鍘�
@@ -118,7 +142,7 @@
         if (newGatewayBean == null || TextUtils.isEmpty(homeId)) {
             return;
         }
-        List<GatewayBean> list = getCurrentHomeGatewayList(homeId);
+        List<GatewayBean> list = getCurrentHomeGatewayList(homeId,null);
         if (list == null || list.size() == 0) {
             return;
         }
@@ -147,7 +171,7 @@
         if (TextUtils.isEmpty(mac)) {
             return;
         }
-        List<GatewayBean> list = getCurrentHomeGatewayList(homeId);
+        List<GatewayBean> list = getCurrentHomeGatewayList(homeId,null);
         if (list == null || list.size() == 0) {
             return;
         }
@@ -174,7 +198,7 @@
         if (TextUtils.isEmpty(deviceId)) {
             return;
         }
-        List<GatewayBean> list = getCurrentHomeGatewayList(homeId);
+        List<GatewayBean> list = getCurrentHomeGatewayList(homeId,null);
         if (list == null || list.size() == 0) {
             return;
         }
@@ -335,7 +359,7 @@
         } else {
             //鍙湁杩涘叆璇︽儏鐣岄潰
             List<OidBean> newOidList = new ArrayList<>();
-            //琛ㄧず涓棿浠讳綍涓�涓け璐ラ兘鏄敼鍙樼敤澧為噺涓婁紶
+            //琛ㄧず涓棿浠讳綍涓�涓幏鍙杘id澶辫触銆傞兘瑕佹敼鍙樼敤澧為噺涓婁紶oid鍒楄〃
             AtomicBoolean isIncrementalOidAddition = new AtomicBoolean(false);
             AtomicInteger atomicInteger = new AtomicInteger(0);
             for (int i = 0; i < list.size(); i++) {
@@ -375,12 +399,12 @@
                                 fullUpdateOid(homeId, newOidList, new CloudCallBeak<Boolean>() {
                                     @Override
                                     public void onSuccess(Boolean obj) {
-                                        HdlLogLogic.print("涓婁紶oid鍒楄〃鍒颁簯绔垚鍔�(鍏ㄩ噺)---浣忓畢id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "---\r\n鏁版嵁---" + new Gson().toJson(newOidList), true);
+                                        HdlLogLogic.print("涓婁紶oid鍒楄〃鍒颁簯绔垚鍔�(鍏ㄩ噺)---浣忓畢id:" + homeId + "---\r\n鏁版嵁---" + new Gson().toJson(newOidList), true);
                                     }
 
                                     @Override
                                     public void onFailure(HDLException e) {
-                                        HdlLogLogic.print("涓婁紶oid鍒楄〃鍒颁簯绔け璐�(鍏ㄩ噺)---浣忓畢id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true);
+                                        HdlLogLogic.print("涓婁紶oid鍒楄〃鍒颁簯绔け璐�(鍏ㄩ噺)---浣忓畢id:" + homeId + "-->" + e.getMsg() + "(" + e.getCode() + ")", true);
                                     }
                                 });
                             }
@@ -389,6 +413,7 @@
 
                     @Override
                     public void onError(HDLLinkException e) {
+                        isIncrementalOidAddition.set(true);
                         atomicInteger.set(atomicInteger.get() + 1);
                         if (atomicInteger.get() == list.size()) {
                             if (newOidList.isEmpty()) {
@@ -407,8 +432,6 @@
                                     HdlLogLogic.print("涓婁紶oid鍒楄〃鍒颁簯绔け璐�(澧為噺)---浣忓畢id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true);
                                 }
                             });
-                        } else {
-                            isIncrementalOidAddition.set(true);
                         }
                     }
                 });
@@ -445,7 +468,7 @@
                 if (cloudCallBeak != null) {
                     cloudCallBeak.onSuccess(true);
                     //涓存椂鐨勯�昏緫锛屼笂浼爋id鍒楄〃鍒颁簯绔�
-                    List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId);
+                    List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId,null);
                     uploadOidDataToCloud(homeId, list, true, null);
                 }
             }
@@ -699,7 +722,7 @@
             HdlLogLogic.print("涓婁紶oid鍒楄〃鍒颁簯绔け璐�---褰撳墠浣忓畢id:" + UserConfigManage.getInstance().getHomeId() + "---涓婁紶浣忓畢id:" + homeId, true);
             return;
         }
-        if (oidList == null || oidList.size() == 0) {
+        if (oidList == null || oidList.isEmpty()) {
             HdlLogLogic.print("oid鍒楄〃涓虹┖锛屾棤娉曞閲忔坊鍔爋id鍒颁簯绔�---", true);
             return;
         }
@@ -735,7 +758,7 @@
                 if (cloudCallBeak != null) {
                     cloudCallBeak.onSuccess(true);
                 }
-                HdlLogLogic.print("澧為噺娣诲姞oid鍒颁簯绔垚鍔�---");
+                HdlLogLogic.print("澧為噺娣诲姞oid鍒颁簯绔垚鍔�---", true);
             }
 
             @Override
@@ -1100,17 +1123,17 @@
                                     //鍚堝苟璐熻浇涓績璁惧鍒楄〃锛岀劧鍚庡湪涓�璧峰仛澶勭悊
                                     inverterDeviceList.addAll(loadCentreDeviceList);
                                 }
-                                List<String> removeSidList = new ArrayList<>();
+                                List<String> removeMacList = new ArrayList<>();
                                 for (int j = 0; j < HDLLinkLocalGateway.getInstance().getGatewayList().size(); j++) {
                                     GatewayBean gatewayBean = HDLLinkLocalGateway.getInstance().getGatewayList().get(j);
-                                    if (querySidInverter(inverterDeviceList, gatewayBean.getSid())) {
+                                    if (queryMacInverter(inverterDeviceList, gatewayBean.getDevice_mac())) {
                                         //鏈湴鏈夛紝浜戠娌℃湁,鍒犻櫎鏈湴锛�
-                                        removeSidList.add(gatewayBean.getSid());
+                                        removeMacList.add(gatewayBean.getDevice_mac());
                                     }
                                 }
-                                for (int i = 0; i < removeSidList.size(); i++) {
+                                for (int i = 0; i < removeMacList.size(); i++) {
                                     //鍒犻櫎鏈湴鐨勯�嗗彉鍣�
-                                    removeLocalInverter(removeSidList.get(i));
+                                    removeLocalInverter(removeMacList.get(i));
                                 }
                                 //鎯呭喌1:鏈夊眬鍩熺綉锛屾湁澶栫綉锛�
                                 setDeviceRemoteInfo(inverterDeviceList, homeId, cloudCallBeak);
@@ -1119,17 +1142,17 @@
                             @Override
                             public void onFailure(HDLException e) {
                                 //鍚戜簯绔幏鍙栬礋杞戒腑蹇冭澶囧垪琛ㄥけ璐ュ悗锛屼粛鐒跺鐞嗛�嗗彉鍣ㄨ澶囧垪琛�
-                                List<String> removeSidList = new ArrayList<>();
+                                List<String> removeMacList = new ArrayList<>();
                                 for (int j = 0; j < HDLLinkLocalGateway.getInstance().getGatewayList().size(); j++) {
                                     GatewayBean gatewayBean = HDLLinkLocalGateway.getInstance().getGatewayList().get(j);
-                                    if (querySidInverter(inverterDeviceList, gatewayBean.getSid())) {
-                                        //鏈湴鏈夛紝浜戠娌℃湁,鍒犻櫎鏈湴锛�
-                                        removeSidList.add(gatewayBean.getSid());
+                                    if (queryMacInverter(inverterDeviceList, gatewayBean.getDevice_mac())) {
+                                        //浜戠娌℃湁,鏈湴鏈夛紝鍒犻櫎鏈湴锛�
+                                        removeMacList.add(gatewayBean.getDevice_mac());
                                     }
                                 }
-                                for (int i = 0; i < removeSidList.size(); i++) {
+                                for (int i = 0; i < removeMacList.size(); i++) {
                                     //鍒犻櫎鏈湴鐨勯�嗗彉鍣�
-                                    removeLocalInverter(removeSidList.get(i));
+                                    removeLocalInverter(removeMacList.get(i));
                                 }
                                 //鎯呭喌1:鏈夊眬鍩熺綉锛屾湁澶栫綉锛�
                                 setDeviceRemoteInfo(inverterDeviceList, homeId, cloudCallBeak);
@@ -1149,25 +1172,25 @@
                             public void onSuccess(List<CloudInverterDeviceBean> loadCentreDeviceList) {
                                 if (loadCentreDeviceList == null) {
                                     if (cloudCallBeak != null) {
-                                        cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId));
+                                        cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId, null));
                                     }
                                     return;
                                 }
-                                List<String> removeSidList = new ArrayList<>();
+                                List<String> removeMacList = new ArrayList<>();
                                 for (int j = 0; j < HDLLinkLocalGateway.getInstance().getGatewayList().size(); j++) {
                                     GatewayBean gatewayBean = HDLLinkLocalGateway.getInstance().getGatewayList().get(j);
                                     if (!isLoadCenterSpk(gatewayBean.getSpk())) {
                                         //涓嶆槸璐熻浇涓績鐨剆pk涓嶅仛澶勭悊锛�
                                         continue;
                                     }
-                                    if (querySidInverter(loadCentreDeviceList, gatewayBean.getSid())) {
-                                        //鏈湴鏈夛紝浜戠娌℃湁,鍒犻櫎鏈湴锛�
-                                        removeSidList.add(gatewayBean.getSid());
+                                    if (queryMacInverter(loadCentreDeviceList, gatewayBean.getDevice_mac())) {
+                                        //浜戠娌℃湁,鏈湴鏈夛紝鍒犻櫎鏈湴锛�
+                                        removeMacList.add(gatewayBean.getDevice_mac());
                                     }
                                 }
-                                for (int i = 0; i < removeSidList.size(); i++) {
+                                for (int i = 0; i < removeMacList.size(); i++) {
                                     //鍒犻櫎鏈湴鐨勯�嗗彉鍣�
-                                    removeLocalInverter(removeSidList.get(i));
+                                    removeLocalInverter(removeMacList.get(i));
                                 }
                                 //鎯呭喌1:鏈夊眬鍩熺綉锛屾湁澶栫綉锛�
                                 setDeviceRemoteInfo(loadCentreDeviceList, homeId, cloudCallBeak);
@@ -1177,7 +1200,7 @@
                             public void onFailure(HDLException e) {
                                 //鍚戜簯绔幏鍙栬礋杞戒腑蹇冭澶囧垪琛ㄥけ璐ュ悗锛岄粯璁よ繑鍥炴湰鍦伴�嗗彉鍣ㄥ垪琛�;
                                 if (cloudCallBeak != null) {
-                                    cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId));
+                                    cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId, null));
                                 }
                             }
                         });
@@ -1266,7 +1289,7 @@
         if (list == null || list.size() == 0) {
             //浜戠娌℃湁缁戝畾閫嗗彉鍣�,榛樿杩斿洖鏈湴閫嗗彉鍣ㄥ垪琛�;
             if (cloudCallBeak != null) {
-                cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId));
+                cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId, list));
             }
 
             return;
@@ -1284,7 +1307,7 @@
                     //鍒版渶鍚庝竴鏉★紝鎵嶆湁鍥炶皟
                     if (atomicInteger.get() == list.size()) {
                         if (cloudCallBeak != null) {
-                            cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId));
+                            cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId, list));
                         }
                     }
                 }
@@ -1295,7 +1318,7 @@
                     //褰撴渶鍚庝竴鏉¤姹傚け璐ヤ簡锛屾墠鏈夊洖璋�
                     if (atomicInteger.get() == list.size()) {
                         if (cloudCallBeak != null) {
-                            cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId));
+                            cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId, list));
                         }
                     }
                     HdlLogLogic.print("鑾峰彇璁惧杩滅▼閫氳淇℃伅澶辫触---msg---" + e.getMsg() + "(" + e.getCode() + ")");
@@ -1306,16 +1329,16 @@
     }
 
     /**
-     * 閫氳繃sid鏌ヨ閫嗗彉鍣ㄦ槸鍚﹀瓨缁戝畾鍦ㄤ簯绔�
+     * 閫氳繃mac鏌ヨ閫嗗彉鍣ㄦ槸鍚﹀瓨缁戝畾鍦ㄤ簯绔�
      *
      * @param list 浜戠涓婇�嗗彉鍣ㄥ垪琛�
      * @return true涓嶅瓨鍦紝鍚﹀垯瀛樺湪
      */
-    private boolean querySidInverter(List<CloudInverterDeviceBean> list, String sid) {
+    private boolean queryMacInverter(List<CloudInverterDeviceBean> list, String mac) {
         int exists_value = -1;
         for (int i = 0; i < list.size(); i++) {
             CloudInverterDeviceBean cloudInverterDeviceBean = list.get(i);
-            if (sid.equals(cloudInverterDeviceBean.getSid())) {
+            if (mac.equals(cloudInverterDeviceBean.getOsn())) {
                 exists_value = 1;
                 break;
             }
@@ -1365,10 +1388,10 @@
     /**
      * 鍒犻櫎鏈湴缂撳瓨閫嗗彉鍣�
      *
-     * @param sid 璁惧sid
+     * @param mac 璁惧mac
      */
-    private void removeLocalInverter(String sid) {
-        GatewayBean gatewayBean = HDLLinkLocalGateway.getInstance().getLocalGateway(sid);
+    private void removeLocalInverter(String mac) {
+        GatewayBean gatewayBean = HDLLinkLocalGateway.getInstance().getLocalGateway(mac);
         if (gatewayBean != null) {
             HDLLinkLocalGateway.getInstance().getGatewayList().remove(gatewayBean);
         }
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
index 4ff1ed1..5f57a00 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -906,7 +906,7 @@
                 if (callback != null) {
                     uniSuccessCallback(type, null, callback);
                 }
-                List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId);
+                List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId,null);
                 for (int i = 0; i < list.size(); i++) {
                     GatewayBean gatewayBean = list.get(i);
                     HdlDeviceLogic.getInstance().initializeInverter(gatewayBean.getDevice_mac(), null);
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
index 786694b..c1e077a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
@@ -624,7 +624,7 @@
                 return;
             }
             int index = -1;
-            List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId());
+            List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId(),null);
             for (int i = 0; i < list.size(); i++) {
                 GatewayBean gatewayBean = list.get(i);
                 if (gatewayBean.getGatewayId().equals(topics[2])) {
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
index 9dcfb51..899b91c 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -131,7 +131,7 @@
                 return;
             }
             int index = -1;
-            List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId());
+            List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId(), null);
             for (int i = 0; i < list.size(); i++) {
                 GatewayBean gatewayBean = list.get(i);
                 if (gatewayBean.getGatewayId().equals(topics[2])) {
@@ -205,8 +205,8 @@
             }
             String homeId = event.getData().toString();
             //杩涘幓浣忓畢璇︽儏uni璇诲彇閫嗗彉鍣ㄥ垪琛ㄦ垚鍔熷悗閫氱煡
-            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).size(); i++) {
-                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).get(i).getGatewayId();
+            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId, null).size(); i++) {
+                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId, null).get(i).getGatewayId();
                 //瀛楃涓叉槸鑷繁鎸夎鍒欐嫾鎺ョ殑,閲岄潰娉ㄥ唽涓婚鏃朵細瑙f瀽瀛楃涓�,鍙嬁getGatewayId()鍊�;
                 String topic = "/user/" + gatewayId + "/#";
                 //杩涘幓浣忓畢璇︽儏寮�濮嬭闃呬富棰�
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java b/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java
index 373f4f7..dcc800f 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java
@@ -127,7 +127,8 @@
     }
 
     public String getSid() {
-        return sid == null ? "" : sid;
+
+        return TextUtils.isEmpty(sid) ? "" : sid;
     }
 
     public void setSid(String sid) {
@@ -279,7 +280,7 @@
         if (this.location == null) {
             return this.address;
         }
-        return this.location.getNationName() + this.location.getProvinceName() + this.location.getCityName() + this.address;
+        return this.location.getNationName() + " " + this.location.getProvinceName() + " " + this.location.getCityName() + " " + this.address;
     }
 
     public String getHomeNameAndDeviceName() {
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java b/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java
index c1a4193..9da4c75 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java
@@ -232,6 +232,6 @@
         if (this.location == null) {
             return this.address;
         }
-        return this.location.getNationName() +"-"+ this.location.getProvinceName() +"-"+ this.location.getCityName() +"-"+ this.address;
+        return this.location.getNationName() +" "+ this.location.getProvinceName() +" "+ this.location.getCityName() +" "+ this.address;
     }
 }
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
index 8a8744c..f2c2200 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -641,8 +641,8 @@
             }
             String homeId = eventBus.getData().toString();
             //杩涘幓浣忓畢璇︽儏uni璇诲彇閫嗗彉鍣ㄥ垪琛ㄦ垚鍔熷悗閫氱煡
-            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).size(); i++) {
-                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).get(i).getGatewayId();
+            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId,null).size(); i++) {
+                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId,null).get(i).getGatewayId();
                 //瀛楃涓叉槸鑷繁鎸夎鍒欐嫾鎺ョ殑,閲岄潰娉ㄥ唽涓婚鏃朵細瑙f瀽瀛楃涓�,鍙嬁getGatewayId()鍊�;
                 String topic = "/user/" + gatewayId + "/#";
                 //杩涘幓浣忓畢璇︽儏寮�濮嬭闃呬富棰�
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/test/TestMainActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/test/TestMainActivity.java
index d5db2d9..aac8512 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/test/TestMainActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/test/TestMainActivity.java
@@ -183,7 +183,7 @@
                         return;
                     }
                     showLoading();
-                    List<GatewayBean> gatewayBeanList = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(this.mHomeId);
+                    List<GatewayBean> gatewayBeanList = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(this.mHomeId,null);
                     gsonConvertJsonStr(gatewayBeanList);
                 }
                 break;
@@ -512,7 +512,7 @@
      * 閫夋嫨閫嗗彉鍣ㄨ皟璇�
      */
     public void selectDevice() {
-        List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(this.mHomeId);
+        List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(this.mHomeId,null);
         DialogDeviceList dialogDeviceList = new DialogDeviceList(_mActivity, list);
         dialogDeviceList.show();
         dialogDeviceList.DeviceOnclickListener(new DialogDeviceList.OnclickListener() {
diff --git a/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java b/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java
index 99c46bc..ca6a9a9 100644
--- a/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java
+++ b/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java
@@ -88,7 +88,7 @@
     private String sid;
 
 
-    private String spk = "energy.hdl_inverter";
+    private String spk = "";
 
 
     private String systemStatusDesc;//浜戠-鐘舵��

--
Gitblit v1.8.0