wanggongfeng 3 years ago
parent
commit
ef5b1bbfa3
  1. 11
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

11
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

@ -303,6 +303,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(tenantParams);
tenantList.forEach(tenant -> {
// 校验身份证
IdCardRegexUtils regex = IdCardRegexUtils.parse(tenant.getIdCard());
if (regex == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), tenant.getName()+"证件号错误", tenant.getName()+"证件号错误");
}
// 根据身份证解析性别和出生日期
tenant.setGender("0".equals(IdCardNoValidatorUtils.getGender(tenant.getIdCard())) ? "" : IdCardNoValidatorUtils.getGender(tenant.getIdCard()));
if(tenant.getIdCard() != null && tenant.getIdCard().length() == 18){
@ -317,11 +323,6 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
rentTenantInfoEntity.setContractId(logEntity.getId());
rentTenantInfoService.insert(rentTenantInfoEntity);
IdCardRegexUtils regex = IdCardRegexUtils.parse(tenant.getIdCard());
if (regex == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), tenant.getName()+"证件号错误", tenant.getName()+"证件号错误");
}
RentTenantFormDTO formDTO = new RentTenantFormDTO();
List<IcResiUserAttachmentDTO> images = new ArrayList<>();
formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId());

Loading…
Cancel
Save