Browse Source

epmetuser/icresiuser/resi-brief/接口适配灵山。

master
yinzuomei 2 years ago
parent
commit
e47b9fee7d
  1. 31
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcResiUserBriefDTO.java
  2. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcSpecialDao.java
  3. 40
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  4. 10
      epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml

31
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<String> specialCrowdName;
/**
* 因灵山项目添加此列
* 重点人群:特困人员留守儿童空巢老人高龄老人独居老人低保大病残疾人
*/
private List<String> helpCrowdName;
}

9
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<IcSpecialEntity> {
public IcSpecialEntity selectByResiId(@Param("resiId") String resiId);
IcSpecialEntity selectByResiId(@Param("resiId") String resiId);
List<LingShanSpecialCrowdListResultDTO> listSpecialCrowd(@Param("orgIdPath") String orgIdPath,
@Param("orgId") String orgId,
@ -20,4 +20,11 @@ public interface IcSpecialDao extends BaseDao<IcSpecialEntity> {
@Param("name") String name,
@Param("mobile") String mobile,
@Param("idCard") String idCard);
/**
* 查询lingshan_help_crowd_resi_merge
* @param resiUserId
* @return 返回重点帮扶人员类别
*/
List<String> selectHelpCrowdType(String resiUserId);
}

40
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<IcResiUserDao, IcResi
@Autowired
private IcVaccineRelationDao icVaccineRelationDao;
@Autowired
private IcSpecialDao icSpecialDao;
/**
* 组织字段目前用于居民信息动态查询接口将此条件从conditions中移除单独生成固定的sql片段
@ -1665,6 +1671,40 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
r.setIcUserName(resiEntity.getName());
r.setRhzk(resiEntity.getRhzk());
r.setGzdw(resiEntity.getGzdw());
// 因灵山项目添加一下几列 start
r.setMz(resiEntity.getMz());
r.setYhzgx(resiEntity.getYhzgx());
r.setYhzgxName(StrConstant.EPMETY_STR);
Result<List<OptionResultDTO>> yhzgxRes=epmetAdminOpenFeignClient.getRelationshipOption();
if(yhzgxRes.success()&&CollectionUtils.isNotEmpty(yhzgxRes.getData())){
Map<String, String> 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<String> 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<String> helpCrowdName = new ArrayList<>();
List<String> 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 = "【居民信息简介】查询网格、小区信息失败";

10
epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml

@ -43,4 +43,14 @@
order by s.UPDATED_TIME desc
</select>
<select id="selectHelpCrowdType" parameterType="java.lang.String" resultType="java.lang.String">
SELECT
DISTINCT m.CROWD_TYPE
FROM
lingshan_help_crowd_resi_merge m
WHERE
m.DEL_FLAG = '0'
AND m.RESI_ID = #{resiUserId}
order by m.CREATED_TIME asc
</select>
</mapper>
Loading…
Cancel
Save