maju dan mandiri
This commit is contained in:
parent
aa83cb75f8
commit
99eacf43e1
Binary file not shown.
@ -113,14 +113,16 @@ def fetch_geojson(conn, level, parent_code=None):
|
|||||||
cur.execute(""" SELECT wk.id, wk.kode, wk.nama,lat,wk.lng,wk.path, pik.persen_per_status as idx
|
cur.execute(""" SELECT wk.id, wk.kode, wk.nama,lat,wk.lng,wk.path, pik.persen_per_status as idx
|
||||||
FROM wil_kabupatenkota wk
|
FROM wil_kabupatenkota wk
|
||||||
JOIN vw_persentase_indeks_kabkota pik on pik.kode = wk.kode
|
JOIN vw_persentase_indeks_kabkota pik on pik.kode = wk.kode
|
||||||
WHERE provinsi_id = %s
|
WHERE lower(pip.status) in ('maju','mandiri')
|
||||||
|
AND provinsi_id = %s
|
||||||
""", (parent_code,))
|
""", (parent_code,))
|
||||||
elif level == 'kecamatan':
|
elif level == 'kecamatan':
|
||||||
cur.execute("""
|
cur.execute("""
|
||||||
SELECT wkc.id, wkc.kode, wkc.nama,wkc.lat,wkc.lng,wkc.path , pic.persen as idx
|
SELECT wkc.id, wkc.kode, wkc.nama,wkc.lat,wkc.lng,wkc.path , pic.persen as idx
|
||||||
FROM wil_kecamatan wkc
|
FROM wil_kecamatan wkc
|
||||||
JOIN vw_persentase_indeks_kecamatan as pic on pic.id = wkc.id
|
JOIN vw_persentase_indeks_kecamatan as pic on pic.id = wkc.id
|
||||||
WHERE kabupatenkota_id = %s""", (parent_code,))
|
WHERE lower(pip.status) in ('maju','mandiri')
|
||||||
|
AND kabupatenkota_id = %s""", (parent_code,))
|
||||||
elif level == 'desa':
|
elif level == 'desa':
|
||||||
cur.execute("""
|
cur.execute("""
|
||||||
SELECT wd.id, wd.kode, wd.nama, wd.lat, wd.lng,wd.path,
|
SELECT wd.id, wd.kode, wd.nama, wd.lat, wd.lng,wd.path,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user