From eb8097cb8517726094115410777083d5f63701f0 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期三, 15 五月 2024 15:08:54 +0800
Subject: [PATCH] 2024年05月15日15:08:47

---
 app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java                         |    7 
 app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java                             |   17 +
 app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java       |    4 
 app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java                    |   34 +++
 app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/CustomStyleChartComposer.java |   14 -
 app/src/main/res/layout/activity_my_power_station.xml                                |   51 ----
 app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java                        |   55 ++++--
 app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java                        |  129 ++++++++++---
 app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java                 |  121 +++++++++++-
 app/src/main/java/com/hdl/photovoltaic/ui/home/AutoSizeMyAAChart.java                |   32 +++
 app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java                 |   14 +
 app/src/main/res/layout/fragment_home_page.xml                                       |   27 +-
 app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/AAChartSymbolConst.java       |    2 
 app/build.gradle                                                                     |    3 
 app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java                     |    3 
 15 files changed, 364 insertions(+), 149 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index 56f9234..cd070c5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -30,7 +30,7 @@
         minSdk 23
         targetSdk 30
         versionCode 1
-        versionName "1.3.3"//鐗堟湰瑙勫垯1.3鏄骇鍝佸姛鑳借凯浠g敤鐨�,鏈�鍚庝竴浣�0鏄垜浠慨澶峛ug鐢ㄧ殑
+        versionName "1.4.0"//鐗堟湰瑙勫垯1.3鏄骇鍝佸姛鑳借凯浠g敤鐨�,鏈�鍚庝竴浣�0鏄垜浠慨澶峛ug鐢ㄧ殑
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         multiDexEnabled true
         manifestPlaceholders = mfph
@@ -180,7 +180,6 @@
     implementation 'cn.jiguang.sdk:jpush-google:5.2.2'
     //鍒嗘瀽鍜岀敤鎴锋爣绛剧瓑鍔熻兘(鍙�夛紝闆嗘垚鏋佸厜鍒嗘瀽SDK鍚庯紝鍗冲彲鏀寔琛屼负瑙﹀彂鎺ㄩ�佹秷鎭�佹帹閫佽浆鍖栫巼缁熻锛岀敤鎴疯涓哄垎)
     implementation 'cn.jiguang.sdk:joperate:2.0.2'
-
 
 
     //鑻ヤ笉闆嗘垚鍘傚晢閫氶亾锛屽彲鐩存帴璺宠繃浠ヤ笅渚濊禆
