黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/Common/Logic/HdlDeviceAirConditionerLogic.cs
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs
@@ -5,7 +5,7 @@
using System.Threading.Tasks;
using ZigBee.Device;
namespace Shared.Phone.UserCenter
namespace Shared.Phone
{
    /// <summary>
    /// 空调的逻辑
@@ -46,7 +46,7 @@
        {
            var result = await device.Open();
            //检测网关返回的共通错误状态码
            string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
            string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result);
            if (error != null)
            {
                this.ShowTipMsg(error);
@@ -57,7 +57,7 @@
                //打开空调失败
                string msg = Language.StringByID(R.MyInternationalizationString.uOpenAirConditionerFail);
                //拼接上【网关回复超时】的Msg
                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
                msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result);
                this.ShowTipMsg(msg);
                return false;
            }
@@ -84,7 +84,7 @@
        {
            var result = await device.Close();
            //检测网关返回的共通错误状态码
            string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
            string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result);
            if (error != null)
            {
                this.ShowTipMsg(error);
@@ -95,7 +95,7 @@
                //关闭空调失败
                string msg = Language.StringByID(R.MyInternationalizationString.uCloseAirConditionerFail);
                //拼接上【网关回复超时】的Msg
                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
                msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result);
                this.ShowTipMsg(msg);
                return false;
            }
@@ -125,7 +125,7 @@
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                //直接添加缓存
                TemplateData.TemplateDeviceDataLogic.Current.SetAcModeSupport(device, data, null);
                HdlTemplateDeviceDataLogic.Current.SetAcModeSupport(device, data, null);
                return true;
            }
            //发送数据
@@ -141,7 +141,7 @@
                //设置空调模式失败
                string msg = Language.StringByID(R.MyInternationalizationString.uSetAcModeFail);
                //拼接上【网关回复超时】的Msg
                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
                msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result);
                this.ShowTipMsg(msg); ;
                return false;
            }
@@ -156,7 +156,7 @@
            }
            //添加缓存
            TemplateData.TemplateDeviceDataLogic.Current.SetAcModeSupport(device, data, result.JsonData[0]);
            HdlTemplateDeviceDataLogic.Current.SetAcModeSupport(device, data, result.JsonData[0]);
            return true;
        }
@@ -177,7 +177,7 @@
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                //直接添加缓存
                TemplateData.TemplateDeviceDataLogic.Current.SetAcSwingModeSupport(device, data, null);
                HdlTemplateDeviceDataLogic.Current.SetAcSwingModeSupport(device, data, null);
                return true;
            }
            //发送数据
@@ -193,7 +193,7 @@
                //设置空调摆风失败
                string msg = Language.StringByID(R.MyInternationalizationString.uSetAirConditionerSwingFunctionFail);
                //拼接上【网关回复超时】的Msg
                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
                msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result);
                this.ShowTipMsg(msg);
                return false;
            }
@@ -208,7 +208,7 @@
            }
            //添加缓存
            TemplateData.TemplateDeviceDataLogic.Current.SetAcSwingModeSupport(device, data, result.JsonData[0]);
            HdlTemplateDeviceDataLogic.Current.SetAcSwingModeSupport(device, data, result.JsonData[0]);
            return true;
        }