From 203c3a3ffde6259413d9743f6a723b95b1e7989c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 06 七月 2023 22:43:05 +0800
Subject: [PATCH] 门锁功能

---
 HDL_ON/Entity/DB_ResidenceData.cs |   69 +++++++++++++++++++---------------
 1 files changed, 38 insertions(+), 31 deletions(-)

diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index d3df31b..6e556a8 100644
--- a/HDL_ON/Entity/DB_ResidenceData.cs
+++ b/HDL_ON/Entity/DB_ResidenceData.cs
@@ -54,31 +54,33 @@
             }
         }
 
-        [Newtonsoft.Json.JsonIgnore]
-        private List<ShowFunction> showFunctions;
+        private List<ShowFunction> dddd;
 
         /// <summary>
         /// 鍔熻兘绫诲瀷鍒楄〃
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public List<ShowFunction> functionTypeList
+        public List<ShowFunction> ShowFunctionTypeList
         {
             get
             {
-                if (showFunctions == null)
+                if (dddd == null)
                 {
-                    showFunctions = new List<ShowFunction> {
+                    dddd = new List<ShowFunction>(){
                                     ShowFunction.Light,ShowFunction.AC,ShowFunction.Curtain,
                                     ShowFunction.FloorHeating,ShowFunction.Music,
                                     ShowFunction.Electric,ShowFunction.Environmental,
-                                    ShowFunction.EnergyMonitoring,
+                                    ShowFunction.EnergyMonitoring,ShowFunction.IpCam,
                                     ShowFunction.FreshAir,ShowFunction.DoorLock,
-                                    ShowFunction.Panel,ShowFunction.SecurityMonitoring,
+                                    ShowFunction.Panel,
                                     ShowFunction.Sensor,ShowFunction.VideoIntercom,
                                     ShowFunction.SecurityCenter,ShowFunction.Acst,
-                                    ShowFunction.MechanicalArm };
+                                    ShowFunction.MechanicalArm ,
+                                    ShowFunction.SecurityMonitoring,
+                                    ShowFunction.VideoDoorLock,
+                    };
                 }
-                return showFunctions;
+                return dddd;
             }
         }
 
@@ -123,17 +125,6 @@
                         {
                             instance = temp;
                         }
-                        instance.functionTypeList.AddRange(new List<ShowFunction> {
-                                    ShowFunction.Light,ShowFunction.AC,ShowFunction.Curtain,
-                                    ShowFunction.FloorHeating,ShowFunction.Music,
-                                    ShowFunction.Electric,ShowFunction.Environmental,
-                                    ShowFunction.EnergyMonitoring,
-                                    ShowFunction.FreshAir,ShowFunction.DoorLock,
-                                    ShowFunction.Panel,ShowFunction.SecurityMonitoring,
-                                    ShowFunction.Sensor,ShowFunction.VideoIntercom,
-                                    ShowFunction.SecurityCenter,ShowFunction.Acst,
-                                    ShowFunction.MechanicalArm
-                                });
                         instance.SupportFacePass = false;
                         instance.SaveResidenceData();
                     }
@@ -163,17 +154,17 @@
             DriverLayer.Control.Ins.GatewayOnline_Cloud = false;
             DriverLayer.Control.Ins.GatewayOnline_Local = false;
             SpatialInfo.CurrentSpatial.Clear();
-            FunctionList.List.Clear();
+            FunctionList.List.ClearDatas();
 
             ///鍒囨崲浣忓畢娓呯┖鍓嶄綇瀹呯紦瀛樿嚜鍔ㄥ寲鍒楄〃锛�
             HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear();
             DAL.Mqtt.MqttClient.DisConnectRemote("閫�鍑虹櫥褰曪紝鎴栬�呭垏鎹綇瀹�");
 
 #if IOS
-            //閫�鍑哄叏瑙嗛�氱櫥褰�
-            Shared.IOS.HDLFVSDK.Video.Logout();
-            //閲嶇疆榛樿涓嶆敮鎸佸叏瑙嗛��
-            Entity.DB_ResidenceData.Instance.SupportFVDevice = false;
+            ////閫�鍑哄叏瑙嗛�氱櫥褰�
+            //Shared.IOS.HDLFVSDK.Video.Logout();
+            ////閲嶇疆榛樿涓嶆敮鎸佸叏瑙嗛��
+            //Entity.DB_ResidenceData.Instance.SupportFVDevice = false;
 #endif
         }
         /// <summary>
@@ -194,7 +185,7 @@
         /// <summary>
         /// 缃戝叧璇︾粏淇℃伅
         /// </summary>
-        public HomeGatewayInfo HomeGateway;
+        public HomeGatewayInfo HomeGateway;// = new HomeGatewayInfo ();
 
         /// <summary>
         /// 0:涓�绔彛
@@ -309,16 +300,27 @@
             var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
             WirteResidenceInfo(ssd);
         }
-        /// <summary>
-        /// 褰撳墠閫夋嫨鐨勬ゼ灞�
-        /// </summary>
-        public string CurFoor = Language.StringByID(StringId.All);
 
+
+        SpatialInfo _CurFloor;
         /// <summary>
         /// 褰撳墠閫夋嫨鐨勬ゼ灞�
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public SpatialInfo CurFloor = new SpatialInfo() { roomId = "", roomName = Language.StringByID(StringId.All)};
+        public SpatialInfo CurFloor {
+            get
+            {
+                if(_CurFloor == null || _CurFloor.roomName == "")
+                {
+                    _CurFloor = new SpatialInfo() { roomId = "", roomName = Language.StringByID(StringId.All) };
+                }
+                return _CurFloor;
+            }
+            set
+            {
+                _CurFloor = value;
+            }
+        } 
         /// <summary>
         /// 鍒嗙被鐣岄潰鏄剧ず鐨勬ゼ灞�
         /// </summary>
@@ -504,5 +506,10 @@
             }
         }
 
+        /// <summary>
+        /// 绗竴娆$敵璇峰畾浣嶆潈闄愶紝鐢ㄦ埛鎷掔粷涔嬪悗锛屼笉鑳藉啀娆$敵璇凤紙Android锛�
+        /// </summary>
+        public bool CheckGPS_IsFirst = true;
+
     }
 }

--
Gitblit v1.8.0