From 72be4f06a683de33ddd563c8447c39f7f17e5b7d Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 06 一月 2020 13:03:50 +0800
Subject: [PATCH] 合并代码
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 023fb10..1e46ff8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -2145,7 +2145,7 @@
bool canBreak = false;
HdlThreadLogic.Current.RunThread(async () =>
{
- List<string> list = new List<string>() { "NotSetAgain" };
+ List<string> list = new List<string>() { "NotSetAgain", "NotCheck" };
//璁剧疆璁块棶鎺ュ彛鐨勫弬鏁�
var pra = new GetGatewayPra();
@@ -2379,27 +2379,27 @@
/// <returns></returns>
public async Task<bool> UpLoadDeviceBackupDataToGateway(CommonDevice device, GatewayBackupEnum backupEnum, object upLaodData)
{
- //ZbGateway realWay = null;
- //if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
- //{
- // //娌℃湁鎵惧埌鐪熷疄鐗╃悊缃戝叧
- // return false;
- //}
- //string fileName = device.FilePath + ((int)backupEnum).ToString().PadLeft(5, '0');
- ////鍒涘缓鏂囦欢瀵硅薄
- //var result = await realWay.CreateFileAsync(fileName);
- //if (result == null || result.Result != 0)
- //{
- // return false;
- //}
- ////鍙戦�佹暟鎹祦
- //var data = Newtonsoft.Json.JsonConvert.SerializeObject(upLaodData);
- //var byteData = System.Text.Encoding.UTF8.GetBytes(data);
- //var result2 = await realWay.SendFileAsync(byteData);
- //if (result2 == null || result2.Result != 0)
- //{
- // return false;
- //}
+ ZbGateway realWay = null;
+ if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
+ {
+ //娌℃湁鎵惧埌鐪熷疄鐗╃悊缃戝叧
+ return false;
+ }
+ string fileName = device.FilePath + ((int)backupEnum).ToString().PadLeft(5, '0');
+ //鍒涘缓鏂囦欢瀵硅薄
+ var result = await realWay.CreateFileAsync(fileName);
+ if (result == null || result.Result != 0)
+ {
+ return false;
+ }
+ //鍙戦�佹暟鎹祦
+ var data = Newtonsoft.Json.JsonConvert.SerializeObject(upLaodData);
+ var byteData = System.Text.Encoding.UTF8.GetBytes(data);
+ var result2 = await realWay.SendFileAsync(byteData);
+ if (result2 == null || result2.Result != 0)
+ {
+ return false;
+ }
return true;
}
@@ -2546,7 +2546,7 @@
else if (backType == GatewayBackupEnum.APir鐏厜閰嶇疆)
{
var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone.ConfigureParamates>(System.Text.Encoding.UTF8.GetString(byteData));
- result = await HdlDevicePirSensorLogic.Current.SetPirSensorLightSettion((IASZone)device, recoverData);
+ result = await HdlDevicePirSensorLogic.Current.SetPirSensorSettion((IASZone)device, recoverData);
}
else if (backType == GatewayBackupEnum.A骞叉帴鐐归鑹茶皟鑺�)
{
@@ -2568,10 +2568,10 @@
int level = Convert.ToInt32(recoverData["level"]);
result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode((Panel)device, modeEnable, modeTime, level);
}
- else if (backType == GatewayBackupEnum.A骞叉帴鐐圭鏈夊睘鎬�)
+ else if (backType == GatewayBackupEnum.A骞叉帴鐐圭涓夌骇鍒鏈夊睘鎬�)
{
var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(System.Text.Encoding.UTF8.GetString(byteData));
- result = await HdlDevicePanelLogic.Current.EditorDryContactFunction((Panel)device, recoverData);
+ result = await HdlDevicePanelLogic.Current.EditorDryContactThirdFunction((Panel)device, recoverData);
}
else if (backType == GatewayBackupEnum.A绐楀笜鏂瑰悜)
{
--
Gitblit v1.8.0