From f748908e5414736eb243ae7ec66a80dc9f5d9d49 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期四, 26 九月 2024 11:37:00 +0800
Subject: [PATCH] 水浸传感器,红外传感器,面板空调

---
 HDL_ON/DAL/Mqtt/MqttClient.cs |   39 ++++++++++++++-------------------------
 1 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 36272cc..cb8b7c4 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -357,7 +357,7 @@
             //{
             //    return;
             //}
-            if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null)
+            if (OnAppConfig.Instance.LastLoginUserId == ""|| DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null)
             {
                 return;
             }
@@ -860,18 +860,8 @@
         /// </summary>
         static void ReceiveNotifySqueezeAsync(string mMes)
         {
+            MainPage.Log($"鎺ㄩ�佹爣璇嗭細{mMes};鏈湴鏍囪瘑锛歿PushSignStr}");
             if (mMes == PushSignStr) return;//鏄嚜宸辩殑鐧诲綍鎺ㄩ�佷笉澶勭悊//鎴栬�呭綋鍓嶄笉鏄繙绋嬮摼鎺ョ姸鎬�
-            //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
-            switch (UserInfo.Current.userMobileInfo)
-            {
-                case "15626203746":
-                    return;
-            }
-
-            //if (!UserInfo.Current.IsLogin)
-            //{
-            //    return;
-            //}
 
             DisConnectRemoteMqttClient("鎸や笅绾�");
 
@@ -880,18 +870,6 @@
                 //寮圭獥鎻愮ず琚尋涓嬬嚎
                 HDLCommon.Current.CheckLogout();
             });
-
-
-            //UserInfo.Current.LastTime = DateTime.MinValue;
-            //UserInfo.Current.SaveUserInfo();
-
-            //Application.RunOnMainThread(() => {
-            //    MainPage.GoLoginPage(UserInfo.Current);
-            //    //寮圭獥鎻愮ず琚尋涓嬬嚎
-            //});
-
-            //2020-08-11 鍒犻櫎鎺ㄩ�佹暟鎹�
-            //HDLRequest.Current.PushserivceSignOut ();
         }
 
         ///// <summary>
@@ -914,6 +892,18 @@
         /// </summary>
         static void SendPushSignOut()
         {
+#if DEBUG
+            MainPage.Log("璋冭瘯妯″紡锛屼笉鍙戝竷鎸や笅绾夸富棰樸��");
+            return;
+#endif
+            //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
+            switch (UserInfo.Current.AccountString)
+            {
+                case "15626203746":
+                case "13580507523":
+                    return;
+            }
+
             byte[] message = Encoding.UTF8.GetBytes(PushSignStr);
             MqttRemoteSend(message, 4);
         }
@@ -941,7 +931,6 @@
                         break;
                     case 4://鍙戝竷鏂版柟妗堢殑鎸や笅绾夸富棰�
                         topicName = $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze;
-                        //message = Encoding.UTF8.GetBytes (PushSignStr);
                         await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
                         break;
                 }

--
Gitblit v1.8.0