diff --git a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java index 56b6ec9..23c1ff4 100644 --- a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java +++ b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java @@ -235,6 +235,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul @Override public String saveReturnId(String token, PopulationInfoVO populationInfoVO) { String populationInfoId = UUIDUtil.getUUID(); + populationInfoVO.setIdcard(populationInfoVO.getIdcard().trim().replaceAll("x", "X")); PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim()); if (dto != null) { throw new SaveException("该证件号码已存在"); @@ -306,7 +307,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul @Override public void update(String token, String populationInfoId, PopulationInfoVO populationInfoVO) { - Map params = HashMapUtil.objectToMap(populationInfoVO); + populationInfoVO.setIdcard(populationInfoVO.getIdcard().trim().replaceAll("x", "X")); PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim()); if (dto != null && !dto.getPopulationInfoId().equals(populationInfoId)) { throw new SaveException("该证件号码已存在"); @@ -331,6 +332,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul if (!StringUtil.isEmpty(populationInfoVO.getPhone()) && populationInfoVO.getPhone().length() != 11) { throw new SaveException("手机号码错误"); } + Map params = HashMapUtil.objectToMap(populationInfoVO); params.put("populationInfoId", populationInfoId); if(StringUtils.isEmpty(token)) { setUpdateInfo(params);