From d87400af518ebc9274f4447f06476959c3aa5102 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 14 七月 2020 16:29:42 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm --- ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 45 ++++++++++++++++++++++----------------------- 1 files changed, 22 insertions(+), 23 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs index dc06e7d..6fff409 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; } @@ -585,7 +584,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 +595,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 +631,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 +639,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 +679,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 +689,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 +698,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 +707,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 +867,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 +888,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; -- Gitblit v1.8.0