diff --git a/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java b/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java
index b26a8f9..ff043d6 100644
--- a/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java
+++ b/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java
@@ -1,6 +1,40 @@
 package com.hdl.photovoltaic.internet.api;
 
 public class TopicApi {
+
+
+    /*
+     *閫嗗彉鍣ㄧ儹鐐归厤缃�
+     * */
+    public static final String DELETING_GATEWAY_HOTSPOT_EDIT = "/user/%s/custom/hotspot/edit";
+    /*
+     *閫嗗彉鍣ㄧ儹鐐硅幏鍙�
+     * */
+    public static final String DELETING_GATEWAY_HOTSPOT_GET = "/user/%s/custom/hotspot/get";
+
+
+    /*
+     *閫嗗彉鍣╳if閰嶇疆
+     * */
+    public static final String DELETING_GATEWAY_WIFI_EDIT = "/user/%s/custom/wifi/edit";
+    /*
+     *閫嗗彉鍣╳ifi鑾峰彇
+     * */
+    public static final String DELETING_GATEWAY_WIFI_GET = "/user/%s/custom/wifi/get";
+
+    /*
+     *閫嗗彉鍣╳ifi鐘舵�侀�氱煡
+     * */
+    public static final String DELETING_GATEWAY_WIFI_NOTIFY = "/user/%s/custom/wifi/notify";
+    /*
+     *閫嗗彉鍣ㄤ互澶綉閰嶇疆
+     * */
+    public static final String DELETING_GATEWAY_ETHERNET_EDIT = "/user/%s/custom/ethernet/edit";
+    /*
+     *閫嗗彉鍣ㄤ互澶綉鑾峰彇
+     * */
+    public static final String DELETING_GATEWAY_ETHERNET_GET = "/user/%s/custom/ethernet/get";
+
     /*
      *閫氱煡鍒犻櫎骞堕��缃戝瓙璁惧鎷撴墤鍏崇郴
      *鍒犻櫎浠庣綉鍏�
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 0a1e88a..e398a95 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -1382,6 +1382,9 @@
     }
 
 
+
+
+
     /**
      * 鍒锋柊閫嗗彉鍣ㄧ紦瀛樹俊鎭�(鍖呮嫭璁剧疆mqtt绉橀挜锛�
      * 娉�:
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java
index 26259ec..ff3cde6 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java
@@ -1,6 +1,8 @@
 package com.hdl.photovoltaic.other;
 
 
+import android.util.LruCache;
+
 import com.google.gson.Gson;
 import com.hdl.photovoltaic.config.UserConfigManage;
 import com.hdl.photovoltaic.utils.TimeUtils;
@@ -15,6 +17,8 @@
 
     //榛樿鎵撳嵃鏍囬
     private static String logTitle = "鑷畾涔夎緭鍑烘墦鍗颁俊鎭�";
+
+    private static Gson gson = new Gson();
 
     /**
      * java鎵撳嵃
@@ -55,16 +59,18 @@
      * @param isAddToMemory 鏄惁鍔犲叆鍐呭瓨(鏈湴鏃ュ織鐢ㄥ埌)
      */
     private static void printBase(String msg, String code, boolean isAddToMemory) {
-        CustomLogObject customLogObject = new CustomLogObject();
-        customLogObject.msgOrData = msg;
-        customLogObject.code = code;
-        String json = logTitle + (UserConfigManage.getInstance().isBAccount() ? "(B绔�):" : "(C绔�):");
-        json += customLogObject.getJointMessage();
-        if (isPrintLogcat) {
-            System.out.println(json);
-        }
-        if (isAddToMemory) {
-            writeLog(customLogObject.getJointMessage());
+        try {
+            CustomLogObject customLogObject = new CustomLogObject();
+            customLogObject.setMsgOrData(msg);
+            customLogObject.setCode(code);
+            String json = logTitle + (UserConfigManage.getInstance().isBAccount() ? "(B绔�)==" : "(C绔�)==") + gson.toJson(customLogObject);
+            if (isPrintLogcat) {
+                System.out.println(json);
+            }
+            if (isAddToMemory) {
+                writeLog(json);
+            }
+        } catch (Exception ignored) {
         }
     }
 
@@ -95,19 +101,30 @@
      * 鑷畾涔夋棩蹇楃被
      */
     static class CustomLogObject {
+
         //淇℃伅鎻忚堪
-        public String msgOrData = "";
+        private String msgOrData;
+
         //鐘舵�佺爜
-        public String code = "0";
+        private String code;
 
-        public String getJointMessage() {
-
-            if ("0".equals(code)) {
-                return msgOrData;
-            }
-            return msgOrData + "(" + code + ")";
-
+        public String getMsgOrData() {
+            return msgOrData == null ? "" : msgOrData;
         }
+
+        public void setMsgOrData(String msgOrData) {
+            this.msgOrData = msgOrData;
+        }
+
+        public String getCode() {
+            return code == null ? "0" : code;
+        }
+
+        public void setCode(String code) {
+            this.code = code;
+        }
+
+
     }
 
 
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 d422b52..f764262 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -34,6 +34,7 @@
 import com.hdl.photovoltaic.config.UserConfigManage;
 import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpServer;
 import com.hdl.photovoltaic.internet.TcpClient;
+import com.hdl.photovoltaic.internet.api.HttpApi;
 import com.hdl.photovoltaic.internet.api.TopicApi;
 import com.hdl.photovoltaic.listener.CloudCallBeak;
 import com.hdl.photovoltaic.listener.LinkCallBack;
@@ -64,6 +65,7 @@
 import com.hdl.sdk.link.core.connect.HDLModBusConnect;
 import com.hdl.sdk.link.core.connect.HDLUdpConnect;
 import com.hdl.sdk.link.gateway.HDLLinkLocalGateway;
+import com.huawei.hms.api.Api;
 
 import org.greenrobot.eventbus.EventBus;
 import org.json.JSONObject;
@@ -90,6 +92,8 @@
  */
 public class HdlUniLogic implements HDLUniMPSDKManager.IOnOtherUniMPEventCallBack {
     private static volatile HdlUniLogic sHdlUniLogic;
+
+    public final static String separator="---";
 
     /**
      * 鑾峰彇褰撳墠瀵硅薄
@@ -127,8 +131,8 @@
             }
             String type = getKeyValue("type", data);//灏忕被
             String logTag = getKeyValue("logTag", data);//鏍囪uni鎸囦护
-            String mode_type = "澶х被->" + topic + "--->" + "灏忕被->" + type;//鐢ㄦ潵鎵撳嵃鐨�
-            HdlLogLogic.print(logTag + ":" + "uni--->鍙戦��--->" + mode_type + "\r\n" + data, true);
+            String mode_type = "澶х被-" + topic + "---" + "灏忕被-" + type;//鐢ㄦ潵鎵撳嵃鐨�
+            HdlLogLogic.print(logTag + ":" + "uni---鍙戦��---" + mode_type + "\r\n" + data, true);
             if (HDLUniMP.UNI_EVENT_REPLY_USER_MODEL.equals(topic)) {
                 //鐢ㄦ埛妯″潡
                 switch (type) {
@@ -280,37 +284,57 @@
                 WifiUtils wifiUtils = WifiUtils.getInstance();
                 //wifi妯″潡
                 switch (type) {
-                    //鑾峰彇wifi鍒楄〃
-                    case HDLUniMP.UNI_EVENT_REPLY_WIFI_LIST: {
+                    //鑾峰彇鎵嬫満wifi鍒楄〃
+                    case HDLUniMP.UNI_EVENT_REPLY_PHONE_WIFI_LIST: {
                         if (callback != null) {
                             uniCallbackData(mode_type, wifiUtils.getScanResult(), callback);
                         }
                     }
                     break;
-                    //褰撳墠wifi璇︽儏
-                    case HDLUniMP.UNI_EVENT_REPLY_WIFI_PHONE_INFO: {
+                    //鑾峰彇鎵嬫満褰撳墠wifi璇︽儏
+                    case HDLUniMP.UNI_EVENT_REPLY_PHONE_WIFI_INFO: {
                         if (callback != null) {
                             uniCallbackData(mode_type, wifiUtils.getCurrentConnectWifiInfo(), callback);
                         }
                     }
                     break;
-                    //閰嶇疆WiFi淇℃伅缁欓�嗗彉鍣�
-                    case HDLUniMP.UNI_EVENT_REPLY_WIFI_SET_DEVICE: {
-                        String mac = getKeyValue("mac", getKeyValue("data", data));//
-                        String wif_type = getKeyValue("wif_type", getKeyValue("data", data));//1锛氱儹鐐�,2锛氭棤绾縲ifi,3锛氫互澶綉
-                        String ssid = getKeyValue("ssid", getKeyValue("data", data));//
-                        String password = getKeyValue("password", getKeyValue("data", data));//
-                        startTcpThreadSendAccountAndPassword(mode_type, ssid, password, callback);
-
-                    }
-                    break;
                     //鎵撳紑鎵嬫満Wifi璁剧疆鐣岄潰
-                    case HDLUniMP.UNI_EVENT_REPLY_OPEN_WIFI_SETTINGS: {
+                    case HDLUniMP.UNI_EVENT_REPLY_PHONE_OPEN_WIFI_SETTINGS: {
                         Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
                         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                         HDLApp.getInstance().startActivity(intent);
                     }
+                    //閫嗗彉鍣╓iFi淇℃伅閰嶇疆
+                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_WIFI_SET: {
+                        uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_WIFI_EDIT, callback);
+                    }
                     break;
+                    //閫嗗彉鍣╓iFi淇℃伅鑾峰彇
+                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_WIFI_GET: {
+                        uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_WIFI_GET, callback);
+                    }
+                    break;
+                    //閫嗗彉鍣ㄧ儹鐐归厤缃�
+                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_HOTSPOT_SET: {
+                        uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_HOTSPOT_EDIT, callback);
+                    }
+                    break;
+                    //閫嗗彉鍣ㄧ儹鐐硅幏鍙�
+                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_HOTSPOT_GET: {
+                        uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_HOTSPOT_GET, callback);
+                    }
+                    break;
+                    //閫嗗彉鍣ㄤ互澶綉閰嶇疆
+                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_ETHERNET_SET: {
+                        uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_ETHERNET_EDIT, callback);
+                    }
+                    break;
+                    //閫嗗彉鍣ㄤ互澶綉鑾峰彇
+                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_ETHERNET_GET: {
+                        uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_ETHERNET_GET, callback);
+                    }
+                    break;
+
                 }
             } else if (HDLUniMP.UNI_EVENT_REPLY_OTA_MODEL.equals(topic)) {
                 //OTA鍗囩骇妯″潡
@@ -467,7 +491,7 @@
                     //涓撻棬鏀堕泦uni鏃ュ織
                     case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNI_LOG: {
                         String customizeContentFormat = getKeyValue("customizeContentFormat", getKeyValue("data", data));
-                        HdlLogLogic.print("uni--->log--->" + customizeContentFormat, true);
+                        HdlLogLogic.print("uni---log---" + customizeContentFormat, true);
 
                     }
                     break;
@@ -490,7 +514,7 @@
             }
 
         } catch (Exception e) {
-            HdlLogLogic.print("uni--->鍙戦��--->" + e.getMessage(), true);
+            HdlLogLogic.print("uni---鍙戦��---" + e.getMessage(), true);
         }
 
     }
@@ -505,7 +529,7 @@
     public void openUniMP(String path, JSONObject jsonObject) {
         JSONObject json = this.createdJSONObject(jsonObject, true);
         HDLUniMPSDKManager.getInstance().openUniMP(HDLUniMP.UNI_APP_ID, path, json, HdlUniLogic.this);
-        HdlLogLogic.print("uni--->缁勮uni鍙戦�佹暟鎹牸寮�--->" + json, false);
+        HdlLogLogic.print("uni---缁勮uni鍙戦�佹暟鎹牸寮�---" + json, false);
     }
 
     /**
@@ -519,7 +543,7 @@
         try {
             HDLUniMPSDKManager.getInstance().sendUniMPEvent(HDLUniMP.UNI_APP_ID, topic, getJSONObject(callBackBaseBean));
         } catch (Exception e) {
-            HdlLogLogic.print("uni--->鍘熺敓涓诲姩鍚戝皬绋嬪簭鍙戦�侀�氱煡浜嬩欢--->" + e.getMessage(), false);
+            HdlLogLogic.print("uni---鍘熺敓涓诲姩鍚戝皬绋嬪簭鍙戦�侀�氱煡浜嬩欢---" + e.getMessage(), false);
         }
     }
 
@@ -532,6 +556,41 @@
     //endregion
 
     //region ******uni鎺ュ彛鏂规硶******
+
+
+    /**
+     * 鑾峰彇鎴栬�呴厤缃�嗗彉鍣ㄧ綉缁滐紙鍖呮嫭閫嗗彉鍣ㄧ儹鐐癸紝wifi锛屼互澶綉锛変俊鎭�
+     */
+    private void uniGetAndSetNetwork(String type, Object data, String TopicApi, DCUniMPJSCallback callback) {
+        String mac = getKeyValue("mac", getKeyValue("data", data));
+        JsonObject jObject = null;
+        String attribute_data = getKeyValue("attribute_data", getKeyValue("data", data));
+        if (!TextUtils.isEmpty(attribute_data)) {
+            try {
+                jObject = new Gson().fromJson(attribute_data, JsonObject.class);
+            } catch (Exception ignored) {
+                jObject = new JsonObject();
+            }
+        }
+        //瑙e瘑璐熻浇鏁版嵁(鍐欏瘑閽ョ粰缃戝叧涓�瀹氭槸鏄庢枃锛屽洜涓洪偅鏃剁綉鍏宠繕娌℃湁瀵嗛挜)
+        TcpClient.getInstance().sendDataToLinkGateway(mac, false, TopicApi, jObject, "", new HDLLinkCallBack() {
+            @Override
+            public void onSuccess(String msg) {
+                if (callback != null) {
+                    uniCallbackData(type, msg, callback);
+                }
+
+            }
+
+            @Override
+            public void onError(HDLLinkException e) {
+                if (callback != null) {
+                    uniCallbackData(type, null, e.getCode(), e.getMsg(), callback);
+                }
+            }
+        });
+    }
+
 
     /**
      * 鑾峰彇浣嶇疆淇℃伅,鍖呮嫭缁忕含搴�
@@ -737,7 +796,7 @@
             @Override
             public void onSuccess(Boolean b) {
                 if (b) {
-                    HdlLogLogic.print("鏈湴鍗囩骇--->", true);
+                    HdlLogLogic.print("鏈湴鍗囩骇---", true);
                     //鏈湴
                     //1,寤虹珛鏈湴鏈嶅姟锛�
                     //2,鍛婅瘔缃戝叧鎵嬫満ip鍜岀鍙o紱
@@ -775,7 +834,7 @@
                         }
                     });
                 } else {
-                    HdlLogLogic.print("鍦ㄧ嚎鍗囩骇--->", true);
+                    HdlLogLogic.print("鍦ㄧ嚎鍗囩骇---", true);
                     //杩滅▼鍗囩骇闇�瑕佹娴嬪湪閫嗗彉鍣ㄦ湁娌℃湁杩炴帴涓婁簯
                     HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() {
                         @Override
@@ -814,7 +873,7 @@
 
             @Override
             public void onFailure(HDLException e) {
-                HdlLogLogic.print("鍦ㄧ嚎鍗囩骇--->", true);
+                HdlLogLogic.print("鍦ㄧ嚎鍗囩骇---", true);
                 //杩滅▼鍗囩骇闇�瑕佹娴嬪湪閫嗗彉鍣ㄦ湁娌℃湁杩炴帴涓婁簯
                 HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() {
                     @Override
@@ -989,7 +1048,7 @@
             @Override
             public void onSuccess(Boolean b) {
                 if (b) {
-                    HdlLogLogic.print("鏈湴鍗囩骇--->", true);
+                    HdlLogLogic.print("鏈湴鍗囩骇---", true);
                     //鏈湴
                     //1,寤虹珛鏈湴鏈嶅姟锛�
                     // 2锛屽憡璇夌綉鍏虫墜鏈篿p鍜岀鍙o紱
@@ -1027,7 +1086,7 @@
                         }
                     });
                 } else {
-                    HdlLogLogic.print("鍦ㄧ嚎鍗囩骇--->", true);
+                    HdlLogLogic.print("鍦ㄧ嚎鍗囩骇---", true);
                     //杩滅▼鍗囩骇闇�瑕併�愭娴嬨�戝湪閫嗗彉鍣ㄦ湁娌℃湁杩炴帴涓婁簯
                     HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() {
                         @Override
@@ -1066,7 +1125,7 @@
 
             @Override
             public void onFailure(HDLException e) {
-                HdlLogLogic.print("鍦ㄧ嚎鍗囩骇--->", true);
+                HdlLogLogic.print("鍦ㄧ嚎鍗囩骇---", true);
                 //杩滅▼鍗囩骇闇�瑕併�愭娴嬨�戝湪閫嗗彉鍣ㄦ湁娌℃湁杩炴帴涓婁簯
                 HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() {
                     @Override
@@ -1768,7 +1827,7 @@
         String tempData = getKeyValue("data", data);
         if (TextUtils.isEmpty(tempData)) {
             uniCallbackData(type, null, -2, "data鍐呭涓虹┖", callback);
-            //HdlLogLogic.print("data鍐呭涓虹┖--->", false);
+            //HdlLogLogic.print("data鍐呭涓虹┖---", false);
             return;
         }
         ModBusBean modBusBean = new Gson().fromJson(tempData, ModBusBean.class);
@@ -1780,24 +1839,24 @@
 //        }
         if (modBusBean.getMac() == null || modBusBean.getData() == null) {
             uniCallbackData(type, null, -2, "鍙戦�佸け璐�,(mac鎴栬�卭id)涓虹┖", callback);
-            //HdlLogLogic.print("uni--->鍙戦��--->ModBus--->鍙戦�佸け璐�,(mac鎴栬�卭id)涓虹┖." + Arrays.toString(modBusBean.getData()), true);
+            //HdlLogLogic.print("uni---鍙戦��---ModBus---鍙戦�佸け璐�,(mac鎴栬�卭id)涓虹┖." + Arrays.toString(modBusBean.getData()), true);
             return;
         }
 
-        //HdlLogLogic.print("uni--->鍙戦��--->ModBus--->" + Arrays.toString(modBusBean.getData()), true);
+        //HdlLogLogic.print("uni---鍙戦��---ModBus---" + Arrays.toString(modBusBean.getData()), true);
         //鍙戦�乵odbus鍗忚
         HDLModBusConnect.getInstance().Send(modBusBean.getMac(), modBusBean.getData(), new ModbusCallBack() {
             @Override
             public void onSuccess(int[] data) {
                 uniCallbackData(type, data, callback);
-//                HdlLogLogic.print("uni--->鎺ユ敹--->ModBus--->" + Arrays.toString(data), true);
+//                HdlLogLogic.print("uni---鎺ユ敹---ModBus---" + Arrays.toString(data), true);
 
             }
 
             @Override
             public void onError(HDLLinkException e) {
                 uniCallbackData(type, null, e.getCode(), e.getMsg(), callback);
-//                HdlLogLogic.print("uni--->鎺ユ敹--->ModBus--->" + e.getMsg() + "(" + e.getCode() + ")", true);
+//                HdlLogLogic.print("uni---鎺ユ敹---ModBus---" + e.getMsg() + "(" + e.getCode() + ")", true);
             }
         });
     }
@@ -1833,7 +1892,7 @@
             uniCallBackBaseBean.setData(data);
             return getJSONObject(uniCallBackBaseBean);
         } catch (Exception e) {
-            HdlLogLogic.print("uni--->缁勮鍙戦�佺粰uni鏁版嵁鏍煎紡鏈夊紓甯�--->" + e.getMessage(), false);
+            HdlLogLogic.print("uni---缁勮鍙戦�佺粰uni鏁版嵁鏍煎紡鏈夊紓甯�---" + e.getMessage(), false);
         }
         return new JSONObject();
     }
@@ -1858,10 +1917,10 @@
             if (callback != null) {
                 callback.invoke(getJSONObject(uniCallBackBaseBean));
 //                callback.invoke(uniCallBackBaseBean);
-                HdlLogLogic.print("uni--->鍥炲--->" + type + "--->" + new Gson().toJson(uniCallBackBaseBean), true);
+                HdlLogLogic.print("uni---鍥炲---" + type + "---" + new Gson().toJson(uniCallBackBaseBean), true);
             }
         } catch (Exception e) {
-            HdlLogLogic.print("uni--->鍥炲--->" + type + "--->" + e.getMessage(), true);
+            HdlLogLogic.print("uni---鍥炲---" + type + "---" + e.getMessage(), true);
         }
 
 
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 3e96dad..6d1618e 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
@@ -2,6 +2,9 @@
 
 import androidx.annotation.NonNull;
 import androidx.appcompat.content.res.AppCompatResources;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
 
 import android.Manifest;
 import android.content.Context;
@@ -38,6 +41,10 @@
 import com.hdl.photovoltaic.other.HdlUniLogic;
 import com.hdl.photovoltaic.ui.bean.DeviceRemoteInfo;
 import com.hdl.photovoltaic.ui.bean.OidBean;
+import com.hdl.photovoltaic.ui.home.HomePageFragment;
+import com.hdl.photovoltaic.ui.me.MeFragment;
+import com.hdl.photovoltaic.ui.message.MessageFragment;
+import com.hdl.photovoltaic.ui.powerstation.HouseListFragment;
 import com.hdl.photovoltaic.uni.HDLUniMP;
 import com.hdl.photovoltaic.utils.AppManagerUtils;
 import com.hdl.photovoltaic.utils.GPSManagerUtils;
@@ -59,6 +66,7 @@
 import org.greenrobot.eventbus.ThreadMode;
 
 import java.lang.reflect.Type;
+import java.util.ArrayList;
 import java.util.List;
 
 import cn.jpush.android.api.JPushInterface;
@@ -69,9 +77,13 @@
  */
 public class BPowerStationActivity extends CustomBaseActivity {
 
+    private static final String CURRENT_FRAGMENT = "state_fragment_show";
+    private FragmentManager mFragmentManager;
+    private Fragment currentFragment = new Fragment();
+    private final List<Fragment> fragmentList = new ArrayList<>();
+    private int currentFragmentIndex = 0;
 
     private ActivityMyPowerStationBinding viewBinding;
-    private int currentFragmentIndex = 0;
     private EventListener allTopicsListener;
     private int backPressTimes;
 
@@ -85,6 +97,8 @@
     public void onBindView(Bundle savedInstanceState) {
 //        setNotificationBarBackgroundColor(CustomColor.blue);
         setStatusBarTranslucent();
+        //鍒濆鍖栫鐗�
+        initFragment(savedInstanceState);
         //鍒濆鍖�
         this.initView();
         //鍒濆鍖栫晫闈㈢洃鍚櫒
@@ -99,6 +113,79 @@
         this.clickJpushNotificationMessage();
         //鍒濆鍖栨潈闄�
         this.requestPermissions();
+
+    }
+
+
+    /**
+     * 鍒濆鍖朏ragment
+     *
+     * @param savedInstanceState -
+     */
+    private void initFragment(Bundle savedInstanceState) {
+        mFragmentManager = getSupportFragmentManager();
+        //纰庣墖鍒濆鍖�
+        HomePageFragment mHomePageFragment = new HomePageFragment();
+        HouseListFragment mHouseListFragment = new HouseListFragment();
+        MessageFragment mMessageFragment = new MessageFragment();
+        MeFragment mMeFragment = new MeFragment();
+        if (savedInstanceState != null) {
+            //鈥滃唴瀛橀噸鍚�濇椂璋冪敤 鑾峰彇鈥滃唴瀛橀噸鍚�濇椂淇濆瓨鐨勭储寮曚笅鏍�
+            currentFragmentIndex = savedInstanceState.getInt(CURRENT_FRAGMENT, 0);
+            if (fragmentList.size() != 0) {
+                fragmentList.clear();
+            }
+            fragmentList.add(mFragmentManager.findFragmentByTag(0 + ""));
+            fragmentList.add(mFragmentManager.findFragmentByTag(1 + ""));
+            fragmentList.add(mFragmentManager.findFragmentByTag(2 + ""));
+            fragmentList.add(mFragmentManager.findFragmentByTag(3 + ""));
+            restoreFragment();//鎭㈠fragment椤甸潰
+        } else {
+            //姝e父鍚姩鏃惰皟鐢�
+            fragmentList.add(mHomePageFragment);
+            fragmentList.add(mHouseListFragment);
+            fragmentList.add(mMessageFragment);
+            fragmentList.add(mMeFragment);
+            showFragment();
+        }
+
+    }
+
+
+    /**
+     * 浣跨敤show() hide()鍒囨崲椤甸潰
+     * 鏄剧ずfragment
+     */
+    private void showFragment() {
+        FragmentTransaction ft = mFragmentManager.beginTransaction();
+        //濡傛灉涔嬪墠娌℃湁娣诲姞杩�
+        if (!fragmentList.get(currentFragmentIndex).isAdded()) {
+            //绗笁涓弬鏁颁负娣诲姞褰撳墠鐨刦ragment鏃剁粦瀹氫竴涓猼ag
+            ft.hide(currentFragment).add(R.id.module_fcv, fragmentList.get(currentFragmentIndex), currentFragmentIndex + "");
+        } else {
+            ft.hide(currentFragment).show(fragmentList.get(currentFragmentIndex));
+        }
+        currentFragment = fragmentList.get(currentFragmentIndex);
+        ft.commit();
+        //鎶婂綋鍓嶆樉绀虹殑fragment璁板綍涓嬫潵
+        currentFragment = fragmentList.get(currentFragmentIndex);
+
+
+    }
+
+    /**
+     * 鎭㈠fragment
+     */
+    private void restoreFragment() {
+        FragmentTransaction ft = mFragmentManager.beginTransaction();
+        for (int i = 0; i < fragmentList.size(); i++) {
+            if (i == currentFragmentIndex) {
+                ft.show(fragmentList.get(i));
+            } else {
+                ft.hide(fragmentList.get(i));
+            }
+        }
+        ft.commit();
 
     }
 
@@ -213,6 +300,7 @@
                 }
                 currentFragmentIndex = 0;
                 bottomViewChangeOfStyle();
+                showFragment();
                 postEventBus(HomepageTitleTabSwitch.homepage);
             }
         });
@@ -224,6 +312,7 @@
                 }
                 currentFragmentIndex = 1;
                 bottomViewChangeOfStyle();
