diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcResiUserBriefDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcResiUserBriefDTO.java index 87393c2a17..540b0207d9 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcResiUserBriefDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcResiUserBriefDTO.java @@ -90,4 +90,35 @@ public class IcResiUserBriefDTO extends HouseUserDTO implements Serializable { * 工作单位 */ private String gzdw; + + + /** + * 因灵山项目添加此列: + * 民族: + */ + private String mz; + + /** + * 因灵山项目添加此列: + * 与户主关系:存储字典纸 + */ + private String yhzgx; + + /** + * 因灵山项目添加此列: + * 与户主关系:名称 + */ + private String yhzgxName; + + /** + * 因灵山项目添加此列: + * 重点人群:信访人员、社区矫正、精障患者、戒毒人员、安置帮教 + */ + private List specialCrowdName; + + /** + * 因灵山项目添加此列: + * 重点人群:特困人员、留守儿童、空巢老人、高龄老人、独居老人、低保、大病、残疾人 + */ + private List helpCrowdName; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcSpecialDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcSpecialDao.java index 81ac6f0eba..208b075208 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcSpecialDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcSpecialDao.java @@ -11,7 +11,7 @@ import java.util.List; @Mapper public interface IcSpecialDao extends BaseDao { - public IcSpecialEntity selectByResiId(@Param("resiId") String resiId); + IcSpecialEntity selectByResiId(@Param("resiId") String resiId); List listSpecialCrowd(@Param("orgIdPath") String orgIdPath, @Param("orgId") String orgId, @@ -20,4 +20,11 @@ public interface IcSpecialDao extends BaseDao { @Param("name") String name, @Param("mobile") String mobile, @Param("idCard") String idCard); + + /** + * 查询:lingshan_help_crowd_resi_merge + * @param resiUserId + * @return 返回重点帮扶人员类别 + */ + List selectHelpCrowdType(String resiUserId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index b149345970..a308fd7f55 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.enums.*; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; @@ -64,6 +65,8 @@ import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.lingshan.ConfigPartyCenterHouseFormDTO; import com.epmet.dto.result.resi.IcResiNonDynamicResultDTO; import com.epmet.entity.*; +import com.epmet.enums.LingShanHelpCrowdTypeEnum; +import com.epmet.enums.LingShanSpecialCrowdTypeEnums; import com.epmet.enums.RenHuConditionEnum; import com.epmet.excel.EpidemicPreventionExportExcel; import com.epmet.excel.support.ExportResiUserItemDTO; @@ -82,6 +85,7 @@ import com.google.common.cache.CacheBuilder; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.compress.utils.Lists; import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.NotNull; @@ -181,6 +185,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> yhzgxRes=epmetAdminOpenFeignClient.getRelationshipOption(); + if(yhzgxRes.success()&&CollectionUtils.isNotEmpty(yhzgxRes.getData())){ + Map yhzgxMap = yhzgxRes.getData().stream().collect(Collectors.toMap(OptionResultDTO::getValue, OptionResultDTO::getLabel)); + if(MapUtils.isNotEmpty(yhzgxMap)&&yhzgxMap.containsKey(r.getYhzgx())){ + r.setYhzgxName(yhzgxMap.get(r.getYhzgx())); + } + } + // 重点人群:信访人员、社区矫正、精障患者、戒毒人员、安置帮教 + List specialCrowdName = new ArrayList<>(); + IcSpecialEntity icSpecialEntity = icSpecialDao.selectByResiId(resiUserId); + if (null != icSpecialEntity) { + for (LingShanSpecialCrowdTypeEnums e : LingShanSpecialCrowdTypeEnums.values()) { + if (icSpecialEntity.getSpecialRqlb().contains(e.getType())) { + specialCrowdName.add(e.getName()); + } + } + } + r.setSpecialCrowdName(specialCrowdName); + //重点帮扶人员类别 + List helpCrowdName = new ArrayList<>(); + List crowdTypeList = icSpecialDao.selectHelpCrowdType(resiUserId); + if (CollectionUtils.isNotEmpty(crowdTypeList)) { + for (LingShanHelpCrowdTypeEnum e : LingShanHelpCrowdTypeEnum.values()) { + if (crowdTypeList.contains(e.getType())) { + helpCrowdName.add(e.getName()); + } + } + } + r.setHelpCrowdName(helpCrowdName); + // end lingshan // 填充网格、小区名称 String errorMsg = "【居民信息简介】查询网格、小区信息失败"; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml index 5d66f2482f..9535299885 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml @@ -43,4 +43,14 @@ order by s.UPDATED_TIME desc + \ No newline at end of file