| | |
| | | using System; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using HDL_ON.Entity; |
| | |
| | | public void SwtichFunctions(bool open,List<Function> functions) |
| | | { |
| | | var count = 0; |
| | | var logString = open ? "打开" : "关闭"; |
| | | var logString = open ? "打开\r\n" : "关闭\r\n"; |
| | | List<ApiAlinkControlActionObj> actionObjs = new List<ApiAlinkControlActionObj>(); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, open ? "on" : "off"); |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | foreach (var temp in functions) |
| | | { |
| | | logString += temp.spk + ":" + temp.sid; |
| | | logString += temp.spk + ":" + temp.sid + "\r\n"; |
| | | var apiControlData = temp.GetApiControlData(d); |
| | | actionObjs.Add(apiControlData); |
| | | count++; |
| | |
| | | { |
| | | if (Ins.IsRemote) |
| | | { |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | var result = pm.ExecuteScene(scene.userSceneId); |
| | | //云端做处理发送一端口场景 |
| | | //if (DB_ResidenceData.Instance.GatewayType == 0) |
| | | //{ |
| | | // new Control_Udp().ControlBusScenes(scene); |
| | | //} |
| | | //else |
| | | { |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | var result = pm.ExecuteScene(scene.userSceneId); |
| | | } |
| | | } |
| | | else |
| | | { |