|
|
@@ -259,7 +259,10 @@ namespace HealthMonitor.Service.Resolver |
|
|
|
|
|
|
|
#region 计算胎心数据(按心率时间LastUpdate) |
|
|
|
var commonPHR = await _serviceTDengine.GetLastAsync<PregnancyCommonHeartRateModel>(heartRate.Serialno); |
|
|
|
if (commonPHR == null) |
|
|
|
// 如果commonPHR为空或已建模已过期,进行建模和保存 |
|
|
|
if (commonPHR == null || !commonPHR.CreateTime.Date.Equals(DateTime.Now.Date)) |
|
|
|
// 获取当天 6:11 的时间点, 6:11 所有数据都已经全部建模 |
|
|
|
//if (commonPHR == null || commonPHR.CreateTime < DateTime.Today.AddHours(6).AddMinutes(11)) |
|
|
|
{ |
|
|
|
// 处理孕妇业务,计算一般心率并下发 |
|
|
|
commonPHR = await _serviceTDengine.InitPregnancyCommonHeartRateModeAsync(heartRate.Serialno, highFreqSampleInterval: highFreqSampleInterval); |
|
|
|