From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 67 +++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 24 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs index dc06e7d..e295e6d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs @@ -1,7 +1,6 @@ 锘縰sing System; using System.Collections.Generic; using System.Text; -using System.Threading.Tasks; using ZigBee.Device; namespace Shared.Phone.UserCenter.DeviceDoorLock @@ -223,12 +222,12 @@ this.listHistoryInfo = null; } - HdlThreadLogic.Current.RunThread(async () => + HdlThreadLogic.Current.RunThread(() => { //鎵撳紑杩涘害鏉� this.ShowProgressBar(); //鎴愬憳鍒楄〃 - var result = await this.GetMemberListInfo(); + var result = this.GetMemberListInfo(); if (result == false) { //鍏抽棴杩涘害鏉� @@ -242,7 +241,7 @@ dicMemberName.Add(listMenberInfo[i].SubAccountDistributedMark, string.IsNullOrEmpty(listMenberInfo[i].UserName) == false ? listMenberInfo[i].UserName : listMenberInfo[i].Account); } //鍘嗗彶璁板綍 - var historyLog = await this.GetHistoryLogInfo(dicMemberName); + var historyLog = this.GetHistoryLogInfo(dicMemberName); if (historyLog == null) { //鍏抽棴杩涘害鏉� @@ -276,7 +275,7 @@ /// 鑾峰彇鎴愬憳鍒楄〃淇℃伅 /// </summary> /// <returns></returns> - private async Task<bool> GetMemberListInfo() + private bool GetMemberListInfo() { if (listMenberInfo != null) { @@ -299,8 +298,8 @@ } var pra = new MemberListInfoPra(); - string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra); - if (result == null) + string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra); + if (string.IsNullOrEmpty(result) == true) { return false; } @@ -422,6 +421,16 @@ //IC鍗″紑閿佹垚鍔� btnMsg.TextID = R.MyInternationalizationString.uUnlockByICcardSuccess; } + else if (historyInfo.OpenLockMode == 13) + { + //闈欒剦绾瑰紑閿佹垚鍔� + btnMsg.TextID = R.MyInternationalizationString.uStriaVenosusUnLockSuccess; + } + else if (historyInfo.OpenLockMode == 14) + { + //浜鸿劯璇嗗埆寮�閿佹垚鍔� + btnMsg.TextID = R.MyInternationalizationString.uFaceRecognitionUnLockSuccess; + } else if (historyInfo.OpenLockMode == 15) { //鎸囩汗寮�閿佹垚鍔� @@ -443,6 +452,16 @@ { //IC鍗″紑閿佸け璐� btnMsg.TextID = R.MyInternationalizationString.uUnlockByICcardFail; + } + else if (historyInfo.OpenLockMode == 13) + { + //闈欒剦绾瑰紑閿佸け璐� + btnMsg.TextID = R.MyInternationalizationString.uStriaVenosusUnLockFail; + } + else if (historyInfo.OpenLockMode == 14) + { + //浜鸿劯璇嗗埆寮�閿佸け璐� + btnMsg.TextID = R.MyInternationalizationString.uFaceRecognitionUnLockFail; } else if (historyInfo.OpenLockMode == 15) { @@ -585,7 +604,7 @@ /// 鑾峰彇鍘嗗彶璁板綍 /// </summary> /// <returns></returns> - private async Task<List<HistoryInfo>> GetHistoryLogInfo(Dictionary<string, string> dicMemberName) + private List<HistoryInfo> GetHistoryLogInfo(Dictionary<string, string> dicMemberName) { if (this.listHistoryInfo != null) { @@ -596,9 +615,9 @@ var pra = this.GetReadHistoryPra(); //鑾峰彇闂ㄩ攣鐨勬墦寮�鍜屽叧闂褰� - var listAllLog = await this.GetDoorOpenHistoryLog(pra); + var listAllLog = this.GetDoorOpenHistoryLog(pra); //鑾峰彇闂ㄩ攣鐨勫叾浠栬褰� - var listOtherLog = await this.GetDoorOtherHistoryLog(pra.UnlockTimeBegin, pra.UnlockTimeEnd); + var listOtherLog = this.GetDoorOtherHistoryLog(pra.UnlockTimeBegin, pra.UnlockTimeEnd); listAllLog.AddRange(listOtherLog); //鎺掑簭涓�涓� @@ -632,7 +651,7 @@ /// </summary> /// <param name="i_pra"></param> /// <returns></returns> - private async Task<List<HistoryInfo>> GetDoorOpenHistoryLog(GetHistoryDataPra i_pra) + private List<HistoryInfo> GetDoorOpenHistoryLog(GetHistoryDataPra i_pra) { var listLog = new List<HistoryInfo>(); @@ -640,8 +659,8 @@ while (true) { //璁块棶浜戠 - var result = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockHistoryPager", true, i_pra); - if (result == null) + var result = UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockHistoryPager", true, i_pra); + if (string.IsNullOrEmpty(result) == true) { return null; } @@ -680,7 +699,7 @@ /// 鑾峰彇闂ㄩ攣鐨勫叾浠栬褰� /// </summary> /// <returns></returns> - private async Task<List<HistoryInfo>> GetDoorOtherHistoryLog(string beginTime, string endTime) + private List<HistoryInfo> GetDoorOtherHistoryLog(string beginTime, string endTime) { var listLog = new List<HistoryInfo>(); @@ -690,8 +709,8 @@ pra2.EndTime = endTime; pra2.Topic = "/Alarms/SendAlarmInform"; pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); - var result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); - if (result == null) + var result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); + if (string.IsNullOrEmpty(result) == true) { return null; } @@ -699,8 +718,8 @@ //浠庤嚜鍔ㄥ寲涓�,鑾峰彇甯稿紑妯″紡璁板綍 pra2.Topic = "/Logic/Execute_Respon"; - result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); - if (result == null) + result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); + if (string.IsNullOrEmpty(result) == true) { return null; } @@ -708,8 +727,8 @@ //鑾峰彇闂ㄩ攣涓存椂瀵嗙爜寮�閿佽褰� pra2.Topic = "/DoorLock/DoorLockOperatingEventNotificationCommand"; - result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); - if (result == null) + result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); + if (string.IsNullOrEmpty(result) == true) { return null; } @@ -868,14 +887,14 @@ /// <summary> /// 娓呯┖鎵�鏈夎褰� /// </summary> - private async void ClearAllHistoryLog() + private void ClearAllHistoryLog() { //鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(2020.05.08:鍏ㄩ儴娓呯┖) var pra = this.GetDeleteDataPra(); //鎵撳紑杩涘害鏉� this.ShowProgressBar(); - var result = await UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/ClearDoorLockHistory", true, pra); + var result = UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/ClearDoorLockHistory", true, pra); if (result == false) { return; @@ -889,7 +908,7 @@ for (int i = 0; i < listOtherMsgId.Count; i++) { pra2.Id = listOtherMsgId[i]; - result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra2); + result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra2); if (result == false) { return; @@ -1066,7 +1085,7 @@ private class HistoryInfo { /// <summary> - /// 寮�閿佹柟寮� 0:瀵嗙爜 15:鎸囩汗 3:IC鍗� 9000:甯稿紑妯″紡(鑷畾涔夌殑) + /// 寮�閿佹柟寮� 0:瀵嗙爜 13:闈欒剦绾� 14:浜鸿劯璇嗗埆 15:鎸囩汗 3:IC鍗� 9000:甯稿紑妯″紡(鑷畾涔夌殑) /// </summary> public int OpenLockMode = -1; /// <summary> -- Gitblit v1.8.0