|
@@ -181,7 +181,6 @@ async def kgQuery(id: str):
|
|
|
sql = f'select id, xzqmc, xzqdm, dymc, yddm, ydxz, ydmj, rjlsx, rjlxx, jzmdsx, jzmdxx, jzgdsx, jzgdxx, ldlsx, ldlxx, pfwh, pfsj, st_area(shape::geography) as pfmarea,st_astext(shape) as geom, st_astext(st_centroid(shape)) as center_wkt from sde.kzxxxgh where id in ({id})'
|
|
|
res_tuples = await async_db.run(sql)
|
|
|
result, success = res_tuples
|
|
|
- print(success, result)
|
|
|
return json.loads(result)
|
|
|
|
|
|
|
|
@@ -190,16 +189,14 @@ async def klyzyQuery(id: str):
|
|
|
sql = f'select *, st_astext(shape) as geom, st_astext(st_centroid(shape)) as center_wkt from sde.ecgap_klyzy where id in ({id})'
|
|
|
res_tuples = await async_db.run(sql)
|
|
|
result, success = res_tuples
|
|
|
- print(success, result)
|
|
|
return json.loads(result)
|
|
|
|
|
|
|
|
|
-@app.get("/queryYjjbntGeometry")
|
|
|
-async def queryYjjbntGeometry(id: int):
|
|
|
- sql = f'select *,st_astext(shape) as geom from dlgis.gcs330000g2001_yjjbnt_gx_xsb where objectid = {id}'
|
|
|
+@app.get("/yjjbntQuery")
|
|
|
+async def yjjbntQuery(id: str):
|
|
|
+ sql = f'select *,st_astext(shape) as geom from dlgis.gcs330000g2001_yjjbnt_gx_xsb where objectid in ({id})'
|
|
|
res_tuples = await async_xzdb.run(sql)
|
|
|
result, success = res_tuples
|
|
|
- print(success, result)
|
|
|
return json.loads(result)
|
|
|
|
|
|
|