diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentBlacklistServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentBlacklistServiceImpl.java index 38805dd..6849786 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentBlacklistServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentBlacklistServiceImpl.java @@ -93,7 +93,7 @@ public class RentBlacklistServiceImpl extends BaseServiceImpl result = epmetUserOpenFeignClient.tenantData(formDTO); + Result result = epmetUserOpenFeignClient.getRentResiUserInfo(formDTO); dto.setIdCard(result.getData().getIdCard()); dto.setMobile(result.getData().getMobile()); 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 4acff95..2f8223c 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 @@ -10,6 +10,14 @@ import com.epmet.commons.tools.exception.EpmetException; 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.dto.CustomerAgencyDTO; +import com.epmet.dto.IcResiUserAttachmentDTO; +import com.epmet.dto.IcResiUserDTO; +import com.epmet.dto.form.RentTenantFormDTO; +import com.epmet.dto.result.GridInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.plugin.power.dto.rent.RentContractFileDTO; import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; @@ -26,10 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 合同表 @@ -46,6 +51,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl{ + dto.getTenantList().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 -> { + // 更新基础库的人员头像 + IcResiUserAttachmentDTO image = new IcResiUserAttachmentDTO(); + image.setAttachmentUrl(img.getFileUrl()); + image.setCustomerId(loginUserUtil.getLoginUserCustomerId()); + images.add(image); + }); + formDTO.setImages(images); + + // 初始化居民信息 + IcResiUserDTO user = new IcResiUserDTO(); + user.setCustomerId(loginUserUtil.getLoginUserCustomerId()); + user.setGridId(dto.getGridId()); + user.setVillageId(dto.getVillageId()); + user.setBuildId(dto.getBuildId()); + user.setUnitId(dto.getUnitId()); + user.setHomeId(dto.getHomeId()); + user.setName(tenant.getName()); + user.setIdCard(tenant.getIdCard()); + user.setMobile(tenant.getMobile()); + + Result gridInfo = govOrgOpenFeignClient.queryGridInfo(dto.getGridId()); + user.setAgencyId(gridInfo.getData().getParentAgencyId()); + Result agencyInfo = govOrgOpenFeignClient.getAgencyById(gridInfo.getData().getParentAgencyId()); + user.setPids(agencyInfo.getData().getPids()); + + formDTO.setUser(user); + epmetUserOpenFeignClient.updateImage(formDTO); }); diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java index 17b84e9..e4a48bc 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java @@ -13,7 +13,6 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dto.IcResiUserAttachmentDTO; import com.epmet.dto.form.RentTenantFormDTO; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; import com.epmet.plugin.power.modules.rent.dao.RentTenantInfoDao; import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity; @@ -49,9 +48,6 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl