From 8983da138cb92e35b0bbeaece1cf1c454a5a79d4 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 01 十二月 2020 16:31:28 +0800 Subject: [PATCH] 20201201 --- HDL_ON/Entity/DB_ResidenceData.cs | 33 +++++++++++++++------------------ 1 files changed, 15 insertions(+), 18 deletions(-) diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs index 755e721..b5def69 100644 --- a/HDL_ON/Entity/DB_ResidenceData.cs +++ b/HDL_ON/Entity/DB_ResidenceData.cs @@ -1,7 +1,5 @@ 锘縰sing System; using System.Collections.Generic; -using HDL_ON.DAL; -using HDL_ON.DAL.Net; using Shared; namespace HDL_ON.Entity @@ -34,11 +32,6 @@ else { var curRegion = UserInfo.Current.regionList.Find((obj) => obj.RegionID == CurReginID); - //if (curRegion == null) - //{ - // CurReginID = UserInfo.Current.regionList[0].RegionID; - // return UserInfo.Current.regionList[0]; - //} return curRegion; } } @@ -99,15 +92,14 @@ { sid = "030101123456780202010005ABCD", name = "鐏厜1", - function = new List<Trait>() { - new Trait { name="on_off", max=100,min = 0, value_key= new List<string> { "on","off"} }, + attributes = new List<FunctionAttributes>() { + new FunctionAttributes { key="on_off", max=100,min = 0, value= new List<string> { "on","off"} }, }, - roomIdList = new List<string>() { "0001" }, + roomIds = new List<string>() { "0001" }, bus_Data = new BusData { - SubnetID = 42, - DeviceID = 6, - LoopID = 1, + addresses = "2A06", + loopId = 1, }, }.SaveFunctionData(); @@ -409,7 +401,7 @@ ins_Function = null; if (MainPage.IsRemote) { - Mqtt_Cloud.DisConnectRemoteMqttClient("閫�鍑虹櫥褰曪紝鎴栬�呭垏鎹綇瀹�"); + DAL.Mqtt.MqttClient.DisConnectRemote("閫�鍑虹櫥褰曪紝鎴栬�呭垏鎹綇瀹�"); } } @@ -452,6 +444,7 @@ foreach (var r in rooms) { r.GetRoomFunctions(true); + r.GetRoomScenes(true); } } catch (Exception ex) @@ -690,6 +683,11 @@ #endregion #region oid鍒楄〃 a鍗忚杞琤us鍗忚鎺у埗浣跨敤 + /// <summary> + /// oid鏁版嵁淇濆瓨鐨勬枃浠跺悕 + /// </summary> + [Newtonsoft.Json.JsonIgnore] + public static string OidSavePathName = "AProtocolData_FunctionOid"; static List<FunctionOid> ins_OidList; public static List<FunctionOid> functionOidList { @@ -697,7 +695,7 @@ { if (ins_OidList == null) { - var bytes = FileUtils.ReadFile("AProtocolData_FunctionOid"); + var bytes = FileUtils.ReadFile(OidSavePathName); if (bytes == null || bytes.Length == 0) { ins_OidList = new List<FunctionOid>(); @@ -729,12 +727,11 @@ /// <summary> /// 淇濆瓨oid鏁版嵁锛屾瘡娆′繚瀛橀兘浼氳鐩� /// </summary> - public static void SaveFunctionOidJsonDataList(string oidJsonString) + public static void SaveOidList(string oidJsonString) { - oidJsonString = oidJsonString.Replace("add", "get_list_response"); var oidBytes = System.Text.Encoding.UTF8.GetBytes(oidJsonString); - FileUtils.WriteFileByBytes("AProtocolData_FunctionOid", oidBytes); + FileUtils.WriteFileByBytes(OidSavePathName, oidBytes); } #endregion -- Gitblit v1.8.0