| | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | 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 |
| | | { |
| | | if (collect) |
| | | { |
| | | result = ApiUtlis.Ins.HttpRequest.CollectDevice(deviceId).Code; |
| | |
| | | else |
| | | { |
| | | result = ApiUtlis.Ins.HttpRequest.CancelCollectDevice(deviceId).Code; |
| | | } |
| | | } |
| | | //提示错误 |
| | | if (result != StateCode.SUCCESS) |
| | |
| | | public static class SPK |
| | | { |
| | | /// <summary> |
| | | /// 群控(自定义) |
| | | /// </summary> |
| | | public const string GroupControl = "GroupControl"; |
| | | /// <summary> |
| | | /// 通用开关 |
| | | /// </summary> |
| | | public const string OtherCommon = "other.common"; |
| | |
| | | public const string HvacAC = "hvac.ac"; |
| | | /// <summary> |
| | | /// 毛细管空调 |
| | | /// </summary> |
| | | /// </summaryc |
| | | public const string HvacCac = "hvac.cac"; |
| | | |
| | | /// <summary> |