+                showFragment();
                 postEventBus(HomepageTitleTabSwitch.powerstation);
             }
         });
@@ -235,6 +324,7 @@
                 }
                 currentFragmentIndex = 2;
                 bottomViewChangeOfStyle();
+                showFragment();
                 postEventBus(HomepageTitleTabSwitch.message);
             }
         });
@@ -246,6 +336,7 @@
                 }
                 currentFragmentIndex = 3;
                 bottomViewChangeOfStyle();
+                showFragment();
                 postEventBus(HomepageTitleTabSwitch.me);
             }
         });
@@ -272,10 +363,7 @@
 
     private void bottomViewChangeOfStyle() {
         if (this.currentFragmentIndex == 0) {
-            viewBinding.myHomePageFcv0.setVisibility(View.VISIBLE);//鏄剧ず棣栭〉鐣岄潰
-            viewBinding.myPowerStationFcv1.setVisibility(View.GONE);//鏄剧ず鐢电珯鐣岄潰
-            viewBinding.myMessageFcv2.setVisibility(View.GONE);//闅愯棌娑堟伅鐣岄潰
-            viewBinding.myMeFcv3.setVisibility(View.GONE);//闅愯棌鎴戠殑鐣岄潰
+            //棣栭〉鐣岄潰
             viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_selected));
             viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_90000000));
             viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected));
