Browse Source

Merge remote-tracking branch 'origin/lingshan_master' into lingshan_master

master
luyan 2 years ago
parent
commit
584f34cf28
  1. 23
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/ScreenPartyCenterHouseDistributionFormDTO.java
  2. 18
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseDetailResultDTO.java
  3. 43
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/ScreenPartyCenterHouseDistributionResDTO.java
  4. 66
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/LingShanScreenGovOrgController.java
  5. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
  6. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  7. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java
  8. 23
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java
  9. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java
  10. 36
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  11. 18
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  12. 22
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  13. 31
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcResiUserBriefDTO.java
  14. 49
      epmet-user/epmet-user-client/src/main/java/com/epmet/enums/LingShanHelpCrowdTypeEnum.java
  15. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcSpecialDao.java
  16. 40
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  17. 10
      epmet-user/epmet-user-server/src/main/resources/mapper/IcSpecialDao.xml

23
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/ScreenPartyCenterHouseDistributionFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form.lingshan;
import com.epmet.commons.tools.validator.group.QueryGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Description 灵山大屏根据网格id查询党员中心户房屋坐标
* @Author yzm
* @Date 2023/5/18 10:14
*/
@Data
public class ScreenPartyCenterHouseDistributionFormDTO {
/**
* 网格必填
*/
@NotBlank(message = "gridId不能为空",groups = QueryGroup.class)
private String gridId;
private String neighborHoodId;
private String buildingId;
}

18
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseDetailResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.result.lingshan;
import com.epmet.dto.IcHouseDTO;
import lombok.Data;
/**
* @Description
* @Author yzm
* @Date 2023/5/18 14:05
*/
@Data
public class HouseDetailResultDTO extends IcHouseDTO {
/**
* 如果是党员中心户关联的联户数
*/
private Integer totalLianHu;
}

43
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/ScreenPartyCenterHouseDistributionResDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.result.lingshan;
import lombok.Data;
/**
* @Description
* @Author yzm
* @Date 2023/5/18 10:56
*/
@Data
public class ScreenPartyCenterHouseDistributionResDTO {
/**
* 小区id
*/
private String neighborHoodId;
private String neighborHoodName;
/**
* 所属楼栋id
*/
private String buildingId;
private String buildingName;
/**
* 所属单元id
*/
private String buildingUnitId;
private String unitName;
/**
* 房屋名字后台插入时生成
*/
private String houseName;
/**
* 房屋坐标
*/
private String longitude;
private String latitude;
/**
* 灵山项目是否党员中心户1是0不是
*/
private String partyCenterHouseFlag;
}

66
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/LingShanScreenGovOrgController.java

@ -0,0 +1,66 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcBuildingDTO;
import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.form.lingshan.ScreenPartyCenterHouseDistributionFormDTO;
import com.epmet.dto.result.lingshan.HouseDetailResultDTO;
import com.epmet.service.IcBuildingService;
import com.epmet.service.IcHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Description 灵山大屏-查询gov-org库的接口 可以放在这....
* @Author yzm
* @Date 2023/5/18 10:05
*/
@RestController
@RequestMapping("houseScreen")
public class LingShanScreenGovOrgController {
@Autowired
private IcHouseService icHouseService;
@Autowired
private IcBuildingService icBuildingService;
/**
* 灵山大屏查询楼栋坐标
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("building-distribution")
public Result<List<IcBuildingDTO>> buildingDistribution(@LoginUser TokenDto tokenDto, @RequestBody ScreenPartyCenterHouseDistributionFormDTO formDTO) {
return new Result<List<IcBuildingDTO>>().ok(icBuildingService.buildingDistribution(tokenDto.getCustomerId(), formDTO.getGridId(), formDTO.getNeighborHoodId()));
}
/**
* 灵山大屏查询房屋坐标点位
* 支持根据网格\小区\楼栋id查询
*/
@PostMapping("house-distribution")
public Result<List<IcHouseDTO>> houseDistribution(@LoginUser TokenDto tokenDto, @RequestBody ScreenPartyCenterHouseDistributionFormDTO formDTO) {
return new Result<List<IcHouseDTO>>().ok(icHouseService.houseDistribution(tokenDto.getCustomerId(), formDTO.getGridId(), formDTO.getNeighborHoodId(), formDTO.getBuildingId()));
}
/**
* 灵山大屏点击房屋显示房屋详情
* @param houseId
* @return
*/
@PostMapping("houseDetail/{houseId}")
public Result<HouseDetailResultDTO> queryHouseDetail(@PathVariable("houseId")String houseId){
return new Result<HouseDetailResultDTO>().ok(icHouseService.queryHouseDetail(houseId));
}
}

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java

