|
@ -282,6 +282,19 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
if (NumConstant.ONE_STR.equals(entity.getState())) { |
|
|
if (NumConstant.ONE_STR.equals(entity.getState())) { |
|
|
// 获取基本信息
|
|
|
// 获取基本信息
|
|
|
RentContractInfoDTO contractDto = get(dto.getId()); |
|
|
RentContractInfoDTO contractDto = get(dto.getId()); |
|
|
|
|
|
// 获取租客信息
|
|
|
|
|
|
Map<String, Object> tenantParams = new HashMap<>(4); |
|
|
|
|
|
tenantParams.put("contractId", contractDto.getId()); |
|
|
|
|
|
List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(tenantParams); |
|
|
|
|
|
// 提前校验身份证格式
|
|
|
|
|
|
for(RentTenantInfoDTO rentTenantInfoDTO : tenantList){ |
|
|
|
|
|
// 校验身份证
|
|
|
|
|
|
IdCardRegexUtils regex = IdCardRegexUtils.parse(rentTenantInfoDTO.getIdCard()); |
|
|
|
|
|
if (regex == null) { |
|
|
|
|
|
return new Result().error(rentTenantInfoDTO.getName()+"证件号错误"); |
|
|
|
|
|
// throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), rentTenantInfoDTO.getName()+"证件号错误", rentTenantInfoDTO.getName()+"证件号错误");
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 1、审核通过,插入合同记录表
|
|
|
// 1、审核通过,插入合同记录表
|
|
|
PliRentContractInfoLogEntity logEntity = ConvertUtils.sourceToTarget(contractDto, PliRentContractInfoLogEntity.class); |
|
|
PliRentContractInfoLogEntity logEntity = ConvertUtils.sourceToTarget(contractDto, PliRentContractInfoLogEntity.class); |
|
@ -297,17 +310,9 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
} |
|
|
} |
|
|
rentContractFileService.insertBatch(contractFileEntities); |
|
|
rentContractFileService.insertBatch(contractFileEntities); |
|
|
|
|
|
|
|
|
// 获取租客信息
|
|
|
|
|
|
Map<String, Object> tenantParams = new HashMap<>(4); |
|
|
|
|
|
tenantParams.put("contractId", contractDto.getId()); |
|
|
|
|
|
List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(tenantParams); |
|
|
|
|
|
|
|
|
|
|
|
tenantList.forEach(tenant -> { |
|
|
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())); |
|
|
tenant.setGender("0".equals(IdCardNoValidatorUtils.getGender(tenant.getIdCard())) ? "" : IdCardNoValidatorUtils.getGender(tenant.getIdCard())); |
|
|