@@ -285,10 +373,7 @@
             viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected));
             viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000));
         } else if (this.currentFragmentIndex == 1) {
-            viewBinding.myHomePageFcv0.setVisibility(View.GONE);//闅愯棌棣栭〉鐣岄潰
-            viewBinding.myPowerStationFcv1.setVisibility(View.VISIBLE);//鏄剧ず鐢电珯鐣岄潰
-            viewBinding.myMessageFcv2.setVisibility(View.GONE);//闅愯棌娑堟伅鐣岄潰
-            viewBinding.myMeFcv3.setVisibility(View.GONE);//闅愯棌鎴戠殑鐣岄潰
+            //鐢电珯鐣岄潰
             viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected));
             viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000));
             viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_selected));
@@ -298,10 +383,7 @@
             viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected));
             viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000));
         } else if (this.currentFragmentIndex == 2) {
-            viewBinding.myHomePageFcv0.setVisibility(View.GONE);//闅愯棌棣栭〉鐣岄潰
-            viewBinding.myPowerStationFcv1.setVisibility(View.GONE);//闅愯棌鐢电珯鐣岄潰
-            viewBinding.myMessageFcv2.setVisibility(View.VISIBLE);//鏄剧ず娑堟伅鐣岄潰
-            viewBinding.myMeFcv3.setVisibility(View.GONE);//闅愯棌鎴戠殑鐣岄潰
+            //娑堟伅鐣岄潰
             viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected));
             viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000));
             viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected));
