From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 11 九月 2020 09:16:59 +0800
Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
index 603dce4..095850c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
@@ -604,6 +604,48 @@
}
#endregion
+ #region 鈻� 鏍℃娓╁害___________________________
+ /// <summary>
+ /// 鏍℃娓╁害
+ /// </summary>
+ /// <param name="device">璁惧瀵硅薄</param>
+ /// <param name="correctValue">鏍℃娓╁害鍊�</param>
+ /// <param name="direction">琛ュ伩鏂瑰悜0涓嶈ˉ鍋� 1锛氭鍚戯紱2锛氬弽鍚�</param>
+ /// <param name="type">0 娓╁害 锛�1 婀垮害</param>
+ /// <returns></returns>
+ public async Task<bool> CorrectTemperature(CommonDevice device, double correctValue, int direction = 0, int type = 0)
+ {
+ //鍊熺敤瀹冪殑鍑絫
+ var panel = new Panel();
+ panel.DeviceAddr = device.DeviceAddr;
+ panel.DeviceEpoint = 200;
+ panel.CurrentGateWayId = device.CurrentGateWayId;
+
+ var result = await panel.CorrectTemperature(correctValue, direction, type);
+ panel = null;
+
+ //鍏遍�氶敊璇娴�
+ string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
+ if (error != null)
+ {
+ this.ShowErrorMsg(error);
+ return false;
+ }
+
+ if (result == null || result.responseData == null)
+ {
+ //鐭娓╁害澶辫触
+ string msg = Language.StringByID(R.MyInternationalizationString.DataCorrectionFailed);
+ //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg
+ msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
+
+ this.ShowTipMsg(msg);
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
#region 鈻� 鑺傝兘妯″紡___________________________
/// <summary>
/// 鑾峰彇璁惧鑺傝兘妯″紡鐨勯厤缃姸鎬�(ui鍙妭鑳芥ā寮�)
--
Gitblit v1.8.0