Bladeren bron

优化日志信息

datasub12_previous
H Vs 1 jaar geleden
bovenliggende
commit
7ccb983806
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. +2
    -2
      HealthMonitor.Service/Resolver/BloodpressResolver.cs

+ 2
- 2
HealthMonitor.Service/Resolver/BloodpressResolver.cs Bestand weergeven

@@ -135,14 +135,14 @@ namespace HealthMonitor.Service.Resolver
//验证这个信息是否存在
if (person == null || person?.Person.BornDate == null)
{
_logger.LogWarning($"{bp.Serialno}--{bp.MessageId}验证个人信息,找不到个人信息,跳过此消息");
_logger.LogWarning($"{bp.Serialno}--{bp.MessageId} 验证个人信息,找不到个人信息,跳过此消息");
return;
}
// 验证年龄是否在范围 (2 - 120)
var age = SafeType.SafeInt(DateTime.Today.Year - person?.Person.BornDate!.Value.Year!);
if (age < 2 || age > 120)
{
_logger.LogWarning("验证年龄,不在范围 (2 - 120)岁,跳过此消息");
_logger.LogWarning($"{bp.Serialno}--{bp.MessageId} 验证年龄,不在范围 (2 - 120)岁,跳过此消息");
return;
}



Laden…
Annuleren
Opslaan