|
|
@ -242,12 +242,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
rentContractFileService.deletePhysical(params); |
|
|
|
|
|
|
|
if (null == dto.getTenantList() || dto.getTenantList().isEmpty()) { |
|
|
|
return new Result().error("租客不能为空"); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"租客不能为空"); |
|
|
|
} else { |
|
|
|
List<RentTenantInfoEntity> tenantList = ConvertUtils.sourceToTarget(dto.getTenantList(), RentTenantInfoEntity.class); |
|
|
|
long idCardNum = tenantList.stream().map(RentTenantInfoEntity::getIdCard).collect(Collectors.toList()).stream().distinct().count(); |
|
|
|
if (tenantList.size() != idCardNum) { |
|
|
|
return new Result().error("租客身份证重复"); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"租客身份证重复"); |
|
|
|
} |
|
|
|
|
|
|
|
tenantList.forEach(tenant -> { |
|
|
@ -279,7 +279,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
|
|
|
|
} |
|
|
|
if (null == dto.getFileList() || dto.getFileList().isEmpty()) { |
|
|
|
return new Result().error("合同附件不能为空"); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"合同附件不能为空"); |
|
|
|
} else { |
|
|
|
List<RentContractFileEntity> fileList = ConvertUtils.sourceToTarget(dto.getFileList(), RentContractFileEntity.class); |
|
|
|
fileList.forEach(item -> { |
|
|
|