From 1d5e384497c7059e09760628dab3e83eb88f97ae Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 04 十二月 2020 17:48:34 +0800 Subject: [PATCH] 2020-12-04-4 --- HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 88130a2..1dbe612 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -73,6 +73,7 @@ } return logicId; } + /// <summary> /// 鐢熸垚閫昏緫sid鏂规硶 /// </summary> @@ -82,24 +83,18 @@ // try // { // String sOidBeginsWith = "000101";//鍘傚晢 + 閫氳鏂瑰紡 - // //鐢熸垚4涓猙yte鏃堕棿鎴� // DateTime dt = DateTime.Now; // long sTimeSp = GateWay.ConvertDateTimeLong(dt); // string sTimeSpan = ""; // GateWay.ConvertIntToByteArray(sTimeSp, ref sTimeSpan); // if (sTimeSpan.Length != 8) return sLogicid; - // //闂撮殧10姣 閿欏紑鏃堕棿鎴� // HDLUDP.TimeBetwnNext(10); - // sLogicid = sOidBeginsWith + sTimeSpan; - // //1501 鐗╂ā鍨嬩负鑷姩鍖栵紝 0001 琛ㄧず 1 鍙疯嚜鍔ㄥ寲鍔熻兘 // sLogicid += "15"; // sLogicid += "1501"; - - // //鑷姩鍖栧彿鑷 // int iTopSceneId = 1; // if (myGateway.LogicResponse != null) @@ -148,7 +143,7 @@ /// <returns></returns> public static List<HDL_ON.Entity.Room> GetGatewayRoomList() { - return HDL_ON.Entity.DB_ResidenceData.rooms; + return HDL_ON.Entity.DB_ResidenceData.residenceData.Rooms; } /// <summary> /// 鑾峰彇缃戝叧鎴块棿鍒楄〃 @@ -159,8 +154,8 @@ List<Entity.Room> roomList = new List<Entity.Room>(); Entity.Room room1 = new Entity.Room(); - room1.name = name;//榛樿涓�涓埧闂村悕涓�:鍏ㄩ儴鍖哄煙 - room1.sid = "鍏ㄩ儴鍖哄煙";//榛樿sid鐢ㄨ瘑鍒鎴块棿 + room1.roomName = name;//榛樿涓�涓埧闂村悕涓�:鍏ㄩ儴鍖哄煙 + room1.uid = "鍏ㄩ儴鍖哄煙";//榛樿sid鐢ㄨ瘑鍒鎴块棿 roomList.Add(room1);//榛樿娣诲姞鍒版埧闂村垪琛ㄩ噷 var roomLists = GetGatewayRoomList(); foreach (var room in roomLists) @@ -271,11 +266,11 @@ List<HDL_ON.Entity.Function> lists = GetGatewayDeviceList(); foreach (var dev in lists) { - if (dev.roomIds.Find((id) => id == room.sid) != null) + if (dev.roomIds.Find((id) => id == room.uid) != null) { deviceLists.Add(dev); } - if (room.sid == "鍏ㄩ儴鍖哄煙") + if (room.uid == "鍏ㄩ儴鍖哄煙") { //鎴块棿鍚嶄负鍏ㄩ儴鍖哄煙鏃讹紝鏄剧ず缃戝叧鍏ㄩ儴璁惧 deviceLists = lists; @@ -335,10 +330,10 @@ foreach (var dev in device.roomIds) { - var room = roomLists.Find((c) => c.sid == dev); + var room = roomLists.Find((c) => c.uid == dev); if (room != null) { - roomName += room.floorName + "." + room.name + ","; + roomName += room.floorName + "." + room.roomName + ","; } } -- Gitblit v1.8.0