| | |
| | | |
| | | namespace HDL_ON.UI.UI2.Intelligence.Automation |
| | | { |
| | | public class Send |
| | | public class Send |
| | | { |
| | | ///// <summary> |
| | | ///// 住宅ID |
| | |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | | public static string homeId = "1333681497069043713"; |
| | | public static string homeId = "1333723044544233473"; |
| | | /// <summary> |
| | | /// 网关ID |
| | | /// </summary> |
| | | public static string gatewayId = "1333682616549752834"; |
| | | public static string gatewayId = "1333723647223775233"; |
| | | |
| | | /// <summary> |
| | | /// 获取逻辑ID列表 |
| | | /// </summary> |
| | |
| | | /// <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; |
| | |
| | | |
| | | return responsePackNew; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 编辑更新逻辑 |
| | | /// </summary> |
| | |
| | | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | /// <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); |
| | |
| | | return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 请求服务器 |
| | | /// </summary> |