From 7bea8bc6d399e9097e3565c2eed48ee6145d6b2f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 七月 2023 20:49:11 +0800
Subject: [PATCH] 萤石猫眼,门锁,摄像头功能对接

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |  207 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 203 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 66378c6..e7c787f 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -3133,10 +3133,6 @@
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorlockUserList, requestJson);
         }
 
-        
-
-
-
         /// <summary>
         /// 淇敼闂ㄩ攣鐢ㄦ埛澶囨敞
         /// </summary>
@@ -3152,6 +3148,209 @@
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_setDoorUserRemark, requestJson);
         }
 
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛鏁板瓧瀵嗙爜
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="lockUserIndex"></param>
+        /// <returns></returns>
+        public ResponsePackNew DeleteDoorlockUserNumberPassword(string deviceId, string lockUserIndex)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("lockUserIndex", lockUserIndex);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_NumberPassword, requestJson);
+        }
+
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛鍗″瘑鐮�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="lockUserIndex"></param>
+        /// <returns></returns>
+        public ResponsePackNew DeleteDoorlockUserCardPassword(string deviceId, string lockUserIndex)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("lockUserIndex", lockUserIndex);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteCardPassword, requestJson);
+        }
+
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛鎸囩汗瀵嗙爜
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="lockUserIndex"></param>
+        /// <returns></returns>
+        public ResponsePackNew DeleteDoorlockUserFingerPassword(string deviceId, string lockUserIndex)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("lockUserIndex", lockUserIndex);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFingerPassword, requestJson);
+        }
+
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛浜鸿劯瀵嗙爜
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="lockUserIndex"></param>
+        /// <returns></returns>
+        public ResponsePackNew DeleteDoorlockUserFacePassword(string deviceId, string lockUserIndex)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("lockUserIndex", lockUserIndex);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFacePassword, requestJson);
+        }
+
+
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="lockUserIndex"></param>
+        /// <returns></returns>
+        public ResponsePackNew DeleteDoorlockUser(string deviceId, string lockUserIndex)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("lockUserIndex", lockUserIndex);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteUser, requestJson);
+        }
+
+        /// <summary>
+        /// 鏌ヨ鎸夐敭涓ゆ寮�闂�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <returns></returns>
+        public ResponsePackNew GetDoubleClickOpenDoorSwitch(string deviceId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoubleClickOpenDoorSwitch, requestJson);
+        }
+        /// <summary>
+        /// 璁剧疆鎸夐敭涓ゆ寮�闂�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="enabled">鎸夐敭涓ゆ寮�闂ㄥ紑鍏� 0-鍏抽棴,1娆℃寜閿紑闂� 1-寮�鍚紝2娆℃寜閿紑闂�</param>
+        /// <returns></returns>
+        public ResponsePackNew SetDoubleClickOpenDoorSwitch(string deviceId,int enabled)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("enabled", enabled);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoubleClickOpenDoorSwitch, requestJson);
+        }
+
+        /// <summary>
+        /// 鏌ヨ绔ラ攣寮�鍏�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <returns></returns>
+        public ResponsePackNew GetChildLockSwitch(string deviceId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetChildLockSwitch, requestJson);
+        }
+        /// <summary>
+        /// 璁剧疆绔ラ攣寮�鍏�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="enabled">绔ラ攣寮�鍏� 0-鍏抽棴 1-寮�鍚�</param>
+        /// <returns></returns>
+        public ResponsePackNew SetChildLockSwitch(string deviceId, int enabled)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("enabled", enabled);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetChildLockSwitch, requestJson);
+        }
+
+
+        /// <summary>
+        /// 鏌ヨ鍙嶉攣閰嶇疆
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <returns></returns>
+        public ResponsePackNew GetAntiLockCfg(string deviceId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetAntiLockCfg, requestJson);
+        }
+        /// <summary>
+        /// 璁剧疆鍙嶉攣閰嶇疆
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="enabled"></param>
+        /// <returns></returns>
+        public ResponsePackNew SetAntiLockCfg(string deviceId, bool enabled)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("enabled", enabled);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetAntiLockCfg, requestJson);
+        }
+
+
+        /// <summary>
+        /// 鏌ヨ甯冩挙闃茬姸鎬�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <returns></returns>
+        public ResponsePackNew GetDefenceStatus(string deviceId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDefenceStatus, requestJson);
+        }
+        /// <summary>
+        /// 璁剧疆甯冩挙闃茬姸鎬�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="armStatus">甯冮槻鐘舵�� disarmed-鎾ら槻 armed-宸插竷闃�</param>
+        /// <param name="defenceMode">甯冮槻妯″紡 global-鍏ㄥ眬 atHome-鍦ㄥ outDoor-澶栧嚭 sleep-鐫$湢</param>
+        /// <returns></returns>
+        public ResponsePackNew SetDefenceStatus(string deviceId, bool defance)//,string defenceMode)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            if(defance)
+                d.Add("armStatus", "armed");
+            else
+                d.Add("armStatus", "disarmed");
+            d.Add("defenceMode", "global");
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDefenceStatus, requestJson);
+        }
 
         #endregion
 

--
Gitblit v1.8.0