Sfoglia il codice sorgente

调整计划计算精度

datasub12_fetal_heart_rate_1
H Vs 1 mese fa
parent
commit
dc0e0045f7
2 ha cambiato i file con 9 aggiunte e 2 eliminazioni
  1. +8
    -1
      HealthMonitor.Common/DateTimeUtil.cs
  2. +1
    -1
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 8
- 1
HealthMonitor.Common/DateTimeUtil.cs Vedi File

@@ -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 Vedi File

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

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


Loading…
Annulla
Salva