|
|
@@ -194,8 +194,9 @@ public class DismissService {
|
|
|
if (!IdCardUtil.isValidatedIdCard(param.getSocialNo())) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "身份证不合法!");
|
|
|
}
|
|
|
- int age = IdCardUtil.getAgeByIdCard(param.getSocialNo());
|
|
|
- if (age < 16 || age > 60) {
|
|
|
+ Integer age = IdCardUtil.getAgeByIdCard(param.getSocialNo());
|
|
|
+ age = age == null ? param.getAge() : age;
|
|
|
+ if (null != age && (age < 16 || age > 60)) {
|
|
|
if (param.getName().equals(param.getContactName()) ||
|
|
|
param.getContactRelation().equals("0")) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "16岁以下或60岁以上的患者,联系人不能填写本人。");
|