Bläddra i källkod

调整计划计算精度

datasub12_fetal_heart_rate_1
H Vs 1 månad sedan
förälder
incheckning
dc0e0045f7
2 ändrade filer med 9 tillägg och 2 borttagningar
  1. +8
    -1
      HealthMonitor.Common/DateTimeUtil.cs
  2. +1
    -1
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 8
- 1
HealthMonitor.Common/DateTimeUtil.cs Visa fil

@@ -736,8 +736,15 @@ namespace HealthMonitor.Common
return 1; // 23点到0点时,返回次日1小时
}

// 处理 22 点特殊情况
if (currentHour == 22)
{
return 0; // 22点到23点时,返回次日0小时
}


// 计算其他时间的返回值
return (currentHour / 2 + 1) * 2;
return (int)((Math.Round(currentHour / 2.0, 1) + 1) * 2);
}

///// <summary>


+ 1
- 1
HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs Visa fil

@@ -257,7 +257,7 @@ namespace HealthMonitor.Service.Resolver
);

// 跨天
if (selectedScheduleHour == 1)
if (selectedScheduleHour == 1 || selectedScheduleHour == 0)
{
scheduledDateTime = scheduledDateTime.AddDays(1);
}


Laddar…
Avbryt
Spara