From 34d49c20c2c2543658e844847c5eaa87f4c954e9 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 23 二月 2021 17:28:40 +0800
Subject: [PATCH] Merge branch 'temp-wxr' into NewFilePath

---
 HDL_ON/Common/ApiUtlis.cs |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index a54fab4..605a3b4 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -46,7 +46,7 @@
         public bool GatewayOnlineVerification()
         {
             bool result = DB_ResidenceData.Instance.HomeGateway.gatewayStatus;
-
+            DriverLayer.Control.Ins.GatewayOnline_Cloud = result;
             if (!result)
             {
 
@@ -161,6 +161,7 @@
                         }
                         if (FunctionList.List.GetDeviceFunctionList().Count > 0)
                         {
+
                             for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                             {
                                 var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
@@ -178,19 +179,23 @@
                                 {
                                     MainPage.Log($"deviceType:{localFunction.spk} local:{localFunction.modifyTime} server:{newFunction.modifyTime}");
                                     i++;
-                                    if (localFunction.modifyTime != newFunction.modifyTime)
-                                    {
-                                        //鍙紭鍖�
-                                        localFunction.name = newFunction.name;
-                                        localFunction.collect = newFunction.collect;
-                                        localFunction.modifyTime = newFunction.modifyTime;
-                                        localFunction.roomIds = newFunction.roomIds;
-                                        localFunction.bus = newFunction.bus;
-                                        localFunction.SaveFunctionFile();
-                                    }
+                                    //if (localFunction.modifyTime != newFunction.modifyTime)
+                                    //{
+                                    //    //鍙紭鍖�
+                                    //    localFunction.name = newFunction.name;
+                                    //    localFunction.collect = newFunction.collect;
+                                    //    localFunction.modifyTime = newFunction.modifyTime;
+                                    //    localFunction.roomIds = newFunction.roomIds;
+                                    //    localFunction.bus = newFunction.bus;
+                                    //    localFunction.SaveFunctionFile();
+                                    //}
+                                    localFunction = newFunction;
+                                    localFunction.SaveFunctionFile();
                                     deviceList.list.Remove(newFunction);//鎿嶄綔瀹岀殑鏁版嵁娓呯悊鎺夛紝鍓╀笅鐨勫氨鏄柊澧炵殑鍔熻兘
                                 }
                             }
+
+
                         }
                         //澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
                         foreach (var newFunction in deviceList.list)
@@ -301,6 +306,10 @@
                         waitPage.Hide();
                         waitPage.RemoveFromParent();
                     });
+                    //涓嶈�冭檻缃戝叧鎯呭喌锛岀洿鎺ヨ闃�
+                    DAL.Mqtt.MqttClient.InitState();
+
+                    FunctionList.List.Read3tyFunctionStatus();
                 }
             });
             downloadDataThread.IsBackground = true;

--
Gitblit v1.8.0