From 27d994f4375f604ba7f49a5ba600882884d73126 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期五, 29 十二月 2023 16:07:28 +0800
Subject: [PATCH] 2023年12月29日16:07:20

---
 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseListFragment.java |   30 ++++++++++--------------------
 1 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseListFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseListFragment.java
index 692627b..a24b145 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseListFragment.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseListFragment.java
@@ -2,11 +2,9 @@
 
 import android.Manifest;
 import android.content.Context;
-import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.hardware.camera2.CameraManager;
 import android.os.Bundle;
-import android.text.TextUtils;
 import android.view.View;
 
 import androidx.annotation.NonNull;
@@ -24,16 +22,12 @@
 import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
 import com.hdl.photovoltaic.enums.ShowErrorMode;
 import com.hdl.photovoltaic.listener.CloudCallBeak;
-import com.hdl.photovoltaic.other.HdlCommonLogic;
-import com.hdl.photovoltaic.other.HdlDeviceLogic;
 import com.hdl.photovoltaic.other.HdlLogLogic;
 import com.hdl.photovoltaic.other.HdlResidenceLogic;
 import com.hdl.photovoltaic.other.HdlThreadLogic;
 import com.hdl.photovoltaic.other.HdlUniLogic;
 import com.hdl.photovoltaic.ui.adapter.HouseInfoAdapter;
 import com.hdl.photovoltaic.ui.bean.HouseIdBean;
-import com.hdl.photovoltaic.ui.bean.HouseInfoBean;
-import com.hdl.photovoltaic.ui.device.FastScanActivity;
 import com.hdl.photovoltaic.uni.HDLUniMP;
 import com.hdl.photovoltaic.utils.PermissionUtils;
 import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
@@ -118,13 +112,12 @@
             @Override
             public void onClick(int position, HouseIdBean houseIdBean) {
                 //鐐瑰嚮浣忓畢璇︽儏
-                HdlLogLogic.print("鐐瑰嚮浣忓畢璇︽儏===" + new Gson().toJson(houseIdBean), false);
+                HdlLogLogic.print("鐐瑰嚮浣忓畢璇︽儏--->" + new Gson().toJson(houseIdBean), false);
                 HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
                 String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS
                         + "?homeId=" + houseIdBean.getHomeId()
                         + "&homeName=" + houseIdBean.getHomeName()
-                        + "&powerStationStatus=" + houseIdBean.getPowerStationStatus()
-                        + "&serverAddress=" + AppConfigManage.getUserRegionUrl();
+                        + "&powerStationStatus=" + houseIdBean.getPowerStationStatus();
                 HdlUniLogic.getInstance().openUniMP(path, null);
 
             }
@@ -205,13 +198,13 @@
 
         } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
             //杩涘幓浣忓畢璇︽儏uni璇诲彇閫嗗彉鍣ㄥ垪琛ㄦ垚鍔熷悗閫氱煡
-            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList().size(); i++) {
-                //String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList().get(i).getGatewayId();
-                //瀛楃涓叉槸鑷繁鎸夎鍒欐嫾鎺ョ殑,閲岄潰娉ㄥ唽涓婚鏃朵細瑙f瀽瀛楃涓�,鍙嬁getGatewayId()鍊�;
-                //String topic = "/user/" + gatewayId+"/1";
-                //杩涘幓浣忓畢璇︽儏寮�濮嬭闃呬富棰�
-                MqttRecvClient.getInstance().checkAndsubscribeAllTopics("");
-            }
+//            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList().size(); i++) {
+            //String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList().get(i).getGatewayId();
+            //瀛楃涓叉槸鑷繁鎸夎鍒欐嫾鎺ョ殑,閲岄潰娉ㄥ唽涓婚鏃朵細瑙f瀽瀛楃涓�,鍙嬁getGatewayId()鍊�;
+            //String topic = "/user/" + gatewayId+"/1";
+            //杩涘幓浣忓畢璇︽儏寮�濮嬭闃呬富棰�
+            MqttRecvClient.getInstance().checkAndsubscribeAllTopics("");
+//            }
         } else if (eventBus.getTopic().equals(ConstantManage.homepage_title_tab_switch)) {
             //鎺ユ敹澶栭儴鐐瑰嚮浜嬩欢
             if (eventBus.getType().equals(HomepageTitleTabSwitch.powerstation.toString())) {
@@ -277,10 +270,7 @@
 
         mPermissionsResultCallback = permissionsResultCallback;
 
-        String[] s = new String[]{
-                Manifest.permission.ACCESS_FINE_LOCATION,
-                Manifest.permission.CAMERA,
-        };
+        String[] s = new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.CAMERA,};
         String[] ary = PermissionUtils.checkPermission(_mActivity, s);
         if (ary.length > 0) {
             requestPermissions(ary, PermissionUtils.STATUS_SUCCESS);

--
Gitblit v1.8.0