From 90fadf3023d54d780154eaa2a839e2106317297f Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期一, 05 七月 2021 13:38:59 +0800 Subject: [PATCH] 代码合并整理 --- HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index d95ea34..28e66fa 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -4,18 +4,40 @@ using HDL_ON.DAL.Server; using Newtonsoft.Json.Linq; using System.Collections.Generic; +using HDL_ON.Entity; namespace HDL_ON.UI.UI2.Intelligence.Automation { public class Send { + + /// <summary> + /// 璋冪敤鑾峰彇浣忓畢瀛愯处鍙峰垪琛� + /// </summary> + public static List<ResidenceMemberInfo> GetResidenceMemberAccount() + { + + var responePack = new HttpServerRequest().GetResidenceMemberAccount(); + if (responePack.Code == StateCode.SUCCESS) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString()); + } + //澶辫触 + else + { + //鎻愮ず + IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code); + } + return new List<ResidenceMemberInfo>(); + } + /// <summary> /// 鑾峰彇閫昏緫ID鍒楄〃 /// </summary> /// <returns></returns> public static ResponsePackNew GetLogicIdList() { - var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId } }; + var jObject = new JObject { { "homeId", LogicMethod.HomeId } }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_List); //濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) @@ -92,7 +114,6 @@ { var outputTypeJOb = new JObject { }; outputTypeJOb.Add("sid", dictionary.sid); - outputTypeJOb.Add("delay", dictionary.delay); outputTypeJOb.Add("target_type", dictionary.target_type); var statusArray = new JArray { }; foreach (var dic in dictionary.status) @@ -132,7 +153,7 @@ var logicjArray = new JArray { }; var logicIfon = new JObject { }; logicIfon.Add("sid", logic.sid); - logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId); + logicIfon.Add("gatewayId", LogicMethod.GatewayId); logicIfon.Add("name", logic.name); logicIfon.Add("relation", logic.relation); logicIfon.Add("enable", logic.enable); @@ -142,7 +163,7 @@ logicIfon.Add("noticeConfig", noticeConfigJObject); logicIfon.Add("pushConfigs", pushConfigsArray); logicjArray.Add(logicIfon); - var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } }; + var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } }; responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add,5); //濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) @@ -205,7 +226,6 @@ { var outputTypeJOb = new JObject { }; outputTypeJOb.Add("sid", dictionary.sid); - outputTypeJOb.Add("delay", dictionary.delay); outputTypeJOb.Add("target_type", dictionary.target_type); var statusArray = new JArray { }; foreach (var dic in dictionary.status) @@ -246,7 +266,7 @@ var logicIfon = new JObject { }; logicIfon.Add("userLogicId", logic.userLogicId); logicIfon.Add("sid", logic.sid); - logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId); + logicIfon.Add("gatewayId", LogicMethod.GatewayId); logicIfon.Add("name", logic.name); logicIfon.Add("relation", logic.relation); logicIfon.Add("enable", logic.enable); @@ -257,7 +277,7 @@ logicIfon.Add("pushConfigs", pushConfigsArray); logicjArray.Add(logicIfon); - var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } }; + var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } }; responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update,5); //濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) -- Gitblit v1.8.0