From a3313818a548d51777ae4e6cc006e9d1e2c1036e Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 07 四月 2023 09:15:37 +0800 Subject: [PATCH] 群控备份 --- HDL_ON/Entity/Function/Function.cs | 38 ++++++++++++++++++++++++++++++++------ 1 files changed, 32 insertions(+), 6 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 4793b16..f180034 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -523,6 +523,14 @@ SetAttrState(sta.key, sta.value); } } + /// <summary> + /// 鍔熻兘鍒楄〃鎺掑簭 + /// </summary> + public int FunctionOrderNumber = 9999; + /// <summary> + /// 鎴块棿鍒楄〃鎺掑簭 + /// </summary> + public int RoomOrderNumber = 9999; /// <summary> @@ -553,13 +561,27 @@ new System.Threading.Thread(() => { - if (collect) - { - result = ApiUtlis.Ins.HttpRequest.CollectDevice(deviceId).Code; + if (spk == SPK.GroupControl) { + var groupControl = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); + if (collect) + { + result = ApiUtlis.Ins.HttpRequest.CollectGroupControl(groupControl.userDeviceGroupControlId).Code; + } + else + { + result = ApiUtlis.Ins.HttpRequest.CancelCollectGroupControl(groupControl.userDeviceGroupControlId).Code; + } } else { - result = ApiUtlis.Ins.HttpRequest.CancelCollectDevice(deviceId).Code; + if (collect) + { + result = ApiUtlis.Ins.HttpRequest.CollectDevice(deviceId).Code; + } + else + { + result = ApiUtlis.Ins.HttpRequest.CancelCollectDevice(deviceId).Code; + } } //鎻愮ず閿欒 if (result != StateCode.SUCCESS) @@ -743,7 +765,7 @@ foreach (var attr in attributes) { //绐楀笜鍚屾椂鍙戦�佸紑鍏宠窡鐧惧垎姣斾細鏈夐棶棰橈紝 - if(spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex) + if(spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex || spk == SPK.CurtainDream) { if (attr.key == FunctionAttributeKey.OnOff) { @@ -1348,6 +1370,10 @@ public static class SPK { /// <summary> + /// 缇ゆ帶锛堣嚜瀹氫箟锛� + /// </summary> + public const string GroupControl = "GroupControl"; + /// <summary> /// 閫氱敤寮�鍏� /// </summary> public const string OtherCommon = "other.common"; @@ -1491,7 +1517,7 @@ public const string HvacAC = "hvac.ac"; /// <summary> /// 姣涚粏绠$┖璋� - /// </summary> + /// </summaryc public const string HvacCac = "hvac.cac"; /// <summary> -- Gitblit v1.8.0