From 48c07e0a371f67b97abc7c2e61d7f23d060324fc Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 28 一月 2021 18:24:53 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into NewFilePath

---
 HDL_ON/DAL/DriverLayer/Control.cs |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
old mode 100644
new mode 100755
index 84a426e..089f706
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -279,8 +279,9 @@
         /// </summary>
         /// <param name="commandString"></param>
         /// <param name="function"></param>
+        /// <param name="useRemote">鏄惁鐩存帴浣跨敤杩滅▼鍙戦��</param>
         /// <returns></returns>
-        public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary)
+        public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false)
         {
             function.controlCounter++;
             function.refreshTime = DateTime.Now;
@@ -310,7 +311,7 @@
             MainPage.Log($"鍙戦�佹暟鎹�:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}");
 
             //杩滅▼閫氳
-            if (Ins.IsRemote)
+            if (Ins.IsRemote || useRemote == true)
             {
                 DAL.Server.HttpServerRequest httpServer = new DAL.Server.HttpServerRequest();
                 //ALink鎺у埗銆丅us鎺у埗浣跨敤鍚屼竴涓帴鍙f帶鍒讹紝鐢变簯绔礋璐hВ鏋�
@@ -875,14 +876,27 @@
                                     }
                                     break;
                                 case SPK.ElectricTV:
+                                    break;
+                                case SPK.ElectricTuyaAirCleaner:
+                                case SPK.ElectricTuyaFan:
+                                case SPK.ElectricTuyaWeepRobot:
+                                    //璁惧鐘舵�佹帹閫�
+                                    var myDevice = Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp);
+                                    if (myDevice != null)
+                                    {
+                                        localObj = myDevice;
+                                    }
                                     break;
                                 default:
                                     break;
                             }
-                            HomePage.UpdataFunctionStates(localObj);
-                            RoomPage.UpdataStates(localObj);
-                            FunctionPage.UpdataStates(localObj);
-                            ClassificationPage.UpdataInfo(localObj);
+                            if (localObj != null)
+                            {
+                                HomePage.UpdataFunctionStates(localObj);
+                                RoomPage.UpdataStates(localObj);
+                                FunctionPage.UpdataStates(localObj);
+                                ClassificationPage.UpdataInfo(localObj);
+                            }
                         }
                     }
                     catch (Exception ex)

--
Gitblit v1.8.0