From 3291885285dfd5d4f665c20676307878dc3163bc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 20 十二月 2019 16:28:53 +0800
Subject: [PATCH] 请合并最新代码(优化设备不支持的功能)
---
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 66 +++++++++++++++++++++++++++-----
1 files changed, 55 insertions(+), 11 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index baa7047..21c171d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -467,6 +467,7 @@
{
["Type"] = int.Parse(dictionary["Type"]),
["Account"] = dictionary["Account"],
+ ["UserId"] = dictionary["UserId"],
};
accounts.Add(accounts1);
@@ -710,8 +711,31 @@
public static List<Common.Room> GetRoomList(string floorId)
{
return Common.Room.Lists.FindAll((obj) => obj.FloorId == floorId);
-
+ //var list1 = new List<Common.Room>();
+ /////鎵惧埌鏌愭ゼ灞傛埧闂村垪琛紱
+ //var list = Common.Room.Lists.FindAll((obj) => obj.FloorId == floorId);
+ //for (int i = 0; i < list.Count; i++)
+ //{
+ // if (str == "device")
+ // {
+ // if (list[i].DeviceUIList.Count != 0)
+ // { ///杩囨护鎺夋病鏈夎澶囩殑鎴块棿
+ // list1.Add(list[i]);
+ // }
+ // }
+ // else
+ // {
+ // if (list[i].SceneUIList.Count != 0)
+ // { ///杩囨护鎺夋病鏈夊満鏅殑鎴块棿
+ // list1.Add(list[i]);
+ // }
+ // }
+ //}
+ /////杩斿洖鎴块棿鍒楄〃锛�
+ //return list1;
}
+
+
#endregion
#region ----鑾峰彇闂ㄩ攣
@@ -730,6 +754,7 @@
currUserIfon.CloudAccountId = Config.Instance.Guid;
if (string.IsNullOrEmpty(UserCenter.UserCenterResourse.UserInfo.UserName))
{
+ ///濡傛灉鏄电О涓虹┖锛屾鏃讹紝鐧婚檰璐﹀彿涓洪粯璁ゆ樀绉帮紱
currUserIfon.UserName = UserCenter.UserCenterResourse.UserInfo.Account;
}
else
@@ -738,12 +763,18 @@
}
foreach (var o in AllUserIfon)
{
+ if (o.IsFreezeUser || string.IsNullOrEmpty(o.UserId))
+ {
+ ///杩囨护鎺夊喕缁撶殑鎴愬憳鍜孶serId涓虹┖鐨勬暟鎹紱
+ continue;
+ }
if (string.IsNullOrEmpty(currUserIfon.DoorLockMacPort))
{
currUserIfon.DoorLockMacPort = o.DoorLockMacPort;
}
if (o.CloudAccountId == Config.Instance.Guid)
{
+
UnlockingMode unlockingMode = new UnlockingMode();
unlockingMode.OpenMode = o.OpenMode;
unlockingMode.UserId = o.UserId;
@@ -769,6 +800,7 @@
userIfon.CloudAccountId = user.SubAccountDistributedMark;
if (string.IsNullOrEmpty(user.UserName))
{
+ ///濡傛灉鏄电О涓虹┖锛屾鏃讹紝鐧婚檰璐﹀彿涓洪粯璁ゆ樀绉帮紱
userIfon.UserName = user.Account;
}
@@ -779,6 +811,11 @@
}
for (int j = 0; j < AllUserIfon.Count; j++)
{
+ if (AllUserIfon[j].IsFreezeUser || string.IsNullOrEmpty(AllUserIfon[j].UserId))
+ {
+ ///杩囨护鎺夊喕缁撶殑鎴愬憳鍜孶serId涓虹┖鐨勬暟鎹紱
+ continue;
+ }
if (string.IsNullOrEmpty(userIfon.DoorLockMacPort))
{
userIfon.DoorLockMacPort = AllUserIfon[j].DoorLockMacPort;
@@ -834,6 +871,7 @@
user.CloudAccountId = data["CloudAccountId"].ToString();
user.DoorLockMacPort = data["DoorLockId"].ToString();
user.ModeName = data["UserIdRemarks"].ToString();
+ user.IsFreezeUser = Convert.ToBoolean(data["IsFreezeUser"].ToString());
list.Add(user);
}
return list;
@@ -841,9 +879,9 @@
public static async System.Threading.Tasks.Task<string> ReadUserList(string doorlockMac)
{
- string s = null;
- var str = await WebClientAsync(0, CommonPage.RequestHttpsHost+"/App/GetHomePager");//涓嶅悓鍖哄煙鍩熷悕鍓嶇紑涓嶄竴鏍�
- // var str = await WebClientAsync(0, "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetHomePager");
+ string s = null;
+ var str = await WebClientAsync(0, CommonPage.RequestHttpsHost + "/App/GetHomePager");//涓嶅悓鍖哄煙鍩熷悕鍓嶇紑涓嶄竴鏍�
+ // var str = await WebClientAsync(0, "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetHomePager");
var jObject = JObject.Parse(str);
if (jObject == null || jObject["StateCode"].ToString() != "Success")
{
@@ -886,7 +924,7 @@
}
return s;
}
-
+
public static async System.Threading.Tasks.Task<string> ReadUserDoorLock(Residential residential)
{
@@ -922,7 +960,7 @@
if (value == 0)
{
postValues.Add("RequestVersion", CommonPage.RequestVersion);
- postValues.Add("ReqDto.LoginAccessToken", Config.Instance.Token);
+ postValues.Add("ReqDto.LoginAccessToken", Config.Instance.Token);
postValues.Add("ReqDto.PageSetting.PageSize", Int32.MaxValue.ToString());//
}
@@ -939,7 +977,7 @@
postValues.Add("LoginAccessToken", residential.Token);
postValues.Add("HomeId", residential.Id);
postValues.Add("DoorLockId", residential.doorlockmac);//闂ㄩ攣Mac
- postValues.Add("IsOtherAccountCtrl", residential.IsOtherAccountCtrl.ToString());
+ postValues.Add("IsOtherAccountCtrl", residential.IsOtherAccountCtrl.ToString());
postValues.Add("PageSetting.PageSize", Int32.MaxValue.ToString());
}
System.Net.WebClient webClient = new System.Net.WebClient();
@@ -972,7 +1010,7 @@
public string doorlockmac;
}
- public class MembershipIfon
+ public class MembershipIfon
{
/// <summary>
/// 璇嗗埆鐢ㄦ埛韬唤
@@ -990,7 +1028,10 @@
/// 鐢ㄦ埛鏄电О
/// </summary>
public string UserName = string.Empty;
-
+ /// <summary>
+ /// 鏄惁鍐荤粨璇ユ垚鍛橈紙true宸插喕缁擄級
+ /// </summary>
+ public bool IsFreezeUser;
}
@@ -1033,15 +1074,17 @@
/// 闂ㄩ攣Mac+Port,璇嗗埆闂ㄩ攣锛�
/// </summary>
public string DoorLockMacPort = string.Empty;
+ /// <summary>
+ /// 鏄惁鍐荤粨璇ユ垚鍛橈紙true宸插喕缁擄級
+ /// </summary>
+ public bool IsFreezeUser;
}
-
/// <summary>
/// 闂ㄩ攣鍒楄〃
/// </summary>
public static List<MembershipIfon> LockList = new List<MembershipIfon>();
-
/// <summary>
/// 褰撳墠闂ㄩ攣
/// </summary>
@@ -1051,5 +1094,6 @@
/// </summary>
public static UserCenter.MemberInfoRes UserMemberInfoRes = null;
#endregion
+
}
}
--
Gitblit v1.8.0