From 8ce0f9b1e568dd9125e74421cd02fbc29381c1f1 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 29 七月 2020 12:53:33 +0800 Subject: [PATCH] 新版本 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs index d1eddb8..603dce4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs @@ -118,7 +118,7 @@ //濡傛灉褰撳墠鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.GetPanelColorInfo(device, keyNum); + return TemplateData.TemplateDeviceDataLogic.Current.GetPanelColorInfo(device, keyNum); } //鍙戦�佹暟鎹� keyNum杞负16杩涘埗 鑼冨洿锛�01~10 var passData = "0504040101" + Convert.ToString((int)keyNum, 16).ToUpper().PadLeft(2, '0'); @@ -215,7 +215,7 @@ //濡傛灉褰撳墠鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.SetPanelColorInfo(device, keyColorData, keyNumStatus, "ZbDataPassthrough"); + return TemplateData.TemplateDeviceDataLogic.Current.SetPanelColorInfo(device, keyColorData, keyNumStatus, null); } //鑾峰彇閰嶇疆鎸夐敭鎸囩ず鐏鑹茬殑鍛戒护瀛楃 var sendData = this.GetPanelColorCommandText(device.DeviceAddr, keyColorData, keyNumStatus); @@ -228,6 +228,10 @@ var tempD = new CommonDevice.ResponseData(); tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString(); tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); + + //娣诲姞缂撳瓨 + TemplateData.TemplateDeviceDataLogic.Current.SetPanelColorInfo(device, keyColorData, keyNumStatus, result.JsonData[0]); + return new CommonDevice.ResponseAllData { responseData = tempD }; } @@ -386,7 +390,7 @@ //濡傛灉褰撳墠鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.GetDeviceLightSettion(device); + return TemplateData.TemplateDeviceDataLogic.Current.GetDeviceLightSettion(device); } //鑾峰彇鍙戦�佺殑鍛戒护瀛楃 var passData = "050604010101"; @@ -422,7 +426,7 @@ //濡傛灉褰撳墠鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, "ZbDataPassthrough"); + return TemplateData.TemplateDeviceDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, null); } //鑾峰彇淇敼闈㈡澘鐨勪寒搴﹁皟鑺傜殑鍛戒护瀛楃 var sendData = this.GetPanelLevelCommadText(device.DeviceAddr, directionsLevel, backlightLevel); @@ -456,7 +460,7 @@ } //淇敼缂撳瓨 - ModelData.DeviceModelDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, "ZbDataPassthrough"); + TemplateData.TemplateDeviceDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, result.JsonData[0]); return true; } @@ -611,7 +615,7 @@ //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.GetDeviceEnergyConservationMode(device); + return TemplateData.TemplateDeviceDataLogic.Current.GetDeviceEnergyConservationMode(device); } //鍙戦�佸懡浠� string passData = "050804010101"; @@ -677,7 +681,7 @@ //濡傛灉褰撳墠鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, "ZbDataPassthrough"); + return TemplateData.TemplateDeviceDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, null); } //鑾峰彇璁剧疆璁惧鐨勮妭鑳芥ā寮忕殑鍛戒护瀛楃 var sendData = this.GetDeviceEnergyConservationModeCommandText(device.DeviceAddr, modeEnable, modeTime, level); @@ -707,7 +711,7 @@ } //淇敼缂撳瓨 - ModelData.DeviceModelDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, "ZbDataPassthrough"); + TemplateData.TemplateDeviceDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, result.JsonData[0]); return true; } @@ -1048,7 +1052,7 @@ //濡傛灉鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.GetPanelVibrationInfo(device); + return TemplateData.TemplateDeviceDataLogic.Current.GetPanelVibrationInfo(device); } //鍙戦�佹暟鎹� var jObject = new Newtonsoft.Json.Linq.JObject { { "DeviceAddr", device.DeviceAddr }, { "Epoint", 200 }, { "Cluster_ID", 64513 }, { "Command", 0 } }; @@ -1083,7 +1087,7 @@ //濡傛灉鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - return ModelData.DeviceModelDataLogic.Current.SetPanelVibrationInfo(device, datainfo, "ClientDataPassthrough"); + return TemplateData.TemplateDeviceDataLogic.Current.SetPanelVibrationInfo(device, datainfo, null); } //鑾峰彇缂栬緫闈㈡澘闇囧姩鍔熻兘鐨勫懡浠ゅ瓧绗� var sendData = this.GetPanelVibrationCommandText(device.DeviceAddr, datainfo); @@ -1096,6 +1100,9 @@ this.ShowTipMsg(errorMsg); return false; } + //娣诲姞缂撳瓨 + TemplateData.TemplateDeviceDataLogic.Current.SetPanelVibrationInfo(device, datainfo, result.JsonData[0]); + return true; } @@ -1258,7 +1265,6 @@ private void LoadDryContactFunctionFromLocaltion() { this.dicDryContactFunction = new Dictionary<string, DryContactFunctionInfo>(); - byte[] filebyte = HdlFileLogic.Current.ReadFileByteContent(DirNameResourse.DryContactFunctionFile); if (filebyte == null) { -- Gitblit v1.8.0