From cd70a2a8a2bdebf51259d8f39ed110a34b9be9e5 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 11 四月 2023 14:50:21 +0800 Subject: [PATCH] 修改启动屏幕 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 104 insertions(+), 4 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 449da8d..e46d548 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -544,7 +544,7 @@ var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); if (homeList == null || homeList.Count == 0) { - if (DB_ResidenceData.Instance.CurrentRegion.id != "") + if (DB_ResidenceData.Instance.CurrentRegion!=null && DB_ResidenceData.Instance.CurrentRegion.id != "") { Shared.Application.RunOnMainThread(() => { @@ -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