| | |
| | | cmp.id, |
| | | cmp.`name`, |
| | | cmp.card_no as idCard, |
| | | cmp.label, |
| | | cmpct.label, |
| | | cmp.sex, |
| | | cmp.phone, |
| | | cmp.address, |
| | | cmp.political_outlook |
| | | FROM |
| | | com_mng_population AS cmp |
| | | left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id |
| | | <where> |
| | | and cmp.label IS NOT NULL |
| | | and cmpct.label IS NOT NULL |
| | | <if test='specialPopulationDTO.communityId != null'> |
| | | and cmp.act_id = #{specialPopulationDTO.communityId} |
| | | and cmpct.community_id = #{specialPopulationDTO.communityId} |
| | | </if> |
| | | <if test="specialPopulationDTO.keyWord!=null and specialPopulationDTO.keyWord!= """> |
| | | AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%')) |
| | |
| | | </select> |
| | | |
| | | <select id="getPopulationByLabelCount" resultType="Integer"> |
| | | select count(id) from com_mng_population where label is not null and village_id = #{villageId} and floor = #{floor} |
| | | select count(cmpct.id) from com_mng_population_community_tags AS cmpct |
| | | left join com_mng_population AS cmp on cmp.id = cmpct.population_id |
| | | where cmtct.label is not null and cmp.village_id = #{villageId} and floor = #{floor} |
| | | </select> |
| | | |
| | | </mapper> |