Browse Source

居民大屏接口 - 去掉居住人

feature/syp_points
songyunpeng 5 years ago
parent
commit
21594ccec1
  1. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenSelectPeopleDetailFormDTO.java
  2. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenSelectPeopleResultDTO.java
  3. 21
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  4. 42
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

4
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenSelectPeopleDetailFormDTO.java

@ -16,10 +16,6 @@ public class EpdcScreenSelectPeopleDetailFormDTO {
* 人口ID
*/
private String populationId;
/**
* 房屋ID
*/
private String houseId;
/**
* 身份标识
*/

4
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenSelectPeopleResultDTO.java

@ -25,10 +25,6 @@ public class EpdcScreenSelectPeopleResultDTO {
* 身份标识
*/
private String identityFlag;
/**
* 房屋ID
*/
private String houseId;
/**
* 居民ID
*/

21
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java

@ -322,26 +322,7 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto) {
EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO = new EpdcScreenSelectPeopleDetailResultDTO();
//根据身份标识寻找对应人员信息
if(PopulationIdentify.PROPERTY_OWNER.equals(dto.getIdentifyFlag())){
if(StringUtils.isBlank(dto.getHouseId())){
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询产权人信息失败:房屋ID为空");
}
//如果是产权人,人口信息从房屋信息表拿
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(dto.getHouseId());
epdcScreenSelectPeopleDetailResultDTO.setName(housingInformationEntity.getPropertyOwner());
epdcScreenSelectPeopleDetailResultDTO.setSex("");
epdcScreenSelectPeopleDetailResultDTO.setAge("");
epdcScreenSelectPeopleDetailResultDTO.setPhone(housingInformationEntity.getPropertyOwnerMobile());
//房屋信息
List<HousingInfo> housingInfoList = new ArrayList<>();
HousingInfo housingInfo = new HousingInfo();
housingInfo.setHouseAddress(housingInformationEntity.getHouseAddress());
housingInfo.setHouseArea(housingInformationEntity.getHouseArea());
setHouseUse(housingInformationEntity.getHouseUse(),housingInfo);
housingInfoList.add(housingInfo);
epdcScreenSelectPeopleDetailResultDTO.setHousingInfo(housingInfoList);
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO);
} else if(PopulationIdentify.HOUSE_HEAD.equals(dto.getIdentifyFlag())) {
if(PopulationIdentify.HOUSE_HEAD.equals(dto.getIdentifyFlag())) {
if(StringUtils.isBlank(dto.getPopulationId())){
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询产权人信息失败:人口ID为空");
}

42
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

@ -177,31 +177,7 @@
</select>
<select id="selectListPeople"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO">
select data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME from (
select
t.PROPERTY_OWNER as name,
substring_index(t.ALL_DEPT_NAMES,'-',-1) as gridName,
0 as identityFlag,
'产权人' as identity,
t.ID as houseId,
'' as populationId,
t.CREATED_TIME
from
epdc_housing_information t
where t.DEL_FLAG ='0'
<if test="name != null and name != ''">
and t.PROPERTY_OWNER like concat('%', #{name}, '%')
</if>
<if test="phone != null and phone != ''">
and t.PROPERTY_OWNER_MOBILE like concat('%', #{phone}, '%')
</if>
<if test="communityId != null and communityId != ''">
and find_in_set(#{communityId},t.ALL_DEPT_IDS)
</if>
<if test="gridId != null and gridId != ''">
and find_in_set(#{gridId},t.ALL_DEPT_IDS)
</if>
union all
select data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME,data.identity as identityName from (
select
t.RESIDENTS_NAME as name,
group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName,
@ -280,16 +256,16 @@
<select id="selectListGridRanking"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO">
<if test="rankCategory!=null and rankCategory == 0">
select houseHead.houseHeadNum+resident.residentNum as total,houseHead.gridName from(
select ifnull(houseHead.houseHeadNum,0)+IFNULL(resident.residentNum,0) as total,houseHead.gridName from(
select count(1) as houseHeadNum,GRID_ID,gridName from(
select t2.GRID_ID,substring_index(t2.ALL_DEPT_NAMES,'-',-1) as gridName
from epdc_population_information t
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID
where t.DEL_FLAG = '0'
and t1.DEL_FLAG = '0' and t2.DEL_FLAG='0'
and t1.IS_HOUSE_HEAD ='1'
group by t2.GRID_ID,t.ID)end
from epdc_population_information t
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID
where t.DEL_FLAG = '0'
and t1.DEL_FLAG = '0' and t2.DEL_FLAG='0'
and t1.IS_HOUSE_HEAD ='1'
group by t2.GRID_ID,t.ID)end
group by end.GRID_ID)houseHead
left join
(select count(1) as residentNum,GRID_ID,gridName from(

Loading…
Cancel
Save