From 00d54ed7b5424fac64f0f0ac9cb05fffa4545d93 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 27 Apr 2022 17:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF=E5=92=8C?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/RentBlacklistServiceImpl.java | 2 +- .../impl/RentContractInfoServiceImpl.java | 58 +++++++++++++++++-- .../impl/RentTenantInfoServiceImpl.java | 7 +-- 3 files changed, 55 insertions(+), 12 deletions(-) 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