From c7df85937f73fb347ee0b19e9c052d2d00a6df6c Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 18 九月 2020 13:58:19 +0800
Subject: [PATCH] 新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs |   58 ++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 42 insertions(+), 16 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
index 12546e0..80f0596 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
@@ -37,6 +37,10 @@
             /// 绌鸿皟鐩爣
             /// </summary>
             AC = 5,
+            /// <summary>
+            /// 鍦版殩鐩爣
+            /// </summary>
+            Fh = 6,
         }
 
         #endregion
@@ -211,6 +215,10 @@
                     if (device.Type == DeviceType.TemperatureSensor)
                     {
                         var dev = device as TemperatureSensor;
+                        if (BindInfo.checkRealTemperatureDevice(device) == false)
+                        {
+                            continue;
+                        }
                         if (dev.SensorDiv == 1)
                         {
                             roomIncludeMatchTempDevice.Add(device);
@@ -252,6 +260,10 @@
                     if (device.Type == DeviceType.TemperatureSensor)
                     {
                         var dev = device as TemperatureSensor;
+                        if (BindInfo.checkRealTemperatureDevice(device) == false)
+                        {
+                            continue;
+                        }
                         if (dev.SensorDiv == 2)
                         {
                             roomIncludeMatchHumpDevice.Add(device);
@@ -274,10 +286,10 @@
         }
 
         /// <summary>
-        /// 鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂村垪琛�
+        /// 鑾峰彇鏀寔鐨勬埧闂村垪琛�
         /// </summary>
         /// <returns></returns>
-        public static List<Room> GetFloorRoomList()
+        public static List<Room> GetSupportRoomList()
         {
             var supportRoomListTemp = new List<Room>();
             var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
@@ -347,10 +359,7 @@
                                 var device = LocalDevice.Current.GetDevice(de);
                                 if (device != null)
                                 {
-                                    //鑾峰彇璁惧绫诲瀷鐨�
-                                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
-                                    //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
-                                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                                    if (BindInfo.checkRealFreshAirDevice(device) == false)
                                     {
                                         continue;
                                     }
@@ -703,7 +712,7 @@
         }
 
         /// <summary>
-        /// 鏄惁鏄湡瀹炵殑绌鸿皟璁惧 銆愰儴鍒嗘槸鑳界粦瀹氱┖璋冪殑璁惧銆� 
+        /// 鏄惁鏄湡瀹炵殑绌鸿皟璁惧 銆愯繃婊erver绔�� 
         /// </summary>
         /// <param name="device"></param>
         /// <returns></returns>
@@ -711,7 +720,7 @@
         {
             bool result = true;
             //鑾峰彇璁惧绫诲瀷鐨�
-            var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 513);
+            var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 513 || obj.OutCluster == 514);
             if (clu != null)
             {
                 result = false;
@@ -720,7 +729,7 @@
         }
 
         /// <summary>
-        /// 鏄惁鏄湡瀹炵殑鏂伴璁惧 銆愰儴鍒嗘槸鑳界粦瀹氭柊椋庣殑璁惧銆� 
+        /// 鏄惁鏄湡瀹炵殑鏂伴璁惧 銆愯繃婊erver绔�� 
         /// </summary>
         /// <param name="device"></param>
         /// <returns></returns>
@@ -728,12 +737,8 @@
         {
             bool result = true;
             //鑾峰彇璁惧绫诲瀷鐨�
-            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
-            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
-            {
-                result = false;
-            }
-            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
+            var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 514);
+            if (clu != null)
             {
                 result = false;
             }
@@ -741,7 +746,28 @@
         }
 
         /// <summary>
-        /// 妫�娴嬭璁惧鑳藉惁鏄剧ず
+        /// 鏄惁鏄湡瀹炵殑娓╁害璁惧 銆愯繃婊erver绔�� 
+        /// </summary>
+        /// <param name="device"></param>
+        /// <returns></returns>
+        public static bool checkRealTemperatureDevice(CommonDevice device)
+        {
+            bool result = true;
+            //鑾峰彇璁惧灞炰簬銆愮畝绾﹀鍔熻兘闈㈡澘銆�
+            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice> { device });
+            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+            {
+                if (device.Type == DeviceType.TemperatureSensor && device.DeviceEpoint == 1)
+                {
+                    //绠�绾﹀鍔熻兘闈㈡澘绗�1鍥炶矾鏄竴涓粦瀹氭俯婀垮害浼犳劅鍣ㄧ绫诲瀷锛屼笉鏄湡鐨勬俯婀垮害鐨勪紶鎰熷櫒锛岄渶瑕佸睆钄芥帀
+                    result = false;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 妫�娴嬭璁惧鑳藉惁鏄剧ず銆愯繃婊erver绔�� 
         /// </summary>
         /// <param name="device"></param>
         /// <returns></returns>

--
Gitblit v1.8.0