人口基本信息身份证校验修改
This commit is contained in:
parent
d5df028eca
commit
e087533d1a
@ -235,6 +235,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
@Override
|
@Override
|
||||||
public String saveReturnId(String token, PopulationInfoVO populationInfoVO) {
|
public String saveReturnId(String token, PopulationInfoVO populationInfoVO) {
|
||||||
String populationInfoId = UUIDUtil.getUUID();
|
String populationInfoId = UUIDUtil.getUUID();
|
||||||
|
populationInfoVO.setIdcard(populationInfoVO.getIdcard().trim().replaceAll("x", "X"));
|
||||||
PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim());
|
PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim());
|
||||||
if (dto != null) {
|
if (dto != null) {
|
||||||
throw new SaveException("该证件号码已存在");
|
throw new SaveException("该证件号码已存在");
|
||||||
@ -306,7 +307,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(String token, String populationInfoId, PopulationInfoVO populationInfoVO) {
|
public void update(String token, String populationInfoId, PopulationInfoVO populationInfoVO) {
|
||||||
Map<String, Object> params = HashMapUtil.objectToMap(populationInfoVO);
|
populationInfoVO.setIdcard(populationInfoVO.getIdcard().trim().replaceAll("x", "X"));
|
||||||
PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim());
|
PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim());
|
||||||
if (dto != null && !dto.getPopulationInfoId().equals(populationInfoId)) {
|
if (dto != null && !dto.getPopulationInfoId().equals(populationInfoId)) {
|
||||||
throw new SaveException("该证件号码已存在");
|
throw new SaveException("该证件号码已存在");
|
||||||
@ -331,6 +332,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
if (!StringUtil.isEmpty(populationInfoVO.getPhone()) && populationInfoVO.getPhone().length() != 11) {
|
if (!StringUtil.isEmpty(populationInfoVO.getPhone()) && populationInfoVO.getPhone().length() != 11) {
|
||||||
throw new SaveException("手机号码错误");
|
throw new SaveException("手机号码错误");
|
||||||
}
|
}
|
||||||
|
Map<String, Object> params = HashMapUtil.objectToMap(populationInfoVO);
|
||||||
params.put("populationInfoId", populationInfoId);
|
params.put("populationInfoId", populationInfoId);
|
||||||
if(StringUtils.isEmpty(token)) {
|
if(StringUtils.isEmpty(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
|
Loading…
Reference in New Issue
Block a user