From d44d009da78f96fe50e6dc7c1883e79ffb1aff58 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期五, 18 三月 2022 16:42:01 +0800 Subject: [PATCH] 2022=03-18-01 --- HDL_ON/Entity/Function/Function.cs | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 3772dc2..c6af2de 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -112,11 +112,30 @@ public string GetAttrState(string key) { var attrState = attributes.Find((s) => s.key == key.ToString()); - if (attrState == null || string.IsNullOrEmpty(attrState.state)) + if (attrState == null) { return "0"; } + if (string.IsNullOrEmpty(attrState.state)) + { + return GetOriginalState(key); + } return attrState.state; + } + + /// <summary> + /// 鑾峰彇鍒濆鐘舵�� + /// </summary> + /// <param name="key"></param> + /// <returns></returns> + public string GetOriginalState(string key) + { + var originalState = status.Find((s) => s.key == key.ToString()); + if (originalState == null || string.IsNullOrEmpty(originalState.value)) + { + return "0"; + } + return originalState.value; } /// <summary> /// 璁剧疆灞炴�х姸鎬� @@ -556,6 +575,13 @@ SaveFunctionFile(); if (pack.Code == StateCode.SUCCESS) { + if (UI.RoomPage.bodyView != null) + { + Application.RunOnMainThread(() => + { + UI.RoomPage.bodyView.ReLoadPage(); + }); + } } else { @@ -709,12 +735,8 @@ sendDataObj.time_stamp = Utlis.GetTimestamp(); var acd = new AlinkDoorlockStatus(); acd.sid = sid; - acd.user_id = userId; + acd.user_id = extStr; acd.ext_str = extStr; -#if DEBUG - acd.user_id = "013"; - acd.ext_str = "999999"; -#endif sendDataObj.objects.Add(acd); return sendDataObj; } -- Gitblit v1.8.0