黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/Common/Logic/HdlDeviceBindLogic.cs
@@ -76,7 +76,7 @@
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                var listBind = TemplateData.TemplateDeviceDataLogic.Current.GetDeviceBindList(device);
                var listBind = HdlTemplateDeviceDataLogic.Current.GetDeviceBindList(device);
                return new BindObj.GetDeviceBindResponseAllData()
                {
                    getAllBindResponseData = new BindObj.GetDeviceBindResponseData
@@ -177,7 +177,7 @@
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return TemplateData.TemplateDeviceDataLogic.Current.AddDeviceBindList(addBindData, null);
                return HdlTemplateDeviceDataLogic.Current.AddDeviceBindList(addBindData, null);
            }
            var device = HdlDeviceCommonLogic.Current.GetDevice(addBindData.DeviceAddr, addBindData.Epoint);
@@ -191,7 +191,7 @@
            }
            //修改缓存
            TemplateData.TemplateDeviceDataLogic.Current.AddDeviceBindList(addBindData, result.JsonData[0]);
            HdlTemplateDeviceDataLogic.Current.AddDeviceBindList(addBindData, result.JsonData[0]);
            var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<BindObj.AddedDeviceBindResponseData>(result.ReceiptData);
            return new BindObj.AddedDeviceBindResponseAllData() { addedDeviceBindResponseData = tempData };
        }
@@ -466,7 +466,7 @@
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return TemplateData.TemplateDeviceDataLogic.Current.DeleteDeviceBindList(delDeviceBindData);
                return HdlTemplateDeviceDataLogic.Current.DeleteDeviceBindList(delDeviceBindData);
            }
            var device = HdlDeviceCommonLogic.Current.GetDevice(delDeviceBindData.DeviceAddr, delDeviceBindData.Epoint);
            //获取需要发送的数据
@@ -493,7 +493,7 @@
            }
            //修改缓存
            TemplateData.TemplateDeviceDataLogic.Current.DeleteDeviceBindList(delDeviceBindData);
            HdlTemplateDeviceDataLogic.Current.DeleteDeviceBindList(delDeviceBindData);
            return responseData;
        }
@@ -506,7 +506,7 @@
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return TemplateData.TemplateDeviceDataLogic.Current.ClearDeviceAllBind(device);
                return HdlTemplateDeviceDataLogic.Current.ClearDeviceAllBind(device);
            }
            var jObject = new JObject { { "DeviceAddr", device.DeviceAddr }, { "Epoint", device.DeviceEpoint }, { "Cluster_ID", 0 }, { "Command", 5006 } };
@@ -518,7 +518,7 @@
            }
            //修改缓存
            TemplateData.TemplateDeviceDataLogic.Current.ClearDeviceAllBind(device);
            HdlTemplateDeviceDataLogic.Current.ClearDeviceAllBind(device);
            var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<BindObj.ClearBindInfoResponseData>(result.ReceiptData);
            return new BindObj.ClearBindInfoResponseAllData { clearBindInfoResponseData = tempData };
@@ -706,7 +706,7 @@
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return TemplateData.TemplateDeviceDataLogic.Current.ConfigurePanelKeyModel(device, value, clusterID, null);
                return HdlTemplateDeviceDataLogic.Current.ConfigurePanelKeyModel(device, value, clusterID, null);
            }
            //获取发送数据
            var sendData = this.GetConfigureHdlKeyCommandText(device.DeviceAddr, device.DeviceEpoint, value, clusterID);
@@ -717,7 +717,7 @@
            }
            //修改缓存
            TemplateData.TemplateDeviceDataLogic.Current.ConfigurePanelKeyModel(device, value, clusterID, result.JsonData[0]);
            HdlTemplateDeviceDataLogic.Current.ConfigurePanelKeyModel(device, value, clusterID, result.JsonData[0]);
            var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.SetWritableValueResponData>(result.ReceiptData);
            return new CommonDevice.SetWritableValueResponAllData { setWritableValueResponData = tempData };
@@ -731,7 +731,7 @@
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true || Common.Config.Instance.Home.IsShowTemplate == true)
            {
                return TemplateData.TemplateDeviceDataLogic.Current.ReadPanelConfigureKeyModel(device);
                return HdlTemplateDeviceDataLogic.Current.ReadPanelConfigureKeyModel(device);
            }
            var JObject = new JObject {{ "DeviceAddr",device.DeviceAddr },{ "Epoint", device.DeviceEpoint },