@@ -311,10 +393,7 @@
             viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected));
             viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000));
         } else if (this.currentFragmentIndex == 3) {
-            viewBinding.myHomePageFcv0.setVisibility(View.GONE);//闅愯棌棣栭〉鐣岄潰
-            viewBinding.myPowerStationFcv1.setVisibility(View.GONE);//闅愯棌鐢电珯鐣岄潰
-            viewBinding.myMessageFcv2.setVisibility(View.GONE);//闅愯棌娑堟伅鐣岄潰
-            viewBinding.myMeFcv3.setVisibility(View.VISIBLE);//鏄剧ず鎴戠殑鐣岄潰
+            //鎴戠殑鐣岄潰
             viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected));
             viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000));
             viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected));
@@ -433,6 +512,13 @@
                         }
 
 
+                    } else if (linkResponse.getTopic().endsWith("custom/wifi/notify")) {
+                        //閫嗗彉鍣ㄨ繛鎺ヨ矾鐢辩姸鎬侀�氱煡
+                        HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
+                        uniCallBackBaseBean.setType(linkResponse.getTopic());
+                        uniCallBackBaseBean.setData(linkResponse.getData());
+                        HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
+                        HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true);
                     }
                 }
             }
@@ -649,4 +735,5 @@
         }
     }
 
