From e74f8bfbe6c52f220deef5fc99a53c3a7872808d Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 11 四月 2023 17:08:34 +0800
Subject: [PATCH] Merge branch 'Dev-Wxr' into wjc

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 103 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index c2dec7d..e46d548 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -3203,13 +3203,39 @@
             var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, requestJson);
             return pack;
         }
+        /// <summary>
+        /// 鑾峰彇缇ゆ帶璇︽儏
+        /// </summary>
+        public ResponsePackNew GetGroupControInfo(string userDeviceGroupControlIds)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            var ids = new List<string>()
+            {
+                userDeviceGroupControlIds,
+            };
+            d.Add("userDeviceGroupControlIds", ids);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlInfos, requestJson);
+            return pack;
+        }
 
+        /// <summary>
+        /// 鑾峰彇缇ゆ帶璇︽儏
+        /// </summary>
+        public ResponsePackNew GetGroupControInfo(List<string> ids)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", ids);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlInfos, requestJson);
+            return pack;
+        }
 
         /// <summary>
         /// 娣诲姞缇ゆ帶鍒楄〃
         /// </summary>
-        /// <param name="spk"></param>
-        /// <returns></returns>
         public ResponsePackNew AddGroupControl(List<GroupControl> groupControls)
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
@@ -3217,7 +3243,81 @@
             d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
             d.Add("infos", groupControls);
             var requestJson = HttpUtil.GetSignRequestJson(d);
-            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, requestJson);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_AddGroupControl, requestJson);
+            return pack;
+        }
+
+
+        /// <summary>
+        /// 娣诲姞缇ゆ帶鍒楄〃
+        /// </summary>
+        public ResponsePackNew DelGroupControl(string groupControlId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId });
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteGroupControl, requestJson);
+            return pack;
+        }
+
+        /// <summary>
+        /// 缂栬緫缇ゆ帶鍒楄〃
+        /// </summary>
+        /// <param name="spk"></param>
+        /// <returns></returns>
+        public ResponsePackNew EditGroupControl(List<GroupControl> groupControls)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("infos", groupControls);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_AddGroupControl, requestJson);
+            return pack;
+        }
+
+
+        /// <summary>
+        /// 缇ゆ帶鎺у埗
+        /// </summary>
+        public ResponsePackNew ControlGroupControl(string userDeviceGroupControlId, Dictionary<string, object> pair)
+        {
+            var d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlId", userDeviceGroupControlId);
+            List<Dictionary<string, object>> dd = new List<Dictionary<string, object>>();
+            dd.Add(pair);
+            d.Add("status",dd);
+
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlGroupControl, requestJson);
+            return pack;
+        }
+
+        /// <summary>
+        /// 鏀惰棌缇ゆ帶
+        /// </summary>
+        public ResponsePackNew CollectGroupControl(string groupControlId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId });
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CollectGroupControl, requestJson);
+            return pack;
+        }
+
+
+        /// <summary>
+        /// 鍙栨秷鏀惰棌缇ゆ帶
+        /// </summary>
+        public ResponsePackNew CancelCollectGroupControl(string groupControlId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId });
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectGroupControl, requestJson);
             return pack;
         }
 

--
Gitblit v1.8.0