From 18a7f9f40e5fab3bee5d4ac3d8fd0273dea052d6 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期日, 26 四月 2020 12:05:28 +0800 Subject: [PATCH] 先上传一个非最新的版本 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs | 40 ++++++++++++++++++++++++++++++++-------- 1 files changed, 32 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs index 3d4e330..79f5634 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs @@ -188,7 +188,7 @@ //閫昏緫瑙﹀彂涓婃姤 else if (topic == gatewayId + "/Logic/Execute_Respon") { - this.LogicExecutePush(null); + this.LogicExecutePush(JObject.Parse(msgData)); } //鍦烘櫙瑙﹀彂涓婃姤 else if (topic == gatewayId + "/Scene/Exec_Respon") @@ -498,10 +498,10 @@ private void DoorLockDeviceReportPush(JObject receiveData) { //鍙湁寰愭鐨勯棬閿佺晫闈㈡病鏈夋墦寮�鐨勬儏鍐典笅,鎵嶄細澶勭悊杩欎釜涓滆タ - if (ControlCommonResourse.IsDoorLockPageOpen == false) + if (ControlCommonResourse.IsDoorLockPageOpen == false && UserCenterResourse.UserInfo.AuthorityNo == 1) { var device = Common.LocalDevice.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint")); - if ((device is ZigBee.Device.DoorLock) == false) + if (device.Type != DeviceType.DoorLock) { //瀹冧笉鏄棬閿� return; @@ -509,10 +509,14 @@ var info = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockAlarmsResult>(receiveData["Data"].ToString()); if (info.Clusterid == 257) { - //甯稿紑妯″紡寮�鍚� - if (info.AlarmCode == 216) + //甯稿紑妯″紡鍏抽棴 + if (info.AlarmCode == 217 || info.AlarmCode == 219) { - DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null); + HdlThreadLogic.Current.RunMain(() => + { + //寮瑰嚭寰愭鐨勯偅涓獥鍙� + DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null); + }); } } } @@ -705,10 +709,30 @@ /// <param name="receiveData"></param> private void LogicExecutePush(JObject receiveData) { - //鐩墠涓嶅鐞嗛�昏緫涓婃姤鍐呭 - //鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁� this.ShowHadNewMessageAppeal(); + + //杩欎釜涓滆タ鏆傛椂涓嶅鐞� + ////鍙湁寰愭鐨勯棬閿佺晫闈㈡病鏈夋墦寮�鐨勬儏鍐典笅,鎵嶄細澶勭悊杩欎釜涓滆タ + //if (ControlCommonResourse.IsDoorLockPageOpen == false && 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 data = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicPushResult>(receiveData["Data"].ToString()); + // if (data.ActionData != null && data.ActionData.Actiontype == 8 + // && data.ActionData.PassDataString == "055704010113") + // { + // HdlThreadLogic.Current.RunMain(() => + // { + // //寮瑰嚭寰愭鐨勯偅涓獥鍙� + // DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null); + // }); + // } + //} } #endregion -- Gitblit v1.8.0