소스 검색

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

master
H Vs 2 달 전
부모
커밋
6917ac8e68
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. +4
    -3
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 4
- 3
HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs 파일 보기

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


private readonly MqProcessLogic _serviceMqProcess; 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 }; 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.Month,
fmScheduleNow.Day, fmScheduleNow.Day,
selectedScheduleHour, selectedScheduleHour,
0, // 分钟设为 0
0 // 秒设为 0
pushMin,
pushSec
); );


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


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






Loading…
취소
저장