HDL Home App 第二版本 旧平台金堂用 正在使用
wjc
2022-12-01 351bdda734832d821a9764b0cde8be5d83c4ec50
ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -662,10 +662,10 @@
            return await System.Threading.Tasks.Task.Run((Func<System.Threading.Tasks.Task<List<Shared.Phone.UserCenter.MemberInfoRes>>>)(async () =>
           {
               var pra = new Shared.Phone.UserCenter.MemberListInfoPra();
               string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
               if (result == null)
               {
                   return null;
               string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
               if (result == null)
               {
                   return null;
               }
               var listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Shared.Phone.UserCenter.MemberInfoRes>>(result);
               return listInfo;
@@ -934,9 +934,9 @@
            /// Unlock命令:error,invalid schedule事件
            /// </summary>
            UnlockInvalidScheduleEvent = 6,
        }
        }
        #endregion
        #region 门锁编程事件通知
        /// <summary>
        /// 门锁编程事件通知
@@ -965,7 +965,7 @@
            /// <summary>
            /// 编程事件触发源
            /// 常用:
            /// 0:Keypad(键盘/密码);3:RFID(射频卡);15:指纹
            /// 0:Keypad(键盘/密码);3:RFID(射频卡);15:指纹 58:face  59:静脉
            ///不常用:
            /// 1:RF(Zigbee无线);2:Manual(手动);255:Indeterminate(不确定)
            /// </summary>
@@ -1118,7 +1118,7 @@
                            result = new DefaultControlResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                        {
                            if (clientDataPassthroughResponseData?.PassData != null)
                            {
                                var data = clientDataPassthroughResponseData.PassData;
@@ -1250,27 +1250,26 @@
                var sbString = new System.Text.StringBuilder();
                foreach (var userId in userIdList)
                {
                    string temp = Convert.ToString(userId, 16);
                    switch (temp.Length)
                    var tempBytes = new byte[2];
                    for (int i = 0; i < 2; i++)
                    {
                        case 1:
                            userIdStr = "0" + temp + "00";
                            break;
                        case 2:
                            userIdStr = temp + "00";
                            break;
                        case 3:
                            var thirdBit = temp.Substring(temp.Length - 2, 1);
                            userIdStr = temp + "0" + thirdBit;
                            break;
                        case 4:
                            userIdStr = temp;
                            break;
                        tempBytes[i] = (byte)(userId >> (i * 8) & 0xff);
                    }
                    sbString.Append(userIdStr.ToString().ToUpper());
                    var curV1 = Convert.ToString(tempBytes[0], 16);
                    var curV2 = Convert.ToString(tempBytes[1], 16);
                    if (curV1.Length == 1)
                    {
                        curV1 = "0" + curV1;
                    }
                    if (curV2.Length == 1)
                    {
                        curV2 = "0" + curV2;
                    }
                    userIdStr = (curV1 + curV2).ToUpper();
                }
                data = dataLength + dataComand1 + dataComand2 + dataSerialNum + addDataLength +
                   delUserTypeStr + sbString;
                   delUserTypeStr + userIdStr;
            }
            catch { };
@@ -1307,28 +1306,27 @@
                        delUserTypeStr = "21";
                        break;
                }
                var sbString = new System.Text.StringBuilder();
                string temp = Convert.ToString(userId, 16);
                switch (temp.Length)
                var tempBytes = new byte[2];
                for (int i = 0; i < 2; i++)
                {
                    case 1:
                        userIdStr = "0" + temp + "00";
                        break;
                    case 2:
                        userIdStr = temp + "00";
                        break;
                    case 3:
                        var thirdBit = temp.Substring(temp.Length - 2, 1);
                        userIdStr = temp + "0" + thirdBit;
                        break;
                    case 4:
                        userIdStr = temp;
                        break;
                    tempBytes[i] = (byte)(userId >> (i * 8) & 0xff);
                }
                sbString.Append(userIdStr.ToString().ToUpper());
                var curV1 = Convert.ToString(tempBytes[0], 16);
                var curV2 = Convert.ToString(tempBytes[1], 16);
                if (curV1.Length == 1)
                {
                    curV1 = "0" + curV1;
                }
                if (curV2.Length == 1)
                {
                    curV2 = "0" + curV2;
                }
                userIdStr = (curV1 + curV2).ToUpper();
                data = dataLength + dataComand1 + dataComand2 + dataSerialNum + addDataLength +
                   delUserTypeStr + sbString;
                           delUserTypeStr + userIdStr;
            }
            catch { };