| | |
| | | jda.aoi_name, |
| | | br.village_name communityName, |
| | | jda.address_name as addressName |
| | | from jczz_task_report_for_repairs jtrfr |
| | | left join jczz_doorplate_address jda on jda.address_code = jtrfr.address_code |
| | | FROM jczz_task_report_for_repairs jtrfr |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code = jtrfr.address_code |
| | | LEFT JOIN jczz_house jh on jh.house_code=jtrfr.address_code |
| | | left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | LEFT JOIN jczz_place jp on jtrfr.address_code = jp.house_code and jp.is_deleted = 0 |
| | | where jtrfr.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on (jg.grid_code = jh.grid_code or jg.grid_code = jp.grid_code) and jg.is_deleted = 0 |
| | | LEFT JOIN blade_region br on br.code = jg.community_code |
| | | WHERE jtrfr.is_deleted = 0 |
| | | <if test="vo.createUser != null and vo.createUser != ''"> |
| | | AND jtrfr.create_user = #{vo.createUser} |
| | | </if> |
| | | |
| | | <if test="communityCode !=null and communityCode !=''"> |
| | | and jg.community_code = #{communityCode} |
| | | </if> |
| | | |
| | | <if test="vo.houseCode != null and vo.houseCode != ''"> |
| | |
| | | #{code} |
| | | </foreach> |
| | | ) |
| | | <if test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jg.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | and jg.grid_code in ('') |