From 9840ff90eb86b14074ea97563ef5d63f8f1f7f92 Mon Sep 17 00:00:00 2001 From: H Vs Date: Fri, 16 Aug 2024 11:25:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs b/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs index a943172..0b4c98d 100644 --- a/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs +++ b/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs @@ -254,7 +254,8 @@ namespace HealthMonitor.Service.Resolver //_logger.LogInformation($"{heartRate.Serialno} 设置 stopHighFreqSampleCount {stopHighFreqSampleCount}"); //var lastPhr = phr.OrderByDescending(i => i.LastUpdate).Take(stopHighFreqSampleCount).ToList(); - var lastPhr = phr.Where(i=>i.LastUpdate>= phrFreqstatus!.LastUpdate).Take(stopHighFreqSampleCount).ToList(); + var lastPhr = phr.Where(i=>i.LastUpdate>= phrFreqstatus!.LastUpdate) + .OrderByDescending(i => i.LastUpdate).Take(stopHighFreqSampleCount).ToList(); // 检查是否连续12个值都是正常的 if (lastPhr.Count >= stopHighFreqSampleCount &&