人口基本信息- 修改了身份证校验的规则

This commit is contained in:
java_cuibaocheng@163.com 2023-11-22 10:51:58 +08:00
parent 7946224c1b
commit 4e009a1b00

View File

@ -296,7 +296,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
if (dto != null) {
throw new SaveException("该证件号码已存在");
}
if (populationInfoVO.getIdcardType().equals("身份证")) {
if (populationInfoVO.getIdcardType().contains("身份证")) {
if(!IdCardVerifyUtil.isIDCard(populationInfoVO.getIdcard().trim())) {
throw new SaveException("该证件号码错误");
}
@ -376,7 +376,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
if (dto != null && !dto.getPopulationInfoId().equals(populationInfoId)) {
throw new SaveException("该证件号码已存在");
}
if (populationInfoVO.getIdcardType().equals("身份证")) {
if (populationInfoVO.getIdcardType().contains("身份证")) {
if(!IdCardVerifyUtil.isIDCard(populationInfoVO.getIdcard().trim())) {
throw new SaveException("该证件号码错误");
}