Explorar el Código

调整计划计算精度

datasub12_fetal_heart_rate_1
H Vs hace 1 mes
padre
commit
dc0e0045f7
Se han modificado 2 ficheros con 9 adiciones y 2 borrados
  1. +8
    -1
      HealthMonitor.Common/DateTimeUtil.cs
  2. +1
    -1
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 8
- 1
HealthMonitor.Common/DateTimeUtil.cs Ver fichero

@@ -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 Ver fichero

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

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


Cargando…
Cancelar
Guardar