|
@@ -245,14 +245,14 @@ namespace HealthMonitor.WebApi |
|
|
if (person == null || person?.Person.BornDate == null) |
|
|
if (person == null || person?.Person.BornDate == null) |
|
|
{ |
|
|
{ |
|
|
_logger.LogWarning($"{nameof(Worker)}--{imeiDel} 验证个人信息,找不到个人信息,跳过此消息"); |
|
|
_logger.LogWarning($"{nameof(Worker)}--{imeiDel} 验证个人信息,找不到个人信息,跳过此消息"); |
|
|
return; |
|
|
|
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
// 验证年龄是否在范围 (2 - 120) |
|
|
// 验证年龄是否在范围 (2 - 120) |
|
|
var age = SafeType.SafeInt(DateTime.Today.Year - person?.Person.BornDate!.Value.Year!); |
|
|
var age = SafeType.SafeInt(DateTime.Today.Year - person?.Person.BornDate!.Value.Year!); |
|
|
if (age < 2 || age > 120) |
|
|
if (age < 2 || age > 120) |
|
|
{ |
|
|
{ |
|
|
_logger.LogWarning($"{nameof(Worker)}--{imeiDel} 验证年龄,不在范围 (2 - 120)岁,跳过此消息"); |
|
|
_logger.LogWarning($"{nameof(Worker)}--{imeiDel} 验证年龄,不在范围 (2 - 120)岁,跳过此消息"); |
|
|
return; |
|
|
|
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var gender = person?.Person.Gender == true ? 1 : 2; |
|
|
var gender = person?.Person.Gender == true ? 1 : 2; |
|
|