From 8413f493d6e527c3f71cf704c6b22212e94a6c60 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 24 十二月 2020 16:00:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/WJC' into NewFilePath

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
old mode 100755
new mode 100644
index 3e7d9f5..537504e
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -104,7 +104,6 @@
             }
             return logicId;
         }
-
         /// <summary>
         /// 灏佽Dictionary瀵硅薄
         /// </summary>
@@ -137,8 +136,8 @@
         {
             List<Entity.Room> roomList = new List<Entity.Room>();
             Entity.Room room1 = new Entity.Room();
-            room1.roomName = name;//榛樿涓�涓埧闂村悕涓�:鍏ㄩ儴鍖哄煙
-            room1.uid = "鍏ㄩ儴鍖哄煙";//榛樿sid鐢ㄨ瘑鍒鎴块棿
+            room1.roomName = name;//鑷畾涔夐粯璁や竴涓埧闂村悕涓�:6688
+            room1.roomId = "6688";//鑷畾涔夐粯璁d鐢ㄨ瘑鍒鎴块棿
             roomList.Add(room1);//榛樿娣诲姞鍒版埧闂村垪琛ㄩ噷
             var roomLists = GetGatewayRoomList();
             for (int i = 0; i < roomLists.Count; i++)
@@ -179,18 +178,24 @@
         {
             List<HDL_ON.Entity.Function> deviceLists = new List<Entity.Function>();
             List<HDL_ON.Entity.Function> lists = GetGatewayDeviceList();
-            foreach (var dev in lists)
+            if (room.roomId == "6688")
             {
-                if (dev.roomIds.Find((id) => id == room.uid) != null)
+                //榛樿涓�涓埧闂村悕锛�6688
+                //鏄剧ず缃戝叧鍏ㄩ儴璁惧
+                deviceLists = lists;
+            }
+            else
+            {
+                for (int i = 0; i < lists.Count; i++)
                 {
-                    deviceLists.Add(dev);
-                }
-                if (room.uid == "鍏ㄩ儴鍖哄煙")
-                {
-                    //鎴块棿鍚嶄负鍏ㄩ儴鍖哄煙鏃讹紝鏄剧ず缃戝叧鍏ㄩ儴璁惧
-                    deviceLists = lists;
-                }
+                    var dev = lists[i];
+                    if (dev.roomIds.Find((id) => id == room.roomId) != null)
+                    {
+                        //娣诲姞灞炰簬杩欎釜鎴块棿鐨勮澶�;
+                        deviceLists.Add(dev);
+                    }
 
+                }
             }
             return deviceLists;
         }
@@ -244,12 +249,10 @@
         {
             string roomName = "";
             List<HDL_ON.Entity.Room> roomLists = GetGatewayRoomList();
-
-
             for (int i = 0; i < device.roomIds.Count; i++)
             {
                 var dev = device.roomIds[i];
-                var room = roomLists.Find((c) => c.uid == dev);
+                var room = roomLists.Find((c) => c.roomId == dev);
                 if (room != null)
                 {
                     roomName += room.floorName + "." + room.roomName + ",";

--
Gitblit v1.8.0