From 8b4d79ca03495e522a1953e04ca17527f33c853a Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 28 十月 2019 13:22:17 +0800 Subject: [PATCH] 合并完成代码 --- ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 45 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs index 40777bc..599c3a1 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs @@ -30,9 +30,7 @@ public static string RemoteUnlockPassword = string.Empty;//杩滅▼寮�閿佸瘑鐮� public static DateTime maxValue = DateTime.MaxValue; public static DateTime minValue = DateTime.MinValue; - public string LocalTempPassword = string.Empty;//鏈湴鐢熸垚鐨勪复鏃跺瘑鐮� - #region 涓存椂瀵嗙爜淇℃伅 /// <summary> @@ -97,6 +95,11 @@ /// 闂ㄩ攣鏈湴鐢ㄦ埛Id -->閿悕 : DoorLockLocalUserId /// </summary> public string DoorLockLocalUserId = ""; + + /// <summary> + /// IsOtherAccountCtrl 鏄惁涓哄瓙甯愬彿鎺у埗杩囨潵 -->閿悕 : IsOtherAccountCtrl + /// </summary> + public bool IsOtherAccountCtrl = false; } #endregion @@ -249,6 +252,10 @@ /// 0:00:00] ValidEndTime 鏈夋晥缁撴潫鏃堕棿 -->閿悕 : ValidEndTime /// </summary> public DateTime ValidEndTime; + /// <summary> + /// IsOtherAccountCtrl 鏄惁涓哄瓙甯愬彿鎺у埗杩囨潵 -->閿悕 : IsOtherAccountCtrl + /// </summary> + public bool IsOtherAccountCtrl = false; } /// <summary> @@ -281,6 +288,10 @@ /// LocalDoorLockId 鎼滅储鏈湴闂ㄩ攣Id -->閿悕 : LocalDoorLockId 榛樿鍊�: null /// </summary> public string LocalDoorLockId = ""; + /// <summary> + /// IsOtherAccountCtrl 鏄惁涓哄瓙甯愬彿鎺у埗杩囨潵 -->閿悕 : IsOtherAccountCtrl + /// </summary> + public bool IsOtherAccountCtrl = false; } /// <summary> @@ -333,6 +344,10 @@ /// 0:00:00] ValidEndTime 鏈夋晥缁撴潫鏃堕棿 -->閿悕 : ValidEndTime /// </summary> public DateTime ValidEndTime; + /// <summary> + /// IsOtherAccountCtrl 鏄惁涓哄瓙甯愬彿鎺у埗杩囨潵 -->閿悕 : IsOtherAccountCtrl + /// </summary> + public bool IsOtherAccountCtrl = false; } /// <summary> @@ -381,11 +396,15 @@ /// 0:00:00] ValidEndTime 鏈夋晥缁撴潫鏃堕棿 -->閿悕 : ValidEndTime /// </summary> public DateTime? ValidEndTime; + /// <summary> + /// IsOtherAccountCtrl 鏄惁涓哄瓙甯愬彿鎺у埗杩囨潵 -->閿悕 : IsOtherAccountCtrl + /// </summary> + public bool IsOtherAccountCtrl = false; } /// <summary> /// 鑾峰彇闂ㄩ攣涓存椂瀵嗙爜缁撴灉 - /// </summary> + /// </summary> [Serializable] public class GetDoorLockTempPasswordDataRes { @@ -533,7 +552,7 @@ } /// <summary> - /// 鑾峰彇闂ㄩ攣缁欎簯鏈嶅姟鍣� + /// 鑾峰彇闂ㄩ攣浜戞湇鍔″櫒 /// </summary> public static async System.Threading.Tasks.Task<GetDoorLockDataRes> GetDoorLockInfoFromServer(string RequestName, GetDoorLockData getDoorLockData) { @@ -566,10 +585,27 @@ { //搴忓垪鍖栧璞� var requestJson = JsonConvert.SerializeObject(obj); + var byteData = System.Text.Encoding.UTF8.GetBytes(requestJson); + byte[] result1 = null; //璁块棶鎺ュ彛 - var result = await CommonPage.Instance.RequestHttpsZigbeeAsync(RequestName, System.Text.Encoding.UTF8.GetBytes(requestJson)); - - return result; + if (UserCenterResourse.UserInfo.AuthorityNo == 1) + { + result1 = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(RequestName, byteData); + } + else + { + result1 = await CommonPage.Instance.RequestZigbeeHttpsByAdmin(RequestName, byteData); + } + if (result1 != null) + { + var result2 = Encoding.UTF8.GetString(result1); + if (result2 != null) + { + var result = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.ResponsePack>(result2); + return result; + } + } + return null; } catch (Exception ex) { @@ -1099,7 +1135,7 @@ tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString(); tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); result = new DefaultControlResponseAllData { defaultControlResponseData = tempD }; - DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0402_{ topic}"); + DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0450_{ topic}"); } } } @@ -1128,7 +1164,7 @@ break; } } - if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime) + if ((DateTime.Now - dateTime).TotalMilliseconds > 9000) { result = new DefaultControlResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" }; } -- Gitblit v1.8.0