|
|
@ -455,19 +455,28 @@ |
|
|
|
</select> |
|
|
|
<select id="selectPeopleByCurrentAddress" |
|
|
|
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO"> |
|
|
|
select |
|
|
|
t.ID as populationId, |
|
|
|
2 as identityFlag, |
|
|
|
t.RESIDENTS_NAME as residentName, |
|
|
|
t.CURRENT_ADDRESS as currentAddress |
|
|
|
from epdc_population_information t |
|
|
|
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|
|
|
where t.DEL_FLAG = '0' |
|
|
|
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '0' |
|
|
|
<if test="currentAddress!=null and currentAddress!=''"> |
|
|
|
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%') |
|
|
|
</if> |
|
|
|
LIMIT #{pageIndex},#{pageSize} |
|
|
|
select t.ID as populationId, |
|
|
|
2 as identityFlag, |
|
|
|
t.RESIDENTS_NAME as residentName, |
|
|
|
t.CURRENT_ADDRESS as currentAddress, |
|
|
|
hh.RESIDENTS_NAME as houseHeadName, |
|
|
|
hh.RESIDENTS_PHONE as houseHeadPhone, |
|
|
|
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress |
|
|
|
from epdc_population_information t |
|
|
|
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|
|
|
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID |
|
|
|
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID |
|
|
|
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID |
|
|
|
where t.DEL_FLAG = '0' |
|
|
|
and ehr.DEL_FLAG = '0' |
|
|
|
and ehr.IS_HOUSE_HEAD = '0' |
|
|
|
and hh.DEL_FLAG = '0' |
|
|
|
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0' |
|
|
|
<if test="currentAddress!=null and currentAddress!=''"> |
|
|
|
and t.CURRENT_ADDRESS like concat('%', #{currentAddress}, '%') |
|
|
|
</if> |
|
|
|
group by t.ID |
|
|
|
LIMIT #{pageIndex},#{pageSize} |
|
|
|
</select> |
|
|
|
<select id="selectCountPeopleByCurrentAddress" resultType="java.lang.Integer"> |
|
|
|
select |
|
|
@ -480,6 +489,30 @@ |
|
|
|
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%') |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
<select id="selectPeopleByCurrentAddressExportList" |
|
|
|
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO"> |
|
|
|
select t.ID as populationId, |
|
|
|
2 as identityFlag, |
|
|
|
t.RESIDENTS_NAME as residentName, |
|
|
|
t.CURRENT_ADDRESS as currentAddress, |
|
|
|
hh.RESIDENTS_NAME as houseHeadName, |
|
|
|
hh.RESIDENTS_PHONE as houseHeadPhone, |
|
|
|
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress |
|
|
|
from epdc_population_information t |
|
|
|
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|
|
|
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID |
|
|
|
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID |
|
|
|
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID |
|
|
|
where t.DEL_FLAG = '0' |
|
|
|
and ehr.DEL_FLAG = '0' |
|
|
|
and ehr.IS_HOUSE_HEAD = '0' |
|
|
|
and hh.DEL_FLAG = '0' |
|
|
|
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0' |
|
|
|
<if test="houseAddress!=null and houseAddress!=''"> |
|
|
|
and t.CURRENT_ADDRESS like concat('%', #{houseAddress}, '%') |
|
|
|
</if> |
|
|
|
group by t.ID |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
</mapper> |