From 4f40e8385ff6725be8e8b642e50f9f7201a27dfa Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 11 十二月 2020 15:58:32 +0800 Subject: [PATCH] Merge branch 'NewFilePath' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into NewFilePath --- HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 41 ++++++++++++++++++++++------------------- 1 files changed, 22 insertions(+), 19 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index 6f61531..407b8d4 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -7,25 +7,26 @@ namespace HDL_ON.UI.UI2.Intelligence.Automation { - public class Send + public class Send { - ///// <summary> - ///// 浣忓畢ID - ///// </summary> - //public static string homeId = Entity.DB_ResidenceData.residenceData.CurReginID; - ///// <summary> - ///// 缃戝叧ID - ///// </summary> - //public static string gatewayId = DriverLayer.Control.Ins.GatewayId; - /// <summary> /// 浣忓畢ID /// </summary> - public static string homeId = "1333681497069043713"; + public static string homeId = UserInfo.Current.CurReginID; /// <summary> /// 缃戝叧ID /// </summary> - public static string gatewayId = "1333682616549752834"; + public static string gatewayId = DriverLayer.Control.Ins.GatewayId; + + ///// <summary> + ///// 缃戝叧ID + ///// </summary> + //public static string gatewayId =Entity.DB_ResidenceData.residenceData.HomeGateway.gatewayId; + ///// <summary> + ///// 浣忓畢ID + ///// </summary> + //public static string homeId = Entity.DB_ResidenceData.residenceData.HomeGateway.homeId; + /// <summary> /// 鑾峰彇閫昏緫ID鍒楄〃 /// </summary> @@ -39,11 +40,15 @@ /// <summary> /// 鑾峰彇閫昏緫 /// </summary> + /// <param name="listIdList">閫昏緫ID鍒楄〃</param> /// <returns></returns> - public static ResponsePackNew getLogic(Logic logic) + public static ResponsePackNew getLogic(List<string> listIdList) { var jArray = new JArray { }; - jArray.Add(logic.sid); + for (int i = 0; i < listIdList.Count; i++) + { + jArray.Add(listIdList[i]); + } var jObject = new JObject { { "userLogicIds", jArray } }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Info); return responsePackNew; @@ -129,7 +134,6 @@ return responsePackNew; } - /// <summary> /// 缂栬緫鏇存柊閫昏緫 /// </summary> @@ -190,6 +194,7 @@ var logicjArray = new JArray { }; var logicIfon = new JObject { }; + logicIfon.Add("userLogicId", logic.userLogicId); logicIfon.Add("sid", logic.sid); logicIfon.Add("gatewayId", gatewayId); logicIfon.Add("name", logic.name); @@ -218,7 +223,7 @@ public static ResponsePackNew delLogic(Logic logic) { var jArray = new JArray { }; - jArray.Add(logic.sid); + jArray.Add(logic.userLogicId); var jObject = new JObject { { "userLogicIds", jArray } }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Delete); return responsePackNew; @@ -229,9 +234,8 @@ /// <returns></returns> public static ResponsePackNew switchLogic(Logic logic) { - logic.enable ="false"; var jArray = new JArray { }; - var job = new JObject { { "userLogicId", logic.sid } , { "enable", logic.enable } }; + var job = new JObject { { "userLogicId", logic.userLogicId } , { "enable", logic.enable } }; jArray.Add(job); var jObject = new JObject { { "logics", jArray } }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Enable); @@ -247,7 +251,6 @@ return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout); } - /// <summary> /// 璇锋眰鏈嶅姟鍣� /// </summary> -- Gitblit v1.8.0