From 8815c569583bc850a5c2b8aae93f7bd218305daf Mon Sep 17 00:00:00 2001 From: H Vs Date: Wed, 24 Jul 2024 09:52:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=B2=BE=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HealthMonitor.Service/Biz/db/TDengineService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HealthMonitor.Service/Biz/db/TDengineService.cs b/HealthMonitor.Service/Biz/db/TDengineService.cs index 490b0f4..ec89221 100644 --- a/HealthMonitor.Service/Biz/db/TDengineService.cs +++ b/HealthMonitor.Service/Biz/db/TDengineService.cs @@ -979,9 +979,9 @@ namespace HealthMonitor.Service.Biz.db _logger.LogInformation($"IMEI {serialNo},EDOC:{edoc},NOW:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")},SinceNOW:{DateTimeUtil.GetDateTimeFromUnixTimeMilliseconds(edoc).AddDays(-280).ToString("yyyy-MM-dd HH:mm:ss")},怀孕周数 {pregnancyWeek}"); - var statMaxValueFprCoefficient = 0; - var statMinValueFprCoefficient = 0; - var StatModeAvgFprCoefficient = 0; + float statMaxValueFprCoefficient = 0f; + float statMinValueFprCoefficient = 0f; + float StatModeAvgFprCoefficient = 0f; // 20-45周之间 if (pregnancyWeek >= 12 && pregnancyWeek <= 45) { @@ -995,9 +995,9 @@ namespace HealthMonitor.Service.Biz.db if (map != null) { - statMaxValueFprCoefficient = map.FetalHeartRateRange![1] / res.Max(); - statMinValueFprCoefficient = map.FetalHeartRateRange[0]/res.Min(); - StatModeAvgFprCoefficient = map.FetalHeartRateAverage / mode; + statMaxValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange![1] / res.Max(), 3); + statMinValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange[0] / res.Min(), 3); + StatModeAvgFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateAverage / mode, 3); } }