| | |
| | | basic.cityName city_nm, |
| | | LISTAGG(basic.type, ',') WITHIN GROUP (ORDER BY basic.type ASC) typeList |
| | | from ( |
| | | SELECT |
| | | select |
| | | |
| | | distinct |
| | | arb."guid", arb."name", |
| | | stra.type, |
| | |
| | | when town."ad_grad" = 2 THEN town."ad_name" |
| | | when county."ad_grad" = 2 THEN county."ad_name" |
| | | ELSE city."ad_name" END AS cityName |
| | | FROM SJZT_MD."att_res_base" arb |
| | | |
| | | from ( |
| | | select arb.* from ( |
| | | select distinct "res_cd" from sjzt_md."att_cd_base" where "cd_type" = 'sy' and "res_cd" is not null |
| | | ) a |
| | | left join SJZT_MD."att_res_base" arb on (a."res_cd" = arb."guid") |
| | | ) arb |
| | | LEFT JOIN SJZT_MD."att_ad_base" town ON town."ad_code" = arb."interior_ad_guid" |
| | | LEFT JOIN SJZT_MD."att_ad_base" county ON county."ad_code" = town."p_ad_code" |
| | | LEFT JOIN SJZT_MD."att_ad_base" city ON city."ad_code" = county."p_ad_code" |
| | |
| | | basic.townCode, basic.townName, |
| | | basic.countyCode, basic.countyName, |
| | | basic.cityCode, basic.cityName) info |
| | | where info.typeList != '2,3,8,11,12' or info.typeList is null |
| | | where info.typeList != '2,3,8,11,12' or info.typeList is null order by info.res_cd |
| | | </select> |
| | | <select id="getWyLackAlertList" resultMap="vo"> |
| | | select |