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); } }