From ab6d5eabe6f33b8b64d6bc7878ecb6b5f14098b5 Mon Sep 17 00:00:00 2001 From: H Vs Date: Fri, 9 Aug 2024 17:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=AB=98=E9=A2=91=E9=98=88?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Biz/db/TDengineService.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/HealthMonitor.Service/Biz/db/TDengineService.cs b/HealthMonitor.Service/Biz/db/TDengineService.cs index e3cd7f7..da6d2fa 100644 --- a/HealthMonitor.Service/Biz/db/TDengineService.cs +++ b/HealthMonitor.Service/Biz/db/TDengineService.cs @@ -26,6 +26,7 @@ using TDengineDriver.Impl; using TDengineTMQ; using HealthMonitor.Service.Cache; using System.Text.RegularExpressions; +using Etcdserverpb; namespace HealthMonitor.Service.Biz.db { @@ -1153,6 +1154,19 @@ namespace HealthMonitor.Service.Biz.db StatModeAvgFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateAverage / mode, 3); } } + // 如果最大值与最小值在60~100范围内,都按个固定值下发高频阈值。 + var maxValue = closestToModeData.Max(); + var minValue = closestToModeData.Min(); + + if (maxValue >= 60 && maxValue <= 100) + { + maxValue = 100; + } + + if (minValue >= 60 && minValue <= 100) + { + minValue = 60; + } return new PregnancyCommonHeartRateModel() { @@ -1162,8 +1176,8 @@ namespace HealthMonitor.Service.Biz.db SerialNumber = collection.First().SerialNumber, Mode = mode, Percentage = percentage, - MaxValue = closestToModeData.Max(), - MinValue = closestToModeData.Min(), + MaxValue = maxValue, + MinValue = minValue, OriginalMaxValue = res.Max(), OriginalMinValue = res.Min(), CreateTime = DateTime.Now,