From e87985ec1dcb69beedaf9f95e8e7aba14b7c08d6 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 09 十二月 2020 18:50:14 +0800
Subject: [PATCH] 2020-12-09 1.信息中心,增加下划线和点击Alter提醒详情。
---
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 153 ++++----------------------------------------------
1 files changed, 14 insertions(+), 139 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index 4412688..ad9473e 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -7,153 +7,25 @@
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 = "1333723044544233473";
+ public static string homeId = Entity.DB_ResidenceData.residenceData.CurReginID;
/// <summary>
/// 缃戝叧ID
/// </summary>
- public static string gatewayId = "1333723647223775233";
+ public static string gatewayId = DriverLayer.Control.Ins.GatewayId;
+
///// <summary>
- ///// 鑾峰彇閫昏緫ID鍒楄〃
+ ///// 缃戝叧ID
///// </summary>
- ///// <returns></returns>
- //public const string getLogicId = "鑾峰彇閫昏緫ID";
+ //public static string gatewayId =Entity.DB_ResidenceData.residenceData.HomeGateway.gatewayId;
///// <summary>
- ///// 鑾峰彇閫昏緫
+ ///// 浣忓畢ID
///// </summary>
- ///// <returns></returns>
- //public const string getLogic= "鑾峰彇閫昏緫璇︾粏";
- ///// <summary>
- ///// 娣诲姞鑷姩鍖栧懡浠�
- ///// </summary>
- ///// <returns></returns>
- //public const string addLogic= "娣诲姞鏂伴�昏緫";
- ///// <summary>
- ///// 缂栬緫鏇存柊閫昏緫
- ///// </summary>
- ///// <returns></returns>
- //public const string updateLogic = "缂栬緫閫昏緫";
- ///// <summary>
- ///// 鍒犻櫎閫昏緫
- ///// </summary>
- ///// <returns></returns>
- //public const string delLogic = "鍒犻櫎閫昏緫";
- ///// <summary>
- ///// 閫昏緫寮�鍏�
- ///// </summary>
- ///// <returns></returns>
- //public const string switchLogic = "閫昏緫寮�鍏�";
- //public static ResponsePackNew Logic(string type,Logic logic) {
- // string url = "";
- // var jObject = new JObject { };
- // switch (type) {
- // case getLogicId: {
- // jObject.Add("homeId",homeId);
- // url = NewAPI.API_POST_Logic_List;
- // }
- // break;
- // case getLogic: {
- // var jArray = new JArray { };
- // jArray.Add(logic.userLogicId);
- // jObject.Add("userLogicIds", jArray);
- // url = NewAPI.API_POST_Logic_Info;
- // } break;
- // case addLogic: {
- // try
- // {
- // var cycleJObject = new JObject { };
- // var cyclevaluejArray = new JArray { };
- // cycleJObject.Add("type", logic.cycle.type);
- // foreach (var dictionary in logic.cycle.value)
- // {
- // cyclevaluejArray.Add(dictionary);
- // }
- // cycleJObject.Add("value", cyclevaluejArray);
-
- // var inputArray = new JArray { };
- // foreach (var dictionary in logic.input)
- // {
- // var inputTypeJOb = new JObject { };
- // inputTypeJOb.Add("sid", dictionary.sid);
- // inputTypeJOb.Add("condition_type", dictionary.condition_type);
-
- // var conditionArray = new JArray { };
- // foreach (var dic in dictionary.condition)
- // {
- // var conditionJOb = new JObject { };
- // conditionJOb.Add("key", dic["key"]);
- // conditionJOb.Add("comparator", dic["comparator"]);
- // conditionJOb.Add("data_type", dic["data_type"]);
- // conditionJOb.Add("value", dic["value"]);
- // conditionArray.Add(conditionJOb);
- // }
- // inputTypeJOb.Add("condition", conditionArray);
- // inputArray.Add(inputTypeJOb);
- // }
-
- // var outputArray = new JArray { };
- // foreach (var dictionary in logic.output)
- // {
- // var outputTypeJOb = new JObject { };
- // outputTypeJOb.Add("sid", dictionary.sid);
- // outputTypeJOb.Add("target_type", dictionary.target_type);
- // var statusArray = new JArray { };
- // foreach (var dic in dictionary.status)
- // {
- // var statusJOb = new JObject { };
- // statusJOb.Add("key", dic["key"]);
- // statusJOb.Add("value", dic["value"]);
- // statusArray.Add(statusJOb);
- // }
- // outputTypeJOb.Add("status", statusArray);
- // outputArray.Add(outputTypeJOb);
- // }
-
- // var logicjArray = new JArray { };
- // var logicIfon = new JObject { };
- // logicIfon.Add("sid", logic.sid);
- // logicIfon.Add("gatewayId", gatewayId);
- // logicIfon.Add("name", logic.name);
- // logicIfon.Add("relation", logic.relation);
- // logicIfon.Add("enable", logic.enable);
- // logicIfon.Add("cycle", cycleJObject);
- // logicIfon.Add("input", inputArray);
- // logicIfon.Add("output", outputArray);
- // logicjArray.Add(logicIfon);
- // var jObject = new JObject { { "homeId", homeId }, { "logics", logicjArray } };
- // responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add);
-
- // }
- // catch (Exception e)
- // {
- // var dd = e.Message;
- // }
- // } break;
- // case updateLogic: {
- // } break;
- // case delLogic: { } break;
- // case switchLogic: { } break;
-
-
- // }
-
- // return RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add);
- //}
-
-
+ //public static string homeId = Entity.DB_ResidenceData.residenceData.HomeGateway.homeId;
/// <summary>
/// 鑾峰彇閫昏緫ID鍒楄〃
@@ -168,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.userLogicId);
+ 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;
@@ -375,7 +251,6 @@
return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
}
-
/// <summary>
/// 璇锋眰鏈嶅姟鍣�
/// </summary>
--
Gitblit v1.8.0