diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java index 285ff8f..6db1756 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.IdCardNoValidatorUtils; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcResiUserAttachmentDTO; import com.epmet.dto.IcResiUserDTO; @@ -163,15 +164,27 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl { + // 获取基本信息 + RentContractInfoDTO contractDto = get(dto.getId()); + + // 获取租客信息 + Map tenantParams = new HashMap<>(4); + tenantParams.put("contractId", contractDto.getId()); + List tenantList = rentTenantInfoService.list(tenantParams); + + tenantList.forEach(tenant -> { RentTenantFormDTO formDTO = new RentTenantFormDTO(); List images = new ArrayList<>(); formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); formDTO.setIdCard(tenant.getIdCard()); - formDTO.setImages(images); formDTO.setType(NumConstant.ONE_STR); - tenant.getImgList().forEach(img -> { + Map imgParams = new HashMap<>(4); + imgParams.put("referenceId", tenant.getId()); + imgParams.put("fileType", NumConstant.ZERO_STR); + List imgList = rentContractFileService.list(imgParams); + + imgList.forEach(img -> { // 更新基础库的人员头像 IcResiUserAttachmentDTO image = new IcResiUserAttachmentDTO(); image.setAttachmentUrl(img.getFileUrl()); @@ -183,24 +196,24 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl agencyInfo = govOrgOpenFeignClient.getAgencyById(dto.getCommunityId()); + user.setAgencyId(contractDto.getCommunityId()); + Result agencyInfo = govOrgOpenFeignClient.getAgencyById(contractDto.getCommunityId()); user.setPids(agencyInfo.getData().getPids()); formDTO.setUser(user); epmetUserOpenFeignClient.updateImage(formDTO); - }); } } @@ -250,7 +263,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl { + tenantList.forEach(tenant -> { if (null == tenant.getImgList() || tenant.getImgList().isEmpty()) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "租客照片不能为空"); } else {