| | |
| | | jda.doorplate_type doorplateType, |
| | | jda.address_level addressLevel, |
| | | jda.nei_name neiName, |
| | | jda.nei_code neiCode, |
| | | jda.aoi_code aoiCode, |
| | | jh.relationship relationship |
| | | from jczz_household jh |
| | |
| | | </select> |
| | | |
| | | <!--导出数据--> |
| | | <select id="export" resultType="org.springblade.modules.house.excel.HouseHoldExcel"> |
| | | <select id="export" resultType="org.springblade.modules.house.excel.ImportHouseholdExcel"> |
| | | select |
| | | jh.house_code houseCode, |
| | | jh.name,jh.phone_number phoneNumber,jh.role_type roleType,jh.relationship relationship, |
| | |
| | | WHERE |
| | | jgm.user_id = #{userId} |
| | | AND jg.is_deleted = 0 |
| | | ) |
| | | </if> |
| | | |
| | | <if test="userId != null and roleType == '3'"> |
| | | AND jda.address_code IN (SELECT |
| | | jda.address_code |
| | | FROM |
| | | jczz_doorplate_address jda |
| | | LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code |
| | | WHERE |
| | | jc.res_police_user_id like concat('%',#{userId},'%')) |
| | | ) |
| | | </if> |
| | | GROUP BY age |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <!--查询住户对应的社区编号--> |
| | | <select id="getCommunityCode" resultType="java.lang.String"> |
| | | SELECT |
| | | jpag.community_code |
| | | FROM |
| | | jczz_household jh |
| | | LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0 |
| | | where jh.is_deleted = 0 |
| | | and jh.id = #{id} |
| | | </select> |
| | | |
| | | <!--查询所有住户总数--> |
| | | <select id="getAllListTotal" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count(*) |
| | | FROM |
| | | jczz_household jh |
| | | where jh.is_deleted = 0 |
| | | </select> |
| | | |
| | | <!--查询对应的住户集合--> |
| | | <select id="getAllList" resultType="org.springblade.modules.house.vo.HouseholdVO"> |
| | | SELECT |
| | | jh.*, |
| | | jpag.community_code |
| | | FROM |
| | | jczz_household jh |
| | | LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0 |
| | | where jh.is_deleted = 0 |
| | | limit #{i},#{size} |
| | | </select> |
| | | |
| | | </mapper> |