@ -276,5 +276,16 @@ public interface IcBuildingDao extends BaseDao<IcBuildingEntity> {
* @return
*/
List<HouseTreeDTO> selectHouseTree(@Param("unitId") String unitId);
/**
* 查询楼栋列表后续可以追加条件
* @param customerId 必填
* @param gridId
* @param neighborHoodId
* @return
*/
List<IcBuildingEntity> selectListByMap(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("neighborHoodId") String neighborHoodId);
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java

@ -231,4 +231,17 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
@Param("buildingName") String buildingName,
@Param("buildingId") String buildingId,
@Param("partyCenterHouseFlag") String partyCenterHouseFlag);
/**
* 查询房屋列表后续可以追加条件
* @param customerId 必填
* @param gridId
* @param neighborHoodId
* @param buildingId
* @return
*/
List<IcHouseEntity> selectListByMap(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("neighborHoodId") String neighborHoodId,
@Param("buildingId") String buildingId);
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java

@ -133,4 +133,14 @@ public interface IcBuildingService extends BaseService<IcBuildingEntity> {
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingDTO>
*/
Result<IcBulidingDetailDTO> getBuildingDetail(String buildingId);
/**
* 灵山大屏查询楼栋坐标
*
* @param customerId
* @param gridId
* @param neighborHoodId
* @return
*/
List<IcBuildingDTO> buildingDistribution(String customerId, String gridId, String neighborHoodId);
}

23
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java

@ -14,10 +14,7 @@ import com.epmet.dto.result.HouseAgencyInfoResultDTO;
import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.HouseListResultDTO;
import com.epmet.dto.result.HousesNameResultDTO;
import com.epmet.dto.result.lingshan.HouseTreeDTO;
import com.epmet.dto.result.lingshan.LingshanPartyCenterHouseLianhuDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO;
import com.epmet.dto.result.lingshan.*;
import com.epmet.entity.IcHouseEntity;
import java.util.List;
@ -183,4 +180,22 @@ public interface IcHouseService extends BaseService<IcHouseEntity> {
* @param partyCenterHouseFlag
*/
void updatePartyCenterHouse(String houseId, String partyCenterHouseFlag);
/**
* 灵山大屏查询房屋坐标点位
*
* @param gridId
* @param neighborHoodId
* @param buildingId
* @return
*/
List<IcHouseDTO> houseDistribution(String customerId, String gridId, String neighborHoodId, String buildingId);
/**
* 灵山大屏点击房屋显示房屋详情
* @param houseId
* @return
*/
HouseDetailResultDTO queryHouseDetail(String houseId);
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java

@ -173,4 +173,17 @@ public class IcBuildingServiceImpl extends BaseServiceImpl<IcBuildingDao, IcBuil
return new Result<IcBulidingDetailDTO>().ok(baseDao.getBuildingDetail(buildingId));
}
/**
* 灵山大屏查询楼栋坐标
*
* @param customerId
* @param gridId
* @param neighborHoodId
* @return
*/
@Override
public List<IcBuildingDTO> buildingDistribution(String customerId, String gridId, String neighborHoodId) {
List<IcBuildingEntity> list=baseDao.selectListByMap(customerId,gridId,neighborHoodId);
return ConvertUtils.sourceToTarget(list,IcBuildingDTO.class);
}
}

