From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 14 十二月 2020 09:59:01 +0800 Subject: [PATCH] 请合并代码,完成晾衣架最终功能。 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | 64 ++++++++++++++++++++++---------- 1 files changed, 44 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs old mode 100755 new mode 100644 index b89d1e5..327cf96 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs @@ -148,7 +148,13 @@ var listDevice = new List<CommonDevice> { }; listDevice.Add(doorLock); var devTemp = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); - if (devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone) + if (devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_AT1TF + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_AT1F + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_AT1T + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_HAT1B + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_HAT1T + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_ATFT) { return true; } @@ -525,7 +531,13 @@ var listDevice = new List<CommonDevice> { }; listDevice.Add(doorLock); var devTemp = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); - if (devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone) + if (devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_AT1TF + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_AT1F + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_AT1T + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_HAT1B + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_HAT1T + || devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_ATFT) { return true; } @@ -607,26 +619,28 @@ var SubAccounListTemp = await ZigBee.Device.DoorLock.GetSubAccountByDistributedMark(); var SubAccounListDictionary = new Dictionary<string, Shared.Phone.UserCenter.MemberInfoRes> { }; - foreach (var member in SubAccounListTemp) - { - //鍒ゆ柇涓�涓处鎴风粦瀹氫簡閭鐨勬儏鍐� - if (SubAccounListDictionary.ContainsKey(member.DistributedMark) == true - || member.Account == UserCenterResourse.UserInfo.Phone - || member.Account == UserCenterResourse.UserInfo.Email) - { - //濡傛灉鏄畠鑷繁鐨勮瘽锛屼笉鏄剧ず,璐︽埛鍜岀粦瀹氱殑閭鍙樉绀哄叾涓箣涓� - continue; + if (SubAccounListTemp != null) + { + foreach (var member in SubAccounListTemp) + { + //鍒ゆ柇涓�涓处鎴风粦瀹氫簡閭鐨勬儏鍐� + if (SubAccounListDictionary.ContainsKey(member.DistributedMark) == true + || member.Account == UserCenterResourse.UserInfo.Phone + || member.Account == UserCenterResourse.UserInfo.Email) + { + //濡傛灉鏄畠鑷繁鐨勮瘽锛屼笉鏄剧ず,璐︽埛鍜岀粦瀹氱殑閭鍙樉绀哄叾涓箣涓� + continue; + } + //鍘绘帀瀛愯处鎴蜂腑鏅�氭垚鍛橈紝鐣欎笅鎷ユ湁绠$悊鍛樻潈闄愮殑鎴愬憳 + //锛堝洜涓哄垎閰嶈处鎴风粰鏅�氭垚鍛橈紝鏅�氭垚鍛樺湪app涓笉鑳借繘鍏ヨ澶囩鐞嗛偅閲岋紝鎵�浠ユ病鍙戞煡鐪嬩富浜哄垎閰嶅璐︽埛锛� + if (member.AccountType != 1) + { + continue; + } + + SubAccounListDictionary.Add(member.DistributedMark, member); } - //鍘绘帀瀛愯处鎴蜂腑鏅�氭垚鍛橈紝鐣欎笅鎷ユ湁绠$悊鍛樻潈闄愮殑鎴愬憳 - //锛堝洜涓哄垎閰嶈处鎴风粰鏅�氭垚鍛橈紝鏅�氭垚鍛樺湪app涓笉鑳借繘鍏ヨ澶囩鐞嗛偅閲岋紝鎵�浠ユ病鍙戞煡鐪嬩富浜哄垎閰嶅璐︽埛锛� - if (member.AccountType != 1) - { - continue; - } - - SubAccounListDictionary.Add(member.DistributedMark, member); } - foreach (var addMemberID in SubAccounListDictionary.Keys) { SubAccounList.Add(SubAccounListDictionary[addMemberID]); @@ -1138,6 +1152,16 @@ return password; } + //// <summary> + /// 鍙栧緱鏌愭湀鐨勬渶鍚庝竴澶� + /// </summary> + /// <param name="datetime">瑕佸彇寰楁湀浠芥渶鍚庝竴澶╃殑鏃堕棿</param> + /// <returns></returns> + public static DateTime LastDayOfMonth(DateTime datetime) + { + return datetime.AddDays(1 - datetime.Day).AddMonths(1).AddDays(-1); + } + /// <summary> /// 灏哢NIX鏃堕棿鎴宠浆鎹㈡垚绯荤粺鏃堕棿(绮剧‘鍒扮) /// <returns></returns> -- Gitblit v1.8.0