+
 }
\ No newline at end of file
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java
index b0ade16..a448287 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java
@@ -17,6 +17,8 @@
 
 import java.util.List;
 
+
+
 /**
  * App鍚姩椤碉紙鐩殑鏄负浜嗚鐢ㄦ埛鐐瑰嚮APP鍥炬爣鐨勬椂鍊欐湁涓�涓灛闂村搷搴旂殑浜や簰浣撻獙銆傦級
  */
@@ -74,6 +76,8 @@
             intent.setClass(this, LoginActivity.class);
             openActivity(intent);
         }
+
+
     }
 
     @Override
@@ -92,4 +96,7 @@
         super.onDestroy();
         overridePendingTransition(0, 0);
     }
+
+
+
 }
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/home/AutoSizeMyAAChart.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/AutoSizeMyAAChart.java
new file mode 100644
index 0000000..05472ca
--- /dev/null
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/AutoSizeMyAAChart.java
@@ -0,0 +1,32 @@
+package com.hdl.photovoltaic.ui.home;
+
+import android.app.Activity;
+import android.content.Context;
+import android.util.AttributeSet;
+
+import com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView;
+
+import me.jessyan.autosize.AutoSize;
+
+public class AutoSizeMyAAChart extends AAChartView {
+
+    public AutoSizeMyAAChart(Context context) {
+        super(context);
+    }
+
+    public AutoSizeMyAAChart(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public AutoSizeMyAAChart(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+    }
+
+    @Override
+    public void setOverScrollMode(int mode) {
+        super.setOverScrollMode(mode);
+        //鍥捐〃灞忓箷閫傞厤
+        AutoSize.autoConvertDensityOfGlobal((Activity) getContext());
+
+    }
+}
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java
index 58309c2..398b0ad 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java
@@ -1,7 +1,7 @@
 package com.hdl.photovoltaic.ui.home;
 
 
-import static com.hdl.photovoltaic.ui.powerstation.aachart.CustomStyleChartComposer.configureColorfulColumnChart;
+import static com.hdl.photovoltaic.ui.home.aachart.CustomStyleChartComposer.configureColorfulColumnChart;
 
 import android.os.Bundle;
 import android.text.TextUtils;
@@ -33,7 +33,7 @@
 import com.hdl.photovoltaic.ui.bean.DataOverBean;
 import com.hdl.photovoltaic.ui.bean.SocialContributionBean;
 import com.hdl.photovoltaic.ui.bean.StatisticsBean;
-import com.hdl.photovoltaic.ui.powerstation.aachart.BasicChartComposer;
+import com.hdl.photovoltaic.ui.home.aachart.BasicChartComposer;
 import com.hdl.photovoltaic.utils.TimeUtils;
 import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
 
@@ -54,7 +54,7 @@
 
     FragmentHomePageBinding viewBinding;
 
-    AAChartView aaChartView;
+    AutoSizeMyAAChart aaChartView;
 
     AAChartModel aaChartModel;
 
@@ -74,14 +74,15 @@
 
     @Override
     public void onBindView(Bundle savedInstanceState) {
+
         //鍒濆鍖�
         initView();
         //鍒濆鍖栫晫闈㈢洃鍚櫒
         initEvent();
         //璇诲彇鏁版嵁
         readDate();
-
     }
+
 
     /**
      * 璇诲彇鏁版嵁
@@ -275,6 +276,8 @@
                 readDate();
             }
         });
+
+
     }
 
     /**
@@ -338,7 +341,7 @@
      * 鍥捐〃鍔犺浇
      */
     private void setUpAAChartView() {
-        aaChartView = viewBinding.AAChartView;
+        aaChartView = viewBinding.autoSizeMyAAChart;
         aaChartView.callBack = this;
         if (TimeType.day.equals(timeType)) {
             aaChartModel = BasicChartComposer.configureAreaChart("Pv鍙戠數鍔熺巼", fieldNames, fieldValues);
@@ -348,6 +351,7 @@
             aaChartModel = configureColorfulColumnChart("Pv鍙戠數鍔熺巼", fieldNames, fieldValues);
         }
         aaChartView.aa_drawChartWithChartModel(aaChartModel);
+
     }
 
     private void initView() {
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/AAChartSymbolConst.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/AAChartSymbolConst.java
similarity index 98%
rename from app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/AAChartSymbolConst.java
rename to app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/AAChartSymbolConst.java
index 8018af9..2fbca49 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/AAChartSymbolConst.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/AAChartSymbolConst.java
@@ -1,4 +1,4 @@
-package com.hdl.photovoltaic.ui.powerstation.aachart;
+package com.hdl.photovoltaic.ui.home.aachart;
 
 import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolType;
 
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/BasicChartComposer.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java
similarity index 98%
rename from app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/BasicChartComposer.java
rename to app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java
index 2c53e76..67d941a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/BasicChartComposer.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java
@@ -1,4 +1,4 @@
-package com.hdl.photovoltaic.ui.powerstation.aachart;
+package com.hdl.photovoltaic.ui.home.aachart;
 
 import static com.github.AAChartModel.AAChartCore.AATools.AAColor.AARgba;
 
@@ -8,6 +8,7 @@
 import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolStyleType;
 import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolType;
 import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartType;
+import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartZoomType;
 import com.github.AAChartModel.AAChartCore.AAOptionsModel.AAStyle;
 import com.github.AAChartModel.AAChartCore.AATools.AAColor;
 import com.github.AAChartModel.AAChartCore.AATools.AAGradientColor;
@@ -94,6 +95,7 @@
 //                .markerSymbolStyle(AAChartSymbolStyleType.Normal)
                 .chartType(AAChartType.Area)
                 .categories(categories)
+//                .zoomType(AAChartZoomType.None)//鎵嬪娍缂╂斁
 //                .yAxisMax(500)
                 .yAxisMin(0)
                 .series(new AASeriesElement[]{element1});
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/CustomStyleChartComposer.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/CustomStyleChartComposer.java
similarity index 99%
rename from app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/CustomStyleChartComposer.java
rename to app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/CustomStyleChartComposer.java
index 3dfc464..102353a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/CustomStyleChartComposer.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/CustomStyleChartComposer.java
@@ -1,10 +1,6 @@
-package com.hdl.photovoltaic.ui.powerstation.aachart;
+package com.hdl.photovoltaic.ui.home.aachart;
 
 import static com.github.AAChartModel.AAChartCore.AATools.AAColor.AARgba;
-import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.base64Symbol;
-import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.imageSymbol;
-import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.predefinedSymbol1;
-import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.predefinedSymbol2;
 
 import com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartModel;
 import com.github.AAChartModel.AAChartCore.AAChartCreator.AASeriesElement;
@@ -444,25 +440,25 @@
                 .name("Predefined symbol")
                 .data(new Object[]{0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36})
                 .marker(new AAMarker()
-                        .symbol(predefinedSymbol1));
+                        .symbol(AAChartSymbolConst.predefinedSymbol1));
 
         AASeriesElement element2 = new AASeriesElement()
                 .name("Image symbol")
                 .data(new Object[]{0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67})
                 .marker(new AAMarker()
-                        .symbol(imageSymbol));
+                        .symbol(AAChartSymbolConst.imageSymbol));
 
         AASeriesElement element3 = new AASeriesElement()
                 .name("Base64 symbol (*)")
                 .data(new Object[]{0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64})
                 .marker(new AAMarker()
-                        .symbol(base64Symbol));
+                        .symbol(AAChartSymbolConst.base64Symbol));
 
         AASeriesElement element4 = new AASeriesElement()
                 .name("Custom symbol")
                 .data(new Object[]{0.60, 0.51, 0.52, 0.53, 0.64, 0.84, 0.65, 0.68, 0.63, 0.47, 0.72, 0.60, 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53})
                 .marker(new AAMarker()
-                        .symbol(predefinedSymbol2));
+                        .symbol(AAChartSymbolConst.predefinedSymbol2));
 
         return new AAChartModel()
                 .chartType(AAChartType.Scatter)
