From 2be70a32d2a8c517bd9868fb60913fcc843e66fe Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 13 五月 2020 11:21:32 +0800
Subject: [PATCH] 上传代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs
index 2b57c17..c221ffc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs
@@ -121,7 +121,7 @@
         /// <returns></returns>
         public async Task<bool> SetAcModeSupport(AC device, int data)
         {
-            var result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(device, 513, 4099, 25, data.ToString());
+            var result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(device, 513, 4099, 25, data);
             //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
             string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
             if (error != null)
@@ -162,7 +162,7 @@
         /// <returns></returns>
         public async Task<bool> SetUseAcSwingFunctionStatu(AC device, int data)
         {
-            var result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(device, 514, 4097, 25, data.ToString());
+            var result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(device, 514, 4097, 25, data);
             //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
             string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
             if (error != null)
@@ -248,18 +248,17 @@
 
                     if (topic == gatewayID + "/" + "ZbDataPassthrough")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ClientDataPassthroughResponseData>(jobject["Data"].ToString());
+                        var clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ClientDataPassthroughResponseData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.clientDataPassthroughResponseData == null)
+                        if (clientDataPassthroughResponseData == null)
                         {
                             result = new ReadACFirewareVersionResponAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            if (gatewayTemp.clientDataPassthroughResponseData?.PassData != null)
+                            if (clientDataPassthroughResponseData?.PassData != null)
                             {
-                                var data = gatewayTemp.clientDataPassthroughResponseData.PassData;
+                                var data = clientDataPassthroughResponseData.PassData;
                                 var command = data[4].ToString() + data[5].ToString() + data[2].ToString() + data[3].ToString();
                                 if (command == "0259")
                                 {
@@ -412,18 +411,17 @@
 
                     if (topic == gatewayID + "/" + "ZbDataPassthrough")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ClientDataPassthroughResponseData>(jobject["Data"].ToString());
+                        var clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ClientDataPassthroughResponseData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.clientDataPassthroughResponseData == null)
+                        if (clientDataPassthroughResponseData == null)
                         {
                             result = new ResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            if (gatewayTemp.clientDataPassthroughResponseData?.PassData != null)
+                            if (clientDataPassthroughResponseData?.PassData != null)
                             {
-                                var data = gatewayTemp.clientDataPassthroughResponseData.PassData;
+                                var data = clientDataPassthroughResponseData.PassData;
                                 var command = data[4].ToString() + data[5].ToString() + data[2].ToString() + data[3].ToString();
                                 if (command == "025b")
                                 {

--
Gitblit v1.8.0