From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 14 十二月 2020 11:16:06 +0800 Subject: [PATCH] 合并了晾衣架(非新云端) --- ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 771 +++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 515 insertions(+), 256 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs index 65d3a8d..e295e6d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs @@ -43,7 +43,7 @@ /// <summary> /// 鑾峰彇鍒扮殑鍘嗗彶璁板綍 /// </summary> - private List<DoorHistoryLogInfo> listHistoryInfo = null; + private List<HistoryInfo> listHistoryInfo = null; /// <summary> /// 鍏朵粬娑堟伅鐨勪富閿�,瀹冨瓨鍦ㄥ彟澶栫殑涓�寮犳暟鎹簱琛ㄤ腑 /// </summary> @@ -56,16 +56,16 @@ /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) /// </summary> - /// <param name="i_DeviceMac">闂ㄩ攣鐨凪ac鍦板潃</param> - public void ShowForm(string i_DeviceMac) + /// <param name="i_DeviceMac">闂ㄩ攣鐨凪ac鍦板潃</param> + public void ShowForm(string i_DeviceMac) { - this.DeviceDoor = HdlDeviceCommonLogic.Current.GetDevicesByMac(i_DeviceMac, false)[0]; - - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uHistoryLog)); - - //鎴愬憳涓嶅厑璁告竻绌鸿褰� - if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2) + this.DeviceDoor = Common.LocalDevice.Current.GetDevicesByMac(i_DeviceMac, false)[0]; + + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uHistoryLog)); + + //鎴愬憳涓嶅厑璁告竻绌鸿褰� + if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2) { //鍒犻櫎 var btnDelete = new MostRightIconControl(69, 69); @@ -94,21 +94,21 @@ }); }); }; - } - - //鍒濆鍖栦腑閮ㄤ俊鎭� - this.InitMiddleFrame(); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄤ俊鎭� - /// </summary> - private void InitMiddleFrame() + } + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() { //娓呯┖bodyFrame - this.ClearBodyFrame(); - - //鍒濆鍖栧ご閮ㄦ绱㈡帶浠� + this.ClearBodyFrame(); + + //鍒濆鍖栧ご閮ㄦ绱㈡帶浠� this.InitTitleSearchControl(); //鍒濆鍖栬褰曞垪琛� @@ -120,10 +120,10 @@ /// </summary> private void InitTitleSearchControl() { - var frameTitle = new FrameRowControl(); - frameTitle.UseClickStatu = false; - frameTitle.Height = Application.GetRealHeight(115); - frameTitle.BackgroundColor = topFrameLayout.BackgroundColor; + var frameTitle = new FrameRowControl(); + frameTitle.UseClickStatu = false; + frameTitle.Height = Application.GetRealHeight(115); + frameTitle.BackgroundColor = topFrameLayout.BackgroundColor; bodyFrameLayout.AddChidren(frameTitle); var btnDateIcon = frameTitle.AddLeftIcon(69); @@ -238,7 +238,7 @@ var dicMemberName = new Dictionary<string, string>(); for (int i = 0; i < listMenberInfo.Count; i++) { - dicMemberName.Add(listMenberInfo[i].ChildAccountId, listMenberInfo[i].ShowName); + dicMemberName.Add(listMenberInfo[i].SubAccountDistributedMark, string.IsNullOrEmpty(listMenberInfo[i].UserName) == false ? listMenberInfo[i].UserName : listMenberInfo[i].Account); } //鍘嗗彶璁板綍 var historyLog = this.GetHistoryLogInfo(dicMemberName); @@ -286,31 +286,32 @@ //鎶婅嚜宸变篃鍔犺繘鍘� var myInfo = new MemberInfoRes() { - ChildAccountEmail = HdlUserCenterResourse.UserInfo.UserEmail, - ChildAccountPhone = HdlUserCenterResourse.UserInfo.UserPhone, - ChildNickName = HdlUserCenterResourse.UserInfo.NickName, - ChildAccountId = Common.Config.Instance.Guid + Account = UserCenterResourse.UserInfo.Account, + UserName = UserCenterResourse.UserInfo.UserName, + SubAccountDistributedMark = Common.Config.Instance.Guid }; listMenberInfo.Add(myInfo); - if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 3) + if (UserCenterResourse.UserInfo.AuthorityNo == 3) { //鎴愬憳鍙兘鐪嬭嚜宸辩殑 return true; } - //鑾峰彇鎴愬憳鍒楄〃 - var listInfo = HdlMemberLogic.Current.GetMemberListInfo(ShowNetCodeMode.YES); - if (listInfo == null) + + var pra = new MemberListInfoPra(); + string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra); + if (string.IsNullOrEmpty(result) == true) { return false; } + List<MemberInfoRes> listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MemberInfoRes>>(result); var checkList = new List<string>(); foreach (MemberInfoRes infoRes in listInfo) { - if (checkList.Contains(infoRes.ChildAccountId) == true) + if (checkList.Contains(infoRes.DistributedMark) == true) { continue; } - checkList.Add(infoRes.ChildAccountId); + checkList.Add(infoRes.DistributedMark); listMenberInfo.Add(infoRes); } return true; @@ -326,7 +327,7 @@ /// <param name="historyInfo">鍘嗗彶璁板綍</param> /// <param name="dicName">鍚嶅瓧</param> /// <param name="addLine">娣诲姞搴曠嚎</param> - private void AddLogInfoRow(DoorHistoryLogInfo historyInfo, Dictionary<string, string> dicName, bool addLine = true) + private void AddLogInfoRow(HistoryInfo historyInfo, Dictionary<string, string> dicName, bool addLine = true) { var frameTable = new FrameRowControl(listView.rowSpace / 2); frameTable.UseClickStatu = false; @@ -336,18 +337,18 @@ //淇℃伅 var btnMsg = frameTable.AddTopView("", 600); //浜虹墿 - string perName = dicName.ContainsKey(historyInfo.UserId) == true ? dicName[historyInfo.UserId] : Language.StringByID(R.MyInternationalizationString.uOther); + string perName = dicName.ContainsKey(historyInfo.CloudAccountId) == true ? dicName[historyInfo.CloudAccountId] : Language.StringByID(R.MyInternationalizationString.uOther); frameTable.AddBottomView(perName, 600); //鏃堕棿 if (this.dateFromControl.dateValue == this.dateToControl.dateValue) { //濡傛灉鏃ユ湡鑼冨洿涓�鏍�,鍒欎笉鏄剧ず骞存湀鏃� - frameTable.AddMostRightView(HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(historyInfo.UnlockTime).ToString("HH:mm:ss"), 400); + frameTable.AddMostRightView(UserCenterLogic.ConvertUtcTimeToLocalTime(historyInfo.UnlockTime).ToString("HH:mm:ss"), 400); } else { //濡傛灉鏃ユ湡鑼冨洿涓嶄竴鏍�,鍒欐樉绀哄勾鏈堟棩 - frameTable.AddMostRightView(HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(historyInfo.UnlockTime).ToString("yyyy/MM/dd HH:mm:ss"), 700); + frameTable.AddMostRightView(UserCenterLogic.ConvertUtcTimeToLocalTime(historyInfo.UnlockTime).ToString("yyyy/MM/dd HH:mm:ss"), 700); } //搴曠嚎 if (addLine == true) @@ -357,74 +358,80 @@ } //鍏朵粬娑堟伅 - if (historyInfo.UnLockMode == -1) + if (historyInfo.OpenLockMode == -1) { //鍥剧墖 - var device = HdlDeviceCommonLogic.Current.GetDevice(historyInfo.DeviceMac, historyInfo.DeviceEpoint); + var device = Common.LocalDevice.Current.GetDevice(historyInfo.DeviceMac, historyInfo.DeviceEpoint); if (device == null) { btnIcon.UnSelectedImagePath = "Device/IntelligentLocks.png"; } else { - HdlDeviceCommonLogic.Current.SetDeviceIconToControl(btnIcon, device); + Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device); } //娑堟伅 btnMsg.Text = historyInfo.AlarmMsg; } //闂ㄩ攣甯稿紑妯″紡 - else if (historyInfo.UnLockMode == 9000) + else if (historyInfo.OpenLockMode == 9000) { //鍥剧墖 btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png"; - //杩欓噷鏄綉鍏虫垨鑰呴棬閿佽嚜宸辨帹閫� - btnMsg.Text = historyInfo.AlarmMsg; - } - //甯稿紑妯″紡鎵嬪姩寮�鍚� - else if (historyInfo.UnLockMode == 9001) - { - //鍥剧墖 - btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png"; - btnMsg.TextID = R.MyInternationalizationString.uNormallyOpenModeManualOpen; - } - //甯稿紑妯″紡鎵嬪姩鍙栨秷 - else if (historyInfo.UnLockMode == 9002) - { - //鍥剧墖 - btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png"; - btnMsg.TextID = R.MyInternationalizationString.uNormallyOpenModeManualClose; - } - //甯稿紑妯″紡鍚敤{0}灏忔椂 - else if (historyInfo.UnLockMode == 9003) - { - //鍥剧墖 - btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png"; - btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenModeOpenSomeTime).Replace("{0}", historyInfo.NormallyOpenContinuedTime); - } - //甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� - else if (historyInfo.UnLockMode == 9004) - { - //鍥剧墖 - btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png"; - btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenLogicManualClose); + //娑堟伅 + if (historyInfo.OtherOpenLockMode == 9001) + { + //甯稿紑妯″紡鎵嬪姩寮�鍚� + btnMsg.TextID = R.MyInternationalizationString.uNormallyOpenModeManualOpen; + } + else if (historyInfo.OtherOpenLockMode == 9002) + { + //甯稿紑妯″紡鎵嬪姩鍙栨秷 + btnMsg.TextID = R.MyInternationalizationString.uNormallyOpenModeManualClose; + } + else if (historyInfo.OtherOpenLockMode == 9003) + { + //甯稿紑妯″紡鍚敤{0}灏忔椂 + btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenModeOpenSomeTime).Replace("{0}", historyInfo.NormallyOpenContinuedTime); + } + else if (historyInfo.OtherOpenLockMode == 9004) + { + //甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� + btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenLogicManualClose); + } + else + { + //涓婇潰鏄疉pp鎵嬪姩鎺ㄩ��,杩欓噷鏄綉鍏虫垨鑰呴棬閿佽嚜宸辨帹閫� + btnMsg.Text = historyInfo.AlarmMsg; + } } //寮�閿佹垚鍔� - else if (historyInfo.IsUnlockSuccess == true) + else if (historyInfo.UnlockIsSuccess == true) { //鍥剧墖 btnIcon.UnSelectedImagePath = "Item/UnLockSuccess.png"; //娑堟伅 - if (historyInfo.UnLockMode == 0) + if (historyInfo.OpenLockMode == 0) { //瀵嗙爜寮�閿佹垚鍔� btnMsg.TextID = R.MyInternationalizationString.uUnlockByPasswordSuccess; } - else if (historyInfo.UnLockMode == 3) + else if (historyInfo.OpenLockMode == 3) { //IC鍗″紑閿佹垚鍔� btnMsg.TextID = R.MyInternationalizationString.uUnlockByICcardSuccess; } - else if (historyInfo.UnLockMode == 15) + 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) { //鎸囩汗寮�閿佹垚鍔� btnMsg.TextID = R.MyInternationalizationString.uUnlockByFingerPrintSuccess; @@ -436,17 +443,27 @@ //鍥剧墖 btnIcon.UnSelectedImagePath = "Item/UnLockFail.png"; //娑堟伅 - if (historyInfo.UnLockMode == 0) + if (historyInfo.OpenLockMode == 0) { //瀵嗙爜寮�閿佸け璐� btnMsg.TextID = R.MyInternationalizationString.uUnlockByPasswordFail; } - else if (historyInfo.UnLockMode == 3) + else if (historyInfo.OpenLockMode == 3) { //IC鍗″紑閿佸け璐� btnMsg.TextID = R.MyInternationalizationString.uUnlockByICcardFail; } - else if (historyInfo.UnLockMode == 15) + 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) { //鎸囩汗寮�閿佸け璐� btnMsg.TextID = R.MyInternationalizationString.uUnlockByFingerPrintFail; @@ -466,7 +483,7 @@ var dic = new Dictionary<string, string>(); for (int i = 0; i < listMenberInfo.Count; i++) { - dic.Add(listMenberInfo[i].ChildAccountId, listMenberInfo[i].ShowName); + dic.Add(listMenberInfo[i].SubAccountDistributedMark, string.IsNullOrEmpty(listMenberInfo[i].UserName) == false ? listMenberInfo[i].UserName : listMenberInfo[i].Account); } //鏄剧ず搴曢儴绫诲瀷绛涢�� var form = new DoorLockScreeningTypeForm(); @@ -490,10 +507,10 @@ /// 绛涢�夊巻鍙茶褰� /// </summary> /// <returns></returns> - private List<DoorHistoryLogInfo> ScreeningHistoryData(Dictionary<string, string> dicMemberName) + private List<HistoryInfo> ScreeningHistoryData(Dictionary<string, string> dicMemberName) { //鍘嗗彶璁板綍澶夯鐑︿簡,瀛樺湪涓嶅悓鐨勬暟鎹簱琛ㄩ噷,骞朵笖鏁版嵁杩樹笉涓�鏍�,鍙兘杩欐牱涓�涓釜鍒ゆ柇浜� - var listScreeningData = new List<DoorHistoryLogInfo>(); + var listScreeningData = new List<HistoryInfo>(); //娓呴櫎鎺変箣鍓嶇殑璁板綍 this.listOtherMsgId = new List<string>(); @@ -526,16 +543,16 @@ /// <param name="selectAllUser">鏄惁閫夋嫨鍏ㄩ�夌敤鎴�</param> /// <param name="selectOtherUser">鏄惁鍗曢�変簡鍏朵粬</param> /// <param name="slectAllLockMode">鏄惁閫夋嫨鍏ㄩ�夊紑閿佹柟寮�</param> - private bool CheckHistoryDataCanShow(DoorHistoryLogInfo info, Dictionary<string, string> dicMemberName, + private bool CheckHistoryDataCanShow(HistoryInfo info, Dictionary<string, string> dicMemberName, bool selectAllUser, bool selectOtherUser, bool slectAllLockMode) { //濡傛灉娌℃湁閫夋嫨 鍏ㄩ�夌敤鎴� if (selectAllUser == false) { //濡傛灉杩欎釜鐢ㄦ埛ID涓嶅寘鍚湪鎸囧畾閫夋嫨鐨勬垚鍛樺垪琛ㄩ噷闈� - if (this.listSearchUserId.Contains(info.UserId) == false) + if (this.listSearchUserId.Contains(info.CloudAccountId) == false) { - if (dicMemberName.ContainsKey(info.UserId) == true) + if (dicMemberName.ContainsKey(info.CloudAccountId) == true) { //濡傛灉鑳藉璇嗗埆杩欎釜id鐨勮瘽,鍒欒〃绀哄畠涓嶅睘浜庡叾浠栫被,骞朵笖涔熶笉鍐嶉�夋嫨鐩爣鍐� return false; @@ -548,10 +565,10 @@ } } //濡傛灉鏄垚鍛樿韩浠�,骞朵笖鐢ㄦ埛ID涓嶄负绌� - if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 3 && info.UserId != string.Empty) + if (UserCenterResourse.UserInfo.AuthorityNo == 3 && info.CloudAccountId != string.Empty) { //鎴愬憳涓嶈兘鐪嬪埌 鍏朵粬浜虹殑璁板綍(鎴愬憳鐨勬椂鍊�,杩欎釜鍙橀噺閲岄潰鍙湁浠栬嚜宸变竴涓�) - if (dicMemberName.ContainsKey(info.UserId) == false) + if (dicMemberName.ContainsKey(info.CloudAccountId) == false) { return false; } @@ -560,14 +577,14 @@ if (slectAllLockMode == false) { //濡傛灉杩欎釜寮�閿佹柟寮忎笉鍦ㄩ�夋嫨鐨勫垪琛ㄩ噷闈㈢殑璇� - if (this.listSearchLockId.Contains(info.UnLockMode) == false) + if (this.listSearchLockId.Contains(info.OpenLockMode) == false) { return false; } } //鍙︿竴寮犺〃鐨勬暟鎹富閿� - if (info.UnLockMode == -1 || info.UnLockMode == 9000) + if (info.OpenLockMode == -1 || info.OpenLockMode == 9000) { if (info.MsgKeyId != string.Empty) { @@ -587,26 +604,24 @@ /// 鑾峰彇鍘嗗彶璁板綍 /// </summary> /// <returns></returns> - private List<DoorHistoryLogInfo> GetHistoryLogInfo(Dictionary<string, string> dicMemberName) + private List<HistoryInfo> GetHistoryLogInfo(Dictionary<string, string> dicMemberName) { if (this.listHistoryInfo != null) { //涓嶄簩娆¤幏鍙�,涓昏閽堝鐨勬槸绛涢�夊姛鑳� return this.ScreeningHistoryData(dicMemberName); } - - var dateFrom = new DateTime(dateFromControl.Year, dateFromControl.Month, dateFromControl.Day, 0, 0, 0); - var dateTo = new DateTime(dateToControl.Year, dateToControl.Month, dateToControl.Day, 23, 59, 59); + //鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁� + var pra = this.GetReadHistoryPra(); //鑾峰彇闂ㄩ攣鐨勬墦寮�鍜屽叧闂褰� - var listAllLog = HdlDeviceDoorLockLogic.Current.GetDoorHistoryLogInfo(this.GetDoorId(), dateFrom, dateTo); - + var listAllLog = this.GetDoorOpenHistoryLog(pra); //鑾峰彇闂ㄩ攣鐨勫叾浠栬褰� - var listOtherLog = this.GetDoorOtherHistoryLog(dateFrom, dateTo); + var listOtherLog = this.GetDoorOtherHistoryLog(pra.UnlockTimeBegin, pra.UnlockTimeEnd); listAllLog.AddRange(listOtherLog); //鎺掑簭涓�涓� - var dicAllData = new Dictionary<string, List<DoorHistoryLogInfo>>(); + var dicAllData = new Dictionary<string, List<HistoryInfo>>(); var listSortTime = new List<string>(); foreach (var data in listAllLog) @@ -614,7 +629,7 @@ //鎸夋椂闂村垎缁� if (dicAllData.ContainsKey(data.UnlockTime) == false) { - dicAllData[data.UnlockTime] = new List<DoorHistoryLogInfo>(); + dicAllData[data.UnlockTime] = new List<HistoryInfo>(); listSortTime.Add(data.UnlockTime); } dicAllData[data.UnlockTime].Add(data); @@ -622,13 +637,58 @@ //鎵ц鎺掑簭,鏃堕棿澶х殑鍦ㄥ墠闈� listSortTime.Sort(); - this.listHistoryInfo = new List<DoorHistoryLogInfo>(); + this.listHistoryInfo = new List<HistoryInfo>(); for (int i = listSortTime.Count - 1; i >= 0; i--) { this.listHistoryInfo.AddRange(dicAllData[listSortTime[i]]); } //绛涢�夊巻鍙茶褰� return this.ScreeningHistoryData(dicMemberName); + } + + /// <summary> + /// 鑾峰彇闂ㄩ攣鐨勬墦寮�鍜屽叧闂褰� + /// </summary> + /// <param name="i_pra"></param> + /// <returns></returns> + private List<HistoryInfo> GetDoorOpenHistoryLog(GetHistoryDataPra i_pra) + { + var listLog = new List<HistoryInfo>(); + + int nowPage = 0; + while (true) + { + //璁块棶浜戠 + var result = UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockHistoryPager", true, i_pra); + if (string.IsNullOrEmpty(result) == true) + { + return null; + } + var dataInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<GetHistoryDataResult>(result); + foreach (var data in dataInfo.PageData) + { + //涓嶇煡閬撲负浠�涔堜細鏈変笂鎶ヤ簡铏氭嫙9000鐨勯偅涓壒娈婄殑涓滆タ + if (data.OpenLockMode == 9000 && data.OtherOpenLockMode <= 9000) + { + continue; + } + if (data.CloudAccountId == null) + { + data.CloudAccountId = string.Empty; + } + listLog.Add(data); + } + + if (dataInfo.HasNextPage == false) + { + break; + } + //鑾峰彇涓嬩竴椤� + nowPage++; + i_pra.PageSetting.Page = nowPage; + } + + return listLog; } #endregion @@ -639,54 +699,40 @@ /// 鑾峰彇闂ㄩ攣鐨勫叾浠栬褰� /// </summary> /// <returns></returns> - private List<DoorHistoryLogInfo> GetDoorOtherHistoryLog(DateTime beginTime, DateTime endTime) + private List<HistoryInfo> GetDoorOtherHistoryLog(string beginTime, string endTime) { - var listLog = new List<DoorHistoryLogInfo>(); - //杞负utc鏃堕棿 - var utcFrom = beginTime.ToUniversalTime(); - var utcTo = endTime.ToUniversalTime(); + var listLog = new List<HistoryInfo>(); - //鍘诲彟涓�寮犺〃鍘昏幏鍙栧畠鐨勫叾浠栨秷鎭褰� - var listMsg = HdlMessageLogic.Current.GetListMessageFromDb(); - if (listMsg == null) + //鑾峰彇闂ㄩ攣鍏朵粬绫讳俊鎭笂鎶� + var pra2 = new MessageInfoPra(); + pra2.BeginTime = beginTime; + pra2.EndTime = endTime; + pra2.Topic = "/Alarms/SendAlarmInform"; + pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + var result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); + if (string.IsNullOrEmpty(result) == true) { - return listLog; + return null; } - foreach (var msgInfo in listMsg) + this.AdjustDoorOtherAlarmData(ref listLog, result); + + //浠庤嚜鍔ㄥ寲涓�,鑾峰彇甯稿紑妯″紡璁板綍 + pra2.Topic = "/Logic/Execute_Respon"; + result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); + if (string.IsNullOrEmpty(result) == true) { - //鏃堕棿涓嶆槸13浣嶇殑閮戒笉鐞� - if (msgInfo.CreateTime.Length != 13) { continue; } - //鑾峰彇闂ㄩ攣鍏朵粬绫讳俊鎭笂鎶� - if (msgInfo.MessageTitle == "/Alarms/SendAlarmInform") - { - //鍒ゆ柇鏄笉鏄繖涓椂闂存 - var checkDate = HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(msgInfo.CreateTime); - if (utcFrom <= checkDate && checkDate <= utcTo) - { - this.AdjustDoorOtherAlarmData(ref listLog, msgInfo); - } - } - //浠庤嚜鍔ㄥ寲涓�,鑾峰彇甯稿紑妯″紡璁板綍 - else if (msgInfo.MessageTitle == "/Logic/Execute_Respon") - { - //鍒ゆ柇鏄笉鏄繖涓椂闂存 - var checkDate = HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(msgInfo.CreateTime); - if (utcFrom <= checkDate && checkDate <= utcTo) - { - this.AdjustDoorNormallyOpenData(ref listLog, msgInfo); - } - } - //鑾峰彇闂ㄩ攣涓存椂瀵嗙爜寮�閿佽褰� - else if (msgInfo.MessageTitle == "/DoorLock/DoorLockOperatingEventNotificationCommand") - { - //鍒ゆ柇鏄笉鏄繖涓椂闂存 - var checkDate = HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(msgInfo.CreateTime); - if (utcFrom <= checkDate && checkDate <= utcTo) - { - this.AdjustDoorTemporaryPasswordData(ref listLog, msgInfo); - } - } + return null; } + this.AdjustDoorNormallyOpenData(ref listLog, result); + + //鑾峰彇闂ㄩ攣涓存椂瀵嗙爜寮�閿佽褰� + pra2.Topic = "/DoorLock/DoorLockOperatingEventNotificationCommand"; + result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2); + if (string.IsNullOrEmpty(result) == true) + { + return null; + } + this.AdjustDoorTemporaryPasswordData(ref listLog, result); return listLog; } @@ -695,131 +741,143 @@ /// 澶勭悊闂ㄩ攣甯稿紑妯″紡璁板綍淇℃伅 /// </summary> /// <param name="listLog"></param> - /// <param name="i_msgData"></param> - private void AdjustDoorOtherAlarmData(ref List<DoorHistoryLogInfo> listLog, MessageRecordInfo i_msgData) + /// <param name="result"></param> + private void AdjustDoorOtherAlarmData(ref List<HistoryInfo> listLog, string result) { - string doorKey = this.GetDoorId(); - //璁惧瀵硅薄 - var jobject = Newtonsoft.Json.Linq.JObject.Parse(i_msgData.MessageExpand); - string deviceAddr = jobject.Value<string>("DeviceAddr"); - int deviceEpoint = jobject.Value<int>("Epoint"); - if (doorKey != deviceAddr + "_" + deviceEpoint) + var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result); + string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint; + foreach (var myInfo in dataInfo2.PageData) { - //涓嶆槸鍚屼竴涓棬閿佺殑璁板綍 - return; - } + //璁惧瀵硅薄 + var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson); + string deviceAddr = jobject.Value<string>("DeviceAddr"); + int deviceEpoint = jobject.Value<int>("Epoint"); + if (doorKey != deviceAddr + "_" + deviceEpoint) + { + //涓嶆槸鍚屼竴涓棬閿佺殑璁板綍 + continue; + } - var data = new DoorHistoryLogInfo(); - data.DeviceMac = deviceAddr; - data.DeviceEpoint = deviceEpoint; - //娑堟伅 - var msgInfo = HdlAlarmsLogic.Current.GetDoorLockAlarmInfo(jobject); - data.AlarmMsg = msgInfo != null ? msgInfo.AlarmMsg : Language.StringByID(R.MyInternationalizationString.uDoorLocksAlarmHadTriggered); - //鏃堕棿 - data.UnlockTime = i_msgData.CreateTime; - //涓婚敭 - data.MsgKeyId = i_msgData.Id; - //娑堟伅鍖哄垎 - if (msgInfo.MsgDiv == 9000) - { - data.UnLockMode = 9000; + var data = new HistoryInfo(); + data.DeviceMac = deviceAddr; + data.DeviceEpoint = deviceEpoint; + //娑堟伅 + var msgInfo = HdlAlarmsLogic.Current.GetDoorLockAlarmInfo(jobject); + data.AlarmMsg = msgInfo != null ? msgInfo.AlarmMsg : Language.StringByID(R.MyInternationalizationString.uDoorLocksAlarmHadTriggered); + //鏃堕棿 + data.UnlockTime = myInfo.CreatedOnUtc; + //涓婚敭 + data.MsgKeyId = myInfo.Id; + //娑堟伅鍖哄垎 + if (msgInfo.MsgDiv == 9000) + { + data.OpenLockMode = 9000; + } + listLog.Add(data); } - listLog.Add(data); } /// <summary> /// 澶勭悊闂ㄩ攣甯稿紑妯″紡淇℃伅涓婃姤 /// </summary> /// <param name="listLog"></param> - /// <param name="i_msgData"></param> - private void AdjustDoorNormallyOpenData(ref List<DoorHistoryLogInfo> listLog, MessageRecordInfo i_msgData) + /// <param name="result"></param> + private void AdjustDoorNormallyOpenData(ref List<HistoryInfo> listLog, string result) { - string doorKey = this.GetDoorId(); - var jobject = Newtonsoft.Json.Linq.JObject.Parse(i_msgData.MessageExpand); - var myActionData = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicPushResult>(jobject["Data"].ToString()); - if (myActionData.ActionData == null || myActionData.ActionData.Actiontype != 8) + var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result); + string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint; + foreach (var myInfo in dataInfo2.PageData) { - //涓嶆槸甯稿紑妯″紡鐨勮嚜鍔ㄥ寲 - return; - } - string deviceAddr = myActionData.ActionData.MacStr; - int deviceEpoint = myActionData.ActionData.Epoint; - if (doorKey != deviceAddr + "_" + deviceEpoint) - { - //涓嶆槸鍚屼竴涓棬閿佺殑璁板綍 - return; - } + var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson); + var myActionData = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicPushResult>(jobject["Data"].ToString()); + if (myActionData.ActionData == null || myActionData.ActionData.Actiontype != 8) + { + //涓嶆槸甯稿紑妯″紡鐨勮嚜鍔ㄥ寲 + continue; + } + string deviceAddr = myActionData.ActionData.MacStr; + int deviceEpoint = myActionData.ActionData.Epoint; + if (doorKey != deviceAddr + "_" + deviceEpoint) + { + //涓嶆槸鍚屼竴涓棬閿佺殑璁板綍 + continue; + } - var data = new DoorHistoryLogInfo(); - data.DeviceMac = deviceAddr; - data.DeviceEpoint = deviceEpoint; - //娑堟伅 - if (myActionData.ActionData.PassDataString == "055704010112") - { - //甯稿紑妯″紡寮�鍚�(鑷姩鍖栬Е鍙�) - data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg11); - } - else if (myActionData.ActionData.PassDataString == "055704010113") - { - //甯稿紑妯″紡缁撴潫(鑷姩鍖栬Е鍙�) - data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg12); - } - else - { - return; - } - //鏃堕棿 - data.UnlockTime = i_msgData.CreateTime; - //涓婚敭 - data.MsgKeyId = i_msgData.Id; - //娑堟伅鍖哄垎 - data.UnLockMode = 9000; + var data = new HistoryInfo(); + data.DeviceMac = deviceAddr; + data.DeviceEpoint = deviceEpoint; + //娑堟伅 + if (myActionData.ActionData.PassDataString == "055704010112") + { + //甯稿紑妯″紡寮�鍚�(鑷姩鍖栬Е鍙�) + data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg11); + } + else if (myActionData.ActionData.PassDataString == "055704010113") + { + //甯稿紑妯″紡缁撴潫(鑷姩鍖栬Е鍙�) + data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg12); + } + else + { + continue; + } + //鏃堕棿 + data.UnlockTime = myInfo.CreatedOnUtc; + //涓婚敭 + data.MsgKeyId = myInfo.Id; + //娑堟伅鍖哄垎 + data.OpenLockMode = 9000; - listLog.Add(data); + listLog.Add(data); + } } /// <summary> /// 澶勭悊闂ㄩ攣涓存椂瀵嗙爜涓婃姤 /// </summary> /// <param name="listLog"></param> - /// <param name="i_msgData"></param> - private void AdjustDoorTemporaryPasswordData(ref List<DoorHistoryLogInfo> listLog, MessageRecordInfo i_msgData) + /// <param name="result"></param> + private void AdjustDoorTemporaryPasswordData(ref List<HistoryInfo> listLog, string result) { - string doorKey = this.GetDoorId(); - var jobject = Newtonsoft.Json.Linq.JObject.Parse(i_msgData.MessageExpand); - string deviceAddr = jobject.Value<string>("DeviceAddr"); - int deviceEpoint = jobject.Value<int>("Epoint"); - if (doorKey != deviceAddr + "_" + deviceEpoint) + var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result); + string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint; + foreach (var myInfo in dataInfo2.PageData) { - //涓嶆槸鍚屼竴涓棬閿佺殑璁板綍 - return; - } - var myActionData = Newtonsoft.Json.JsonConvert.DeserializeObject<PasswordOperationData>(jobject["Data"].ToString()); - if (myActionData.UserID != 246) - { - //涓嶆槸涓存椂瀵嗙爜 - return; - } - var data = new DoorHistoryLogInfo(); - data.DeviceMac = deviceAddr; - data.DeviceEpoint = deviceEpoint; - //娑堟伅 - if (myActionData.OperationEventCode == 2) - { - //涓存椂瀵嗙爜寮�閿佹垚鍔� - data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg13); - } - else - { - //涓存椂瀵嗙爜寮�閿佸け璐� - data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg14); - } - //鏃堕棿 - data.UnlockTime = i_msgData.CreateTime; - //涓婚敭 - data.MsgKeyId = i_msgData.Id; + var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson); + string deviceAddr = jobject.Value<string>("DeviceAddr"); + int deviceEpoint = jobject.Value<int>("Epoint"); + if (doorKey != deviceAddr + "_" + deviceEpoint) + { + //涓嶆槸鍚屼竴涓棬閿佺殑璁板綍 + continue; + } + var myActionData = Newtonsoft.Json.JsonConvert.DeserializeObject<PasswordOperationData>(jobject["Data"].ToString()); + if (myActionData.UserID != 246) + { + //涓嶆槸涓存椂瀵嗙爜 + continue; + } + var data = new HistoryInfo(); + data.DeviceMac = deviceAddr; + data.DeviceEpoint = deviceEpoint; + //娑堟伅 + if (myActionData.OperationEventCode == 2) + { + //涓存椂瀵嗙爜寮�閿佹垚鍔� + data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg13); + } + else + { + //涓存椂瀵嗙爜寮�閿佸け璐� + data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg14); + } + //鏃堕棿 + data.UnlockTime = myInfo.CreatedOnUtc; + //涓婚敭 + data.MsgKeyId = myInfo.Id; - listLog.Add(data); + listLog.Add(data); + } } #endregion @@ -831,13 +889,38 @@ /// </summary> private void ClearAllHistoryLog() { - DateTime dateFrom = new DateTime(dateFromControl.Year, dateFromControl.Month, dateFromControl.Day, 0, 0, 0); - DateTime dateTo = new DateTime(dateToControl.Year, dateToControl.Month, dateToControl.Day, 23, 59, 59); + //鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(2020.05.08:鍏ㄩ儴娓呯┖) + var pra = this.GetDeleteDataPra(); + //鎵撳紑杩涘害鏉� this.ShowProgressBar(); + var result = UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/ClearDoorLockHistory", true, pra); + if (result == false) + { + return; + } - //涓嶇缁撴灉 - var result = HdlDeviceDoorLockLogic.Current.ClearAllDoorHistoryLog(this.GetDoorId(), dateFrom, dateTo, listOtherMsgId); + //鍒犻櫎鍏朵粬娑堟伅 + if (listOtherMsgId.Count > 0) + { + var pra2 = new MessageReadStatuPra(); + pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + for (int i = 0; i < listOtherMsgId.Count; i++) + { + pra2.Id = listOtherMsgId[i]; + result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra2); + if (result == false) + { + return; + } + } + } + //鍏抽棴杩涘害鏉� + this.CloseProgressBar(); + if (result == false) + { + return; + } //娓呯┖ this.listOtherMsgId = new List<string>(); @@ -845,8 +928,8 @@ HdlThreadLogic.Current.RunMain(() => { - //閲嶆柊鍒锋柊鐣岄潰 - this.InitLogListInfo(true); + this.listView.frameTable.RemoveAll(); + listView.frameTable.Height = bodyFrameLayout.Height - Application.GetRealHeight(115 - 3); }); } @@ -855,18 +938,194 @@ #region 鈻� 涓�鑸柟娉昣__________________________ /// <summary> - /// 鑾峰彇璁块棶浜戠鐨凞oorID + /// 鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁� /// </summary> /// <returns></returns> - private string GetDoorId() + private GetHistoryDataPra GetReadHistoryPra() { - return this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint; + DateTime dateFrom = new DateTime(dateFromControl.Year, dateFromControl.Month, dateFromControl.Day, 0, 0, 0); + DateTime dateTo = new DateTime(dateToControl.Year, dateToControl.Month, dateToControl.Day, 23, 59, 59); + + //鍏ㄩ儴璇诲彇 + var pra = new GetHistoryDataPra(); + pra.UnlockTimeBegin = dateFrom.ToUniversalTime().ToString(); + pra.UnlockTimeEnd = dateTo.ToUniversalTime().ToString(); + pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint; + + return pra; + } + + /// <summary> + /// 鑾峰彇鍒犻櫎鏁版嵁鐨勪簯绔帴鍙g殑鍚姩鍙傛暟 + /// </summary> + /// <returns></returns> + private DeleteHistoryDataPra GetDeleteDataPra() + { + DateTime dateFrom = new DateTime(dateFromControl.Year, dateFromControl.Month, dateFromControl.Day, 0, 0, 0); + DateTime dateTo = new DateTime(dateToControl.Year, dateToControl.Month, dateToControl.Day, 23, 59, 59); + + var pra = new DeleteHistoryDataPra(); + pra.UnlockTimeBegin = dateFrom.ToUniversalTime().ToString(); + pra.UnlockTimeEnd = dateTo.ToUniversalTime().ToString(); + pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint; + + return pra; } #endregion #region 鈻� 缁撴瀯浣揰____________________________ + /// <summary> + /// 鑾峰彇鍘嗗彶璁板綍鏁版嵁 + /// </summary> + private class GetHistoryDataPra : IfacePraCommon + { + /// <summary> + /// RequestVersion + /// </summary> + public string RequestVersion = Common.CommonPage.RequestVersion; + /// <summary> + /// Token + /// </summary> + public string LoginAccessToken = string.Empty; + /// <summary> + /// 浣忓畢ID + /// </summary> + public string HomeId = Common.Config.Instance.Home.Id; + /// <summary> + /// 闂ㄩ攣鐨凪ac鍦板潃 + /// </summary> + public string DoorLockId = string.Empty; + /// <summary> + /// Config.Instance.Guid 鎴栬�� MemberInfoRes.SubAccountDistributedMark + /// </summary> + public List<string> CloudAccountIdArr = new List<string>(); + /// <summary> + /// 寮�閿佹柟寮�(0:瀵嗙爜銆�15:鎸囩汗銆�3:IC鍗�) + /// </summary> + public List<int> OpenLockModeArr = null; + /// <summary> + /// 寮�閿佹槸鍚︽垚鍔� + /// </summary> + public bool? UnlockIsSuccess = null; + /// <summary> + /// 鎼滅储寮�閿佸紑濮嬫椂闂� + /// </summary> + public string UnlockTimeBegin; + /// <summary> + /// 鎼滅储寮�閿佺粨鏉熸椂闂� + /// </summary> + public string UnlockTimeEnd; + /// <summary> + /// 椤垫暟 + /// </summary> + public PageSettingInfo PageSetting = new PageSettingInfo() { PageSize = 100 }; + } + + /// <summary> + /// 鑾峰彇鍘嗗彶璁板綍鐨勭粨鏋� + /// </summary> + private class GetHistoryDataResult + { + /// <summary> + /// 鏁版嵁 + /// </summary> + public List<HistoryInfo> PageData = null; + /// <summary> + /// 鏄惁瀛樺湪涓嬩竴椤电殑鏁版嵁 + /// </summary> + public bool HasNextPage = false; + } + + /// <summary> + /// 鍒犻櫎鍘嗗彶璁板綍鏁版嵁 + /// </summary> + private class DeleteHistoryDataPra : IfacePraCommon + { + /// <summary> + /// RequestVersion + /// </summary> + public string RequestVersion = Common.CommonPage.RequestVersion; + /// <summary> + /// Token + /// </summary> + public string LoginAccessToken = string.Empty; + /// <summary> + /// 浣忓畢ID + /// </summary> + public string HomeId = Common.Config.Instance.Home.Id; + /// <summary> + /// 闂ㄩ攣鐨凪ac鍦板潃 + /// </summary> + public string DoorLockId = string.Empty; + /// <summary> + /// Config.Instance.Guid 鎴栬�� MemberInfoRes.SubAccountDistributedMark + /// </summary> + public List<string> CloudAccountIds = null; + /// <summary> + /// 寮�閿佹柟寮�(0:瀵嗙爜銆�15:鎸囩汗銆�3:IC鍗�) + /// </summary> + public List<int> OpenLockModes = null; + /// <summary> + /// 鎼滅储寮�閿佸紑濮嬫椂闂� + /// </summary> + public string UnlockTimeBegin; + /// <summary> + /// 鎼滅储寮�閿佺粨鏉熸椂闂� + /// </summary> + public string UnlockTimeEnd; + } + + /// <summary> + /// 鍘嗗彶璁板綍鐨勭粨鏋� + /// </summary> + private class HistoryInfo + { + /// <summary> + /// 寮�閿佹柟寮� 0:瀵嗙爜 13:闈欒剦绾� 14:浜鸿劯璇嗗埆 15:鎸囩汗 3:IC鍗� 9000:甯稿紑妯″紡(鑷畾涔夌殑) + /// </summary> + public int OpenLockMode = -1; + /// <summary> + /// 寮�閿佹椂闂� + /// </summary> + public string UnlockTime = string.Empty; + /// <summary> + /// 寮�閿佹槸鍚︽垚鍔� + /// </summary> + public bool UnlockIsSuccess = false; + /// <summary> + /// 璐﹀彿鐨処D + /// </summary> + public string CloudAccountId = string.Empty; + /// <summary> + /// 鍏朵粬寮�閿佹柟寮�(OpenLockMode=9000鏃舵湁鏁�) 9001:甯稿紑鎵撳紑 9002:甯稿紑鍙栨秷 9003:甯稿紑鎸佺画 9004:甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� + /// </summary> + public int? OtherOpenLockMode = -1; + /// <summary> + /// 甯稿紑鎸佺画鏃堕棿(1~72灏忔椂 OtherOpenLockMode=9003鐨勬椂鍊欐湁鏁�) + /// </summary> + public string NormallyOpenContinuedTime = string.Empty; + /// <summary> + /// 褰撳紑閿佹柟寮忎负-1鏃朵娇鐢�,瀹冨睘浜庡叾浠栫被 + /// </summary> + public string AlarmMsg = string.Empty; + /// <summary> + /// 褰撳紑閿佹柟寮忎负-1鏃朵娇鐢�,璁惧Mac + /// </summary> + public string DeviceMac = string.Empty; + /// <summary> + /// 褰撳紑閿佹柟寮忎负-1鏃朵娇鐢�,璁惧绔偣 + /// </summary> + public int DeviceEpoint = 0; + /// <summary> + /// 褰撳紑閿佹柟寮忎负-1鏃朵娇鐢�,娑堟伅鐨勬暟鎹簱涓婚敭 + /// </summary> + public string MsgKeyId = string.Empty; + } + /// <summary> /// 涓存椂瀵嗙爜鏁版嵁 /// </summary> -- Gitblit v1.8.0