From ff0746d00d918bd6babf97eac649ae561711fd0c Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 02 二月 2021 16:55:59 +0800 Subject: [PATCH] 英文优化,涂鸦设备优化 --- HDL_ON/DAL/DriverLayer/Control.cs | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index f134d15..f03e0da 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -381,6 +381,34 @@ var pm = new DAL.Server.HttpServerRequest(); var pack = pm.RefreshDeviceStatus(functionIds); } + /// <summary> + /// 璇诲彇鍔熻兘璇︾粏鏁版嵁 + /// </summary> + /// <param name="functionIds"></param> + public void ReadFunctionsInfo(List<string> functionIds) + { + var pm = new DAL.Server.HttpServerRequest(); + var pack = pm.GetDeviceInfoList(functionIds); + if(pack!= null&& pack.Data!=null) + { + var ddd = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Function>>(pack.Data.ToString()); + if(ddd!= null) + { + foreach(var function in ddd) + { + var temp = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.deviceId == function.deviceId); + if(temp!= null) + { + temp = function; + if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(temp.spk)) + { + Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(temp.sid, temp.status); + } + } + } + } + } + } /// <summary> /// 鍙戦�佽鍙栧懡浠� @@ -882,7 +910,7 @@ case SPK.ElectricTuyaWeepRobot: case SPK.ElectricTuyaWaterValve: //璁惧鐘舵�佹帹閫� - var myDevice = Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp); + var myDevice = Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid,updateTemp.status); if (myDevice != null) { localObj = myDevice; -- Gitblit v1.8.0