|
|
|
@ -122,26 +122,27 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
RentContractInfoEntity entity = baseDao.selectById(id); |
|
|
|
RentContractInfoDTO dto = ConvertUtils.sourceToTarget(entity, RentContractInfoDTO.class); |
|
|
|
|
|
|
|
// 取出租客信息
|
|
|
|
Map<String, Object> params = new HashMap<>(4); |
|
|
|
params.put("contractId", id); |
|
|
|
|
|
|
|
// 取出租客信息
|
|
|
|
List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(params); |
|
|
|
|
|
|
|
tenantList.forEach(item -> { |
|
|
|
// 租客信息补充照片信息
|
|
|
|
params.put("referenceId", item.getId()); |
|
|
|
params.put("fileType", NumConstant.ZERO_STR); |
|
|
|
List<RentContractFileDTO> imgList = rentContractFileService.list(params); |
|
|
|
Map<String, Object> imgParams = new HashMap<>(4); |
|
|
|
imgParams.put("referenceId", item.getId()); |
|
|
|
imgParams.put("fileType", NumConstant.ZERO_STR); |
|
|
|
List<RentContractFileDTO> imgList = rentContractFileService.list(imgParams); |
|
|
|
item.setImgList(imgList); |
|
|
|
}); |
|
|
|
dto.setTenantList(tenantList); |
|
|
|
dto.setTenantNum(tenantList.size()); |
|
|
|
|
|
|
|
params.put("referenceId", dto.getId()); |
|
|
|
params.put("fileType", NumConstant.ONE_STR); |
|
|
|
// 取出合同文件信息
|
|
|
|
List<RentContractFileDTO> fileList = rentContractFileService.list(params); |
|
|
|
Map<String, Object> fileParams = new HashMap<>(4); |
|
|
|
fileParams.put("referenceId", dto.getId()); |
|
|
|
fileParams.put("fileType", NumConstant.ONE_STR); |
|
|
|
List<RentContractFileDTO> fileList = rentContractFileService.list(fileParams); |
|
|
|
dto.setFileList(fileList); |
|
|
|
|
|
|
|
return dto; |
|
|
|
|