| | |
| | | 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> |
| | |
| | | /// 门锁本地用户Id -->键名 : DoorLockLocalUserId |
| | | /// </summary> |
| | | public string DoorLockLocalUserId = ""; |
| | | |
| | | /// <summary> |
| | | /// IsOtherAccountCtrl 是否为子帐号控制过来 -->键名 : IsOtherAccountCtrl |
| | | /// </summary> |
| | | public bool IsOtherAccountCtrl = false; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// 0:00:00] ValidEndTime 有效结束时间 -->键名 : ValidEndTime |
| | | /// </summary> |
| | | public DateTime ValidEndTime; |
| | | /// <summary> |
| | | /// IsOtherAccountCtrl 是否为子帐号控制过来 -->键名 : IsOtherAccountCtrl |
| | | /// </summary> |
| | | public bool IsOtherAccountCtrl = false; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// LocalDoorLockId 搜索本地门锁Id -->键名 : LocalDoorLockId 默认值: null |
| | | /// </summary> |
| | | public string LocalDoorLockId = ""; |
| | | /// <summary> |
| | | /// IsOtherAccountCtrl 是否为子帐号控制过来 -->键名 : IsOtherAccountCtrl |
| | | /// </summary> |
| | | public bool IsOtherAccountCtrl = false; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// 0:00:00] ValidEndTime 有效结束时间 -->键名 : ValidEndTime |
| | | /// </summary> |
| | | public DateTime ValidEndTime; |
| | | /// <summary> |
| | | /// IsOtherAccountCtrl 是否为子帐号控制过来 -->键名 : IsOtherAccountCtrl |
| | | /// </summary> |
| | | public bool IsOtherAccountCtrl = false; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// 0:00:00] ValidEndTime 有效结束时间 -->键名 : ValidEndTime |
| | | /// </summary> |
| | | public DateTime? ValidEndTime; |
| | | /// <summary> |
| | | /// IsOtherAccountCtrl 是否为子帐号控制过来 -->键名 : IsOtherAccountCtrl |
| | | /// </summary> |
| | | public bool IsOtherAccountCtrl = false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取门锁临时密码结果 |
| | | /// </summary> |
| | | /// </summary> |
| | | [Serializable] |
| | | public class GetDoorLockTempPasswordDataRes |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取门锁给云服务器 |
| | | /// 获取门锁云服务器 |
| | | /// </summary> |
| | | public static async System.Threading.Tasks.Task<GetDoorLockDataRes> GetDoorLockInfoFromServer(string RequestName, GetDoorLockData getDoorLockData) |
| | | { |
| | |
| | | { |
| | | //序列化对象 |
| | | 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) |
| | | { |
| | |
| | | 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}"); |
| | | } |
| | | } |
| | | } |
| | |
| | | break; |
| | | } |
| | | } |
| | | if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime) |
| | | if ((DateTime.Now - dateTime).TotalMilliseconds > 9000) |
| | | { |
| | | result = new DefaultControlResponseAllData { errorMessageBase = " 回复超时,请重新操作" }; |
| | | } |