diff --git a/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
index f08827d..dfe7121 100644
--- a/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
+++ b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
@@ -95,12 +95,18 @@
     public final static String UNI_EVENT_REPLY_MINE_SETTING = "setting";//璁剧疆
 
 
-    /*********Wifi妯″潡*********/ //鍗敠瀹氫箟
+    /*********Wifi妯″潡*********/
     public final static String UNI_EVENT_REPLY_WIFI_MODEL = "uni_wifi_model";//wifi妯″潡(澶х被)
-    public final static String UNI_EVENT_REPLY_WIFI_LIST = "list";//鑾峰彇wifi鍒楄〃
-    public final static String UNI_EVENT_REPLY_WIFI_PHONE_INFO = "wifi_phone_info";//鑾峰彇褰撳墠wifi淇℃伅
-    public final static String UNI_EVENT_REPLY_WIFI_SET_DEVICE = "wifi_set_device";//璁剧疆wifi缁欒澶�
-    public final static String UNI_EVENT_REPLY_OPEN_WIFI_SETTINGS = "open_wifi_settings";//璋冪敤鎵撳紑鎵嬫満Wifi璁剧疆鐣岄潰
+    public final static String UNI_EVENT_REPLY_PHONE_WIFI_LIST = "phone_wifi_list";//鎵嬫満鑾峰彇wifi鍒楄〃
+    public final static String UNI_EVENT_REPLY_PHONE_WIFI_INFO = "phone_wifi_info";//鎵嬫満鑾峰彇褰撳墠wifi淇℃伅
+    public final static String UNI_EVENT_REPLY_PHONE_OPEN_WIFI_SETTINGS = "phone_open_wifi_settings";//璋冪敤鎵撳紑鎵嬫満Wifi璁剧疆鐣岄潰
+    public final static String UNI_EVENT_REPLY_DEVICE_WIFI_SET = "device_wifi_set";//閫嗗彉鍣╓iFi淇℃伅閰嶇疆
+    public final static String UNI_EVENT_REPLY_DEVICE_WIFI_GET = "device_wifi_get";//閫嗗彉鍣╓iFi淇℃伅鑾峰彇
+    public final static String UNI_EVENT_REPLY_DEVICE_HOTSPOT_SET = "device_hotspot_set";//閫嗗彉鍣ㄧ儹鐐归厤缃�
+    public final static String UNI_EVENT_REPLY_DEVICE_HOTSPOT_GET = "device_hotspot_get";//閫嗗彉鍣ㄧ儹鐐硅幏鍙�
+    public final static String UNI_EVENT_REPLY_DEVICE_ETHERNET_SET = "device_ethernet_set";//閫嗗彉鍣ㄤ互澶綉閰嶇疆
+    public final static String UNI_EVENT_REPLY_DEVICE_ETHERNET_GET = "device_ethernet_get";//閫嗗彉鍣ㄤ互澶綉鑾峰彇
+
     //endregion
 
     //region --------銆愬師鐢熴�戜富鍔ㄥ彂閫佸埌銆愬皬绋嬪簭銆�--------
