xm
2020-07-31 ecba45c93391066bc30c7bd602c3a7683fbb99a7
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceCurtainLogic.cs
@@ -1,6 +1,6 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Shared.Phone.TemplateData;
using Shared.Phone.ModelData;
using System;
using System.Collections.Generic;
using System.Text;
@@ -51,7 +51,7 @@
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                //添加缓存
                TemplateDeviceDataLogic.Current.SetCurtainHandPullControl(device, bolStatu, null);
                DeviceModelDataLogic.Current.SetCurtainHandPullControl(device, bolStatu, "SetWritableValue");
                return true;
            }
            //获取发送的命令字符
@@ -81,9 +81,6 @@
                this.ShowTipMsg(msg);
                return false;
            }
            //添加缓存
            TemplateDeviceDataLogic.Current.SetCurtainHandPullControl(device, bolStatu, result.JsonData[0]);
            return true;
        }
@@ -153,7 +150,7 @@
            //如果当前是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return TemplateDeviceDataLogic.Current.SetCurtainDirection(device, isDirectionReversed, null);
                return ModelData.DeviceModelDataLogic.Current.SetCurtainDirection(device, isDirectionReversed, "SetWritableValue");
            }
            //获取编辑窗帘方向的命令字符
            var sendData = this.GetCurtainDirectionCommadText(device.DeviceAddr, device.DeviceEpoint, isDirectionReversed);
@@ -162,9 +159,6 @@
            {
                return null;
            }
            //添加缓存
            TemplateDeviceDataLogic.Current.SetCurtainDirection(device, isDirectionReversed, result.JsonData[0]);
            var tempData = JsonConvert.DeserializeObject<CommonDevice.SetWritableValueResponData>(result.ReceiptData);
            return new CommonDevice.SetWritableValueResponAllData { setWritableValueResponData = tempData };
@@ -205,7 +199,7 @@
            //如果当前是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return TemplateData.TemplateDeviceDataLogic.Current.SetCurtainLimitPoint(rollershade, upLimit, downLimit, curtainLength, null);
                return ModelData.DeviceModelDataLogic.Current.SetCurtainLimitPoint(rollershade, upLimit, downLimit, curtainLength, "SetWritableValue");
            }
            //获取编辑开合帘限位的命令字符
            var sendData = this.GetAutoOpenCurtainLimitPointCommandText(rollershade.DeviceAddr, rollershade.DeviceEpoint, upLimit, downLimit);
@@ -227,9 +221,6 @@
                this.ShowTipMsg(msg);
                return false;
            }
            //添加缓存
            TemplateDeviceDataLogic.Current.SetCurtainLimitPoint(rollershade, upLimit, downLimit, curtainLength, result.JsonData[0]);
            return true;
        }