diff --git a/HealthMonitor.Service/Cache/DeviceCacheManager.cs b/HealthMonitor.Service/Cache/DeviceCacheManager.cs index abf17cc..bdee39b 100644 --- a/HealthMonitor.Service/Cache/DeviceCacheManager.cs +++ b/HealthMonitor.Service/Cache/DeviceCacheManager.cs @@ -64,6 +64,7 @@ namespace HealthMonitor.Service.Cache var config = await RedisHelperDb7.HGetAsync(CACHE_KEY_GPSDEVICE_WATCH_CONFIG, $"{sn}_{bizCode}").ConfigureAwait(false); if (config == null) return null; + _logger.LogInformation($"{sn} 配置信息 {config}"); return (JObject)JsonConvert.DeserializeObject(config)!; } catch (Exception ex) diff --git a/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs b/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs index 1835b18..2740b4d 100644 --- a/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs +++ b/HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs @@ -118,7 +118,7 @@ namespace HealthMonitor.Service.Resolver //停止高频心率采样心率连续正常次数 var stopHighFreqSampleCount = (int)watchConfig["stopHighFreqSampleCount"]!; // 高频心率采集时长 0 为持续采集,非零为高频心率的采集时长 - var highFreqSampleTimes = (int)watchConfig["stopHighFreqSampleCount"]!; + var highFreqSampleTimes = (int)watchConfig["highFreqSampleTimes"]!; // 告警上限阀值 var upperAlarmThreshold = (int)watchConfig["upperAlarmThreshold"]!; // 告警下限阀值 @@ -223,7 +223,7 @@ namespace HealthMonitor.Service.Resolver if (highFreqSampleTimes > 0 && heartRate.LastUpdate >= (phrFreqstatus?.LastUpdate + TimeSpan.FromSeconds(highFreqSampleTimes))) { var filterPhr = phr - .Where(i => i.Timestamp >= phrFreqstatus?.Timestamp); + .Where(i => i.LastUpdate >= phrFreqstatus?.LastUpdate); @@ -238,7 +238,7 @@ namespace HealthMonitor.Service.Resolver //await SaveAndPushFreqFetalHeartRateAsync(heartRate, commonPHR, upperAlarmThreshold, lowerAlarmThreshold, avgPhr, DateTimeUtil.ConvertToTimeStamp(DateTime.Now).ToString()); // 高频数据不建模 FreqStatsEnd = firstTwoPhr[1]; - _logger.LogInformation($"{heartRate.Serialno} 高频状态已经持续{(FreqStatsEnd - phrFreqstatus!.LastUpdate).TotalSeconds} 秒,超过规定的 {highFreqSampleTimes} 秒,即将结束高频状态,将下发指令"); + _logger.LogInformation($"{heartRate.Serialno} 高频状态已经持续{(FreqStatsEnd - phrFreqstatus!.LastUpdate).TotalSeconds} 秒,超过约定的 {highFreqSampleTimes} 秒,即将结束高频状态,将下发指令"); await SaveAndPushFreqFetalHeartRateAsync(heartRate, commonPHR, upperAlarmThreshold, lowerAlarmThreshold, avgPhr, DateTimeUtil.ConvertToTimeStamp(phrFreqstatus!.LastUpdate).ToString()); }