From f2b2a70331d574a345cab0906d4d4b0de48c38b1 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 11 四月 2023 17:02:59 +0800
Subject: [PATCH] 2023年04月11日17:01:15
---
HDL_ON/DAL/Server/HttpServerRequest.cs | 75 ++++++++++++++++++++++++++++++++++---
1 files changed, 69 insertions(+), 6 deletions(-)
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 585b717..c2dec7d 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -544,9 +544,8 @@
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 != "")
{
- DB_ResidenceData.Instance.CurrentRegion = null;
Shared.Application.RunOnMainThread(() =>
{
MainPage.GoUserPage(false);
@@ -2929,9 +2928,25 @@
}
-#endregion
+ /// <summary>
+ /// 鑾峰彇绗笁鏂规敞鍐岀殑id
+ /// </summary>
+ /// <param homeId="homeId">浣忓畢id</param>
+ /// <returns></returns>
+ public ResponsePackNew GetExtUserId(string homeId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", homeId);
-#region 鈻� 闂ㄩ攣鐩稿叧____________________________
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetExtUserId, requestJson);
+
+ return pack;
+ }
+
+ #endregion
+
+ #region 鈻� 闂ㄩ攣鐩稿叧____________________________
/// <summary>
/// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�)
@@ -3133,7 +3148,7 @@
-#region 鍏変紡鍌ㄨ兘
+ #region 鍏変紡鍌ㄨ兘
/// <summary>
/// 鑾峰彇浣忓畢涓嬮�嗗彉鍣ㄥ垪琛�
/// </summary>
@@ -3158,7 +3173,55 @@
var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetInverter_StatisticsInfo, requestJson);
return pack;
}
-#endregion
+ #endregion
+
+
+ #region 缇ゆ帶锛岀粍鍚堣皟鍏�
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶绫诲瀷
+ /// </summary>
+ /// <param name="spk"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetGroupControlTypes(string spk)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("spk", spk);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlTypes, requestJson);
+ return pack;
+ }
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶鍒楄〃
+ /// </summary>
+ /// <param name="spk"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetGroupControlList()
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, 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>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ 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);
+ return pack;
+ }
+
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.8.0