From fdbcb1f7463cb766f90bd29dd715485ba9d88524 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 06 九月 2023 17:55:03 +0800 Subject: [PATCH] Merge branch 'wxr-2.0' into Dev-Branch --- HDL_ON/DAL/DriverLayer/Control.cs | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index c95823d..6955fab 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -732,8 +732,18 @@ } else { - var pm = new DAL.Server.HttpServerRequest(); - var pack = pm.RefreshDeviceStatus(new List<string>() { function.deviceId }); + var pm = new HttpServerRequest(); + try + { + pm.RefreshDeviceStatus(new List<string>() { function.deviceId }); + }catch(Exception ex) + { + MainPage.Log($"杩滅▼璇诲彇璁惧鐘舵�佸紓甯�:{ex.Message}"); + } + finally + { + pm = null; + } } } } @@ -870,7 +880,7 @@ }, time_stamp = Utlis.GetTimestamp() }; - var aLinkJson = Newtonsoft.Json.JsonConvert.SerializeObject(aLinkData); + var aLinkJson = JsonConvert.SerializeObject(aLinkData); var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlScene, aLinkJson); new Control_Udp().SendLocalHdlLinkData(sendBytes, aLinkData.id, 0); } @@ -1312,16 +1322,6 @@ } MainPage.Log(localFunction.name); - if (Ins.GatewayOnline_Local && isCloudData)//鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞� - { - if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk) && !SPK.MusicSpkList().Contains(localFunction.spk)) - { - //MainPage.Log($"A鍗忚鏇存柊鐘舵��:鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�........"); - - return; - } - } - //if (SPK.MusicSpkList().Contains(localFunction.spk)) //{ // if (updateTemp.status.Count < 3) @@ -1342,6 +1342,11 @@ { localFunction.online = updateTemp.online; } + if (SPK.LightSpkList().Contains(localFunction.spk)) + { + localFunction.updateTime = DateTime.Now; + } + //鏇存柊鐣岄潰鐘舵�� switch (localFunction.spk) @@ -1606,6 +1611,7 @@ break; } + HomePage.UpdataFunctionStates(localFunction); RoomPage.UpdataStates(localFunction); FunctionPage.UpdataStates(localFunction); -- Gitblit v1.8.0