| | |
| | | |
| | | </update> |
| | | |
| | | <!--根据水库名称、所在区域查询改水库的数量--> |
| | | <select id="getWaterCountByResNameAndCountyName" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count(1) |
| | | FROM sjzt_md."att_res_base" a |
| | | LEFT JOIN sjzt_md."att_ad_base" b ON a."interior_ad_guid" = b."guid" |
| | | LEFT JOIN sjzt_md."att_ad_base" c ON b."p_ad_code" = c."guid" |
| | | LEFT JOIN sjzt_md."att_ad_base" d ON c."p_ad_code" = d."guid" |
| | | where a."name" = #{resName} |
| | | and ( |
| | | (b."ad_grad" = 3 and b."ad_code" = #{countyCode}) |
| | | or |
| | | (c."ad_grad" = 3 and c."ad_code" = #{countyCode}) |
| | | ) |
| | | </select> |
| | | |
| | | |
| | | </mapper> |