36
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -26,10 +26,7 @@ import com.epmet.dto.form.CheckHouseInfoFormDTO;
import com.epmet.dto.form.HouseFormDTO;
import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.lingshan.HouseTreeDTO;
import com.epmet.dto.result.lingshan.LingshanPartyCenterHouseLianhuDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO;
import com.epmet.dto.result.lingshan.*;
import com.epmet.entity.*;
import com.epmet.enums.HousePurposeEnums;
import com.epmet.enums.HouseRentFlagEnums;
@ -563,5 +560,36 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
baseDao.update(null, update);
}
/**
* 灵山大屏查询房屋坐标点位
*
* @param gridId
* @param neighborHoodId
* @param buildingId
* @return
*/
@Override
public List<IcHouseDTO> houseDistribution(String customerId,String gridId, String neighborHoodId, String buildingId) {
List<IcHouseEntity> list=baseDao.selectListByMap(customerId,gridId,neighborHoodId,buildingId);
return ConvertUtils.sourceToTarget(list,IcHouseDTO.class);
}
/**
* 灵山大屏点击房屋显示房屋详情
* @param houseId
* @return
*/
@Override
public HouseDetailResultDTO queryHouseDetail(String houseId) {
IcHouseDTO data = get(houseId);
HouseDetailResultDTO resultDTO = ConvertUtils.sourceToTarget(data, HouseDetailResultDTO.class);
if (null != resultDTO) {
LambdaQueryWrapper<LingshanPartyCenterHouseLianhuEntity> countQuery = new LambdaQueryWrapper<>();
countQuery.eq(LingshanPartyCenterHouseLianhuEntity::getPartyCenterHouseId, houseId);
resultDTO.setTotalLianHu(partyCenterHouseLianhuDao.selectCount(countQuery));
}
return resultDTO;
}
}

18
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -602,4 +602,22 @@
and ih.BUILDING_UNIT_ID=#{unitId}
order by ih.DOOR_NAME asc
</select>
<!-- 楼栋列表 -->
<select id="selectListByMap" parameterType="map" resultType="com.epmet.entity.IcBuildingEntity">
SELECT
ib.*
FROM
ic_building ib
LEFT JOIN ic_neighbor_hood h ON ( ib.NEIGHBOR_HOOD_ID = h.ID )
WHERE
ib.DEL_FLAG = '0'
AND ib.CUSTOMER_ID = #{customerId}
<if test="gridId != null and gridId != ''">
AND h.GRID_ID = #{gridId}
</if>
<if test="neighborHoodId != null and neighborHoodId != ''">
AND ib.NEIGHBOR_HOOD_ID = #{neighborHoodId}
</if>
</select>
</mapper>

22
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -770,4 +770,26 @@
</if>
order by ca.CREATED_TIME asc,cg.CREATED_TIME asc,h.CREATED_TIME asc
</select>
<!-- 房屋列表 -->
<select id="selectListByMap" parameterType="map" resultType="com.epmet.entity.IcHouseEntity">
SELECT
ih.*
FROM
ic_house ih
LEFT JOIN ic_neighbor_hood h
ON ( ih.NEIGHBOR_HOOD_ID = h.ID )
WHERE
ih.DEL_FLAG = '0'
AND ih.CUSTOMER_ID = #{customerId}
<if test="gridId != null and gridId != ''">
AND h.GRID_ID = #{gridId}
</if>
<if test="neighborHoodId != null and neighborHoodId != ''">
AND ih.NEIGHBOR_HOOD_ID = {neighborHoodId}
</if>
<if test="buildingId != null and buildingId != ''">
AND ih.BUILDING_ID = #{buildingId}
</if>
</select>
</mapper>

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;
}

49
epmet-user/epmet-user-client/src/main/java/com/epmet/enums/LingShanHelpCrowdTypeEnum.java

@ -0,0 +1,49 @@
package com.epmet.enums;
public enum LingShanHelpCrowdTypeEnum {
// 人员类别。【canji残疾人,dabing大病,dibao低保,gaoling高龄老人,kongchao空巢老人,duju独居老人,liushou留守儿童, tekun特困人员】
CANJI("canji", "残疾", 1),
DABING("dabing", "大病", 2),
DIBAO("dibao", "低保", 3),
GAOLING("gaoling", "高龄老人", 4),
KONGCHAO("kongchao", "空巢老人", 5),
DUJU("duju", "独居老人", 6),
LIUSHOU("liushou", "留守儿童", 7),
TEKUN("tekun", "特困人员", 8);
/**
* 类型anzhibangjiao,
*/
public final String type;
public final String name;
private Integer headerRowNumber;
LingShanHelpCrowdTypeEnum(String type, String name, Integer headerRowNumber) {
this.type = type;
this.name = name;
this.headerRowNumber = headerRowNumber;
}
public String getType() {
return type;
}
public String getName() {
return name;
}
public Integer getHeaderRowNumber() {
return headerRowNumber;
}
public static LingShanHelpCrowdTypeEnum getByType(String type) {
for (LingShanHelpCrowdTypeEnum e : LingShanHelpCrowdTypeEnum.values()) {
if (e.getType().equals(type)) {
return e;
}
}
return null;
}
}

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