From a46cd0adb5af29e8a9cf47c219475acaedfcf839 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 01 十二月 2020 17:09:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/WJC'

---
 HDL_ON/DAL/DriverLayer/Control.cs |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index a2c52c7..bdf87b9 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -199,19 +199,15 @@
         {
             function.usageCount++;
             function.refreshTime = DateTime.Now;
+            DAL.Server.HttpServerRequest httpServer = new DAL.Server.HttpServerRequest();
             //杩滅▼閫氳
             if (Ins.IsRemote)
             {
-                //ALink鎺у埗
-                if (DB_ResidenceData.residenceData.GatewayType == 0)
-                {
-
-                }
-                //Bus鎺у埗
-                else
-                {
-
-                }
+                //ALink鎺у埗銆丅us鎺у埗浣跨敤鍚屼竴涓帴鍙f帶鍒讹紝鐢变簯绔礋璐hВ鏋�
+                var apiControlData = function.GetApiControlData(commandDictionary);
+                var actionObjs = new List<ApiAlinkControlActionObj>();
+                actionObjs.Add(apiControlData);
+                httpServer.ControlDevice(actionObjs);
             }
             //鏈湴閫氳
             else
@@ -236,7 +232,7 @@
                 {
                     if (myUdp != null)
                     {
-                        var functionControlDataObj = function.GetControlSendData(commandDictionary);
+                        var functionControlDataObj = function.GetGatewayAlinkControlData(commandDictionary);
                         var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(functionControlDataObj);
                         var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson);
                         myUdp.SendLocalHdlLinkData(sendBytes);

--
Gitblit v1.8.0