| | |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0 |
| | | LEFT JOIN jczz_user_house_label juhl ON juhl.household_id = jh.id |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | <where> |
| | | <if test="household.labelIdList !=null and household.labelIdList.size() >0 "> |
| | | and juhl.lable_type = 1 |
| | | AND juhl.household_id IS NOT NULL |
| | | AND jl.id in |
| | | <foreach collection="household.labelIdList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </if> |
| | | <if test="household.userId!=null"> |
| | | AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id = |
| | | #{household.userId} |
| | | ) |
| | | </if> |
| | | |
| | | |
| | | <if test="household.name!=null and household.name !=''"> |
| | | and jh.name like concat('%',#{household.name},'%') |
| | | </if> |