Browse Source

调整胎动计划计算的时间精度

master
H Vs 2 months ago
parent
commit
6917ac8e68
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 4
- 3
HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs View File

@@ -51,7 +51,7 @@ namespace HealthMonitor.Service.Resolver

private readonly MqProcessLogic _serviceMqProcess;

private static int[] SCHEDULE_HOUR = new int[] { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 };
private static int[] SCHEDULE_HOUR = new int[] {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22};

private static int[] ODD_SCHEDULE_HOUR = new int[] { 1, 3, 5, 7, 9, 11,13, 15, 17, 19, 21, 23 };
// 延时胎心计算间隔周期
@@ -237,8 +237,8 @@ namespace HealthMonitor.Service.Resolver
fmScheduleNow.Month,
fmScheduleNow.Day,
selectedScheduleHour,
0, // 分钟设为 0
0 // 秒设为 0
pushMin,
pushSec
);

// 如果生成的时间在当前时间之前
@@ -252,6 +252,7 @@ namespace HealthMonitor.Service.Resolver
var ttl = (long)timeUntilNextRun.TotalSeconds;

await SetIntervalTriggerAsync(fetalMovementKey, heartRate.Serialno, ttl, heartRate);
_logger.LogInformation($"{heartRate.Serialno}-{heartRate.MessageId} 创建计划统计胎动时间{scheduledDateTime.ToString("yyyy-MM-dd HH:mm:ss")}");
#endregion




Loading…
Cancel
Save