陈嘉乐
2021-01-11 631f94758c3cb42abcdda8094e77895f376eff16
HDL_ON/DAL/DriverLayer/Control.cs
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using HDL_ON.Entity;
@@ -342,14 +342,14 @@
        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++;
@@ -442,8 +442,16 @@
        {
            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
            {