@@ -114,6 +120,7 @@
     public final static String UNI_EVENT_NOTIFICATION_DEVICE_ADD = "add";//璁惧娣诲姞
     public final static String UNI_EVENT_NOTIFICATION_DEVICE_DEL = "del";//璁惧鍒犻櫎
     public final static String UNI_EVENT_NOTIFICATION_DEVICE_OID = "oid";//璁惧銆愬寘鎷笅鎸傝澶囥�憃id鍒楄〃Remove interface
+    public final static String UNI_EVENT_NOTIFICATION_DEVICE_CONNECTION_STATUS = "connection_status";//閫嗗彉鍣ㄨ繛鎺ヨ矾鐢卞櫒鐘舵��
     //endregion
 
     //region --------銆愬師鐢熴�戞墦寮�銆愬皬绋嬪簭銆�--------
diff --git a/app/src/main/res/layout/activity_my_power_station.xml b/app/src/main/res/layout/activity_my_power_station.xml
index dbfaefd..20a2b11 100644
--- a/app/src/main/res/layout/activity_my_power_station.xml
+++ b/app/src/main/res/layout/activity_my_power_station.xml
@@ -7,51 +7,16 @@
     android:background="@drawable/bj"
     tools:context="com.hdl.photovoltaic.ui.BPowerStationActivity">
 
-    <!--棣栭〉-Fragment-->
+    <!--锛堥椤�-鐢电珯-娑堟伅-鎴戠殑锛�-Fragment-->
     <androidx.fragment.app.FragmentContainerView
+        android:id="@+id/module_fcv"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
-        android:id="@+id/my_home_page_fcv0"
-        android:name="com.hdl.photovoltaic.ui.home.HomePageFragment"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-    <!--鐢电珯-Fragment-->
-    <androidx.fragment.app.FragmentContainerView
-        android:id="@+id/my_power_station_fcv1"
-        android:name="com.hdl.photovoltaic.ui.powerstation.HouseListFragment"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-    <!--鎶ヨ-Fragment-->
-    <androidx.fragment.app.FragmentContainerView
-        android:id="@+id/my_message_fcv2"
-        android:name="com.hdl.photovoltaic.ui.message.MessageFragment"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-    <!--鎴戠殑-Fragment-->
-    <androidx.fragment.app.FragmentContainerView
-        android:id="@+id/my_me_fcv3"
-        android:name="com.hdl.photovoltaic.ui.me.MeFragment"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
 
     <LinearLayout
         android:id="@+id/my_power_station_bottom_ll"
diff --git a/app/src/main/res/layout/fragment_home_page.xml b/app/src/main/res/layout/fragment_home_page.xml
index 998fe5f..8436240 100644
--- a/app/src/main/res/layout/fragment_home_page.xml
+++ b/app/src/main/res/layout/fragment_home_page.xml
@@ -29,7 +29,7 @@
 
     <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
         android:id="@+id/srl"
-        android:layout_width="0dp"
+        android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_marginTop="@dimen/dp_26"
         app:layout_constraintBottom_toBottomOf="parent"
@@ -39,13 +39,9 @@
 
         <ScrollView
             android:id="@+id/sl"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:layout_marginTop="@dimen/dp_26"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/home_page_title_tv">
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="@dimen/dp_26">
 
             <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
@@ -349,7 +345,7 @@
 
                     </RelativeLayout>
                 </androidx.constraintlayout.widget.ConstraintLayout>
-
+                <!--鏃ユ湡-->
                 <androidx.constraintlayout.widget.ConstraintLayout
                     android:id="@+id/home_page_station_data_cl"
                     android:layout_width="match_parent"
@@ -547,14 +543,21 @@
 
                     </RelativeLayout>
 
-                    <com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView
-                        android:id="@+id/AAChartView"
+                    <FrameLayout
                         android:layout_width="0dp"
                         android:layout_height="284dp"
                         android:layout_marginTop="@dimen/dp_18"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toStartOf="parent"
-                        app:layout_constraintTop_toBottomOf="@+id/chart_title_rl" />
+                        app:layout_constraintTop_toBottomOf="@+id/chart_title_rl">
+
+                        <com.hdl.photovoltaic.ui.home.AutoSizeMyAAChart
+                            android:id="@+id/autoSizeMyAAChart"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+
+                            />
+                    </FrameLayout>
                 </androidx.constraintlayout.widget.ConstraintLayout>
 
                 <androidx.constraintlayout.widget.ConstraintLayout

--
Gitblit v1.8.0