From da22725d616af0f3081670c76195eaf57794bc29 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 18 五月 2022 16:03:33 +0800 Subject: [PATCH] Merge branch 'dev-CQY' into dev 1.调整全视通与自研的逻辑 2.增加获取可视对讲第三方账号接口 --- HDL_ON/Entity/Function/Sensor.cs | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HDL_ON/Entity/Function/Sensor.cs b/HDL_ON/Entity/Function/Sensor.cs index 5a86351..581343d 100644 --- a/HDL_ON/Entity/Function/Sensor.cs +++ b/HDL_ON/Entity/Function/Sensor.cs @@ -100,7 +100,8 @@ } } } - return _intervalValue; + if (_intervalValue.Count > 0) + return _intervalValue; } @@ -160,7 +161,8 @@ { if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) { - return attrKey.unit; + if (string.IsNullOrEmpty(attrKey.unit)) + return attrKey.unit; } } } @@ -205,11 +207,12 @@ { foreach (var info in attrKey.configs) { - _levelColorList.Add(info.color); + _levelColorList.Add(Convert.ToUInt32(info.color, 16)); } } } - return _levelColorList; + if (_levelColorList.Count > 0) + return _levelColorList; } string spk = function.spk; @@ -283,7 +286,8 @@ } } } - return _levelTextList; + if (_levelTextList.Count > 0) + return _levelTextList; } string spk = function.spk; -- Gitblit v1.8.0