From 6c027ca3f13f622c59f45c42f476dd9939ad5226 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 21 五月 2020 13:49:21 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm --- ZigbeeApp20200519/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs | 121 +++++++++++++++++++-------------------- 1 files changed, 59 insertions(+), 62 deletions(-) diff --git a/ZigbeeApp20200519/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp20200519/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs index 7340706..77e3daa 100644 --- a/ZigbeeApp20200519/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs +++ b/ZigbeeApp20200519/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs @@ -599,39 +599,36 @@ /// </summary> /// <param name="receiveData"></param> private void DoorLockDeviceReportPush(JObject receiveData) - { - if (UserCenterResourse.UserInfo.AuthorityNo == 1) - { - var device = Common.LocalDevice.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint")); - if (device.Type != DeviceType.DoorLock) - { - //瀹冧笉鏄棬閿� - return; - } - - var info = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockAlarmsResult>(receiveData["Data"].ToString()); - if (info.Clusterid == 257) - { - //216锛氶攣涓婅缃殑甯稿紑 - if (info.AlarmCode == 216) - { - HdlThreadLogic.Current.RunThread(async () => - { - HdlThreadLogic.Current.RunMain(() => - { - //鏇存柊闂ㄩ攣娑夊強鐨勫父寮�/甯稿叧鐨勭晫闈� - if (UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction != null) - { - UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(device.DeviceAddr + device.DeviceEpoint, true); - } - }); - }); - } - } - //鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁� - this.ShowHadNewMessageAppeal(); - } - } + { + if (UserCenterResourse.UserInfo.AuthorityNo == 1) + { + var device = Common.LocalDevice.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint")); + if (device.Type != DeviceType.DoorLock) + { + //瀹冧笉鏄棬閿� + return; + } + + var info = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockAlarmsResult>(receiveData["Data"].ToString()); + if (info.Clusterid == 257) + { + //216锛氶攣涓婅缃殑甯稿紑 + if (info.AlarmCode == 216) + { + HdlThreadLogic.Current.RunMain(() => + { + //鏇存柊闂ㄩ攣娑夊強鐨勫父寮�/甯稿叧鐨勭晫闈� + if (UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction != null) + { + UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(device.DeviceAddr + device.DeviceEpoint, true); + } + }); + } + } + //鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁� + this.ShowHadNewMessageAppeal(); + } + } #endregion #region 鈻� 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣坃______________ @@ -823,38 +820,38 @@ private void LogicExecutePush(JObject receiveData) { //鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁� - this.ShowHadNewMessageAppeal(); - - // 閫昏緫鎵ц甯稿紑妯″紡澶辨晥鐨勬儏鍐� + this.ShowHadNewMessageAppeal(); + + // 閫昏緫鎵ц甯稿紑妯″紡澶辨晥鐨勬儏鍐� if (UserCenterResourse.UserInfo.AuthorityNo == 1) - { - //鑷姩鍖栨墽琛� 甯稿紑鍏抽棴 + { + //鑷姩鍖栨墽琛� 甯稿紑鍏抽棴 var data = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicPushResult>(receiveData["Data"].ToString()); - if (data != null && data.ActionData != null) - { - if (data.ActionData.Actiontype == 8 && data.ActionData.PassDataString == "055704010113") - { - var deviceAddr = data.ActionData.MacStr; - var device = Common.LocalDevice.Current.GetDevicesByMac(deviceAddr, false); - if (device.Count > 0 && device[0].Type != DeviceType.DoorLock) - { - return; - } - - HdlThreadLogic.Current.RunThread(async () => - { - var result = await Shared.Phone.Device.Logic.SkipView.Exist(3, (ZigBee.Device.DoorLock)device[0]); - HdlThreadLogic.Current.RunMain(() => - { - //寮瑰嚭寰愭鐨勯偅涓獥鍙� - DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device[0], DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, - result != 0 ? true : false, ControlCommonResourse.UpdateDoorLockStatusAction); - }); - }); - } - } + if (data != null && data.ActionData != null) + { + if (data.ActionData.Actiontype == 8 && data.ActionData.PassDataString == "055704010113") + { + var deviceAddr = data.ActionData.MacStr; + var device = Common.LocalDevice.Current.GetDevicesByMac(deviceAddr, false); + if (device.Count > 0 && device[0].Type != DeviceType.DoorLock) + { + return; + } + + HdlThreadLogic.Current.RunThread(async () => + { + var result = await Shared.Phone.Device.Logic.SkipView.Exist(3, (ZigBee.Device.DoorLock)device[0]); + HdlThreadLogic.Current.RunMain(() => + { + //寮瑰嚭寰愭鐨勯偅涓獥鍙� + DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device[0], DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, + result != 0 ? true : false, ControlCommonResourse.UpdateDoorLockStatusAction); + }); + }); + } + } } - } + } #endregion #region 鈻� 鍦烘櫙瑙﹀彂涓婃姤_______________________ -- Gitblit v1.8.0