From 134c23aae116f94644d8331c096ff7085e43572b Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 16 四月 2025 13:19:51 +0800
Subject: [PATCH] 2025年04月16日13:19:36

---
 app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java |   32 ++++++++++++++------------------
 1 files changed, 14 insertions(+), 18 deletions(-)

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 e1a886b..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 + "/#";
                 //杩涘幓浣忓畢璇︽儏寮�濮嬭闃呬富棰�
@@ -236,7 +236,7 @@
         }
         UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(0);
         List<HouseIdBean> HouseIdList = HdlResidenceLogic.getInstance().getHouseIdList();
-        if (HouseIdList.size() == 0) {
+        if (HouseIdList.isEmpty()) {
             if (TextUtils.isEmpty(UserConfigManage.getInstance().getHomeId())) {
                 String path = HDLUniMP.UNI_EVENT_OPEN_HOME_Null_C;
                 HdlUniLogic.getInstance().openUniMP(path, null);
@@ -452,20 +452,16 @@
                         }
 
 
-                    }
-                    else if (linkResponse.getTopic().endsWith("/app/thing/property/send")) {
-//                        //璁惧鐘舵�佸彉鏇磘opic锛�/user/${homeId}/app/thing/property/send
-//                        if (linkResponse.getData() == null) {
-//                            HdlLogLogic.print("璁惧鐘舵�佸彉鏇�--->鏁版嵁涓虹┖", false);
-//                            return;
-//                        }
-//                        try {
-//                            Gson gson = new Gson();
-//                            Type typeOfT = new TypeToken<List<OidBean>>() {
-//                            }.getType();
-//                            String json = gson.toJson(linkResponse.getData());
-//                        } catch (Exception ignored) {
-//                        }
+                    } else if (linkResponse.getTopic().endsWith("/app/thing/property/send")) {
+                        //璁惧鐘舵�佸彉鏇磘opic锛�/user/${homeId}/app/thing/property/send
+                        if (linkResponse.getData() == null) {
+                            HdlLogLogic.print("璁惧鐘舵�佸彉鏇�--->鏁版嵁涓虹┖", false);
+                            return;
+                        }
+                        HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
+                        uniCallBackBaseBean.setType(linkResponse.getTopic());
+                        uniCallBackBaseBean.setData(linkResponse.getData());
+                        HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
                     }
 
                 }

--
Gitblit v1.8.0