Ver Fonte

250916-1代码。

baoyubo há 1 dia atrás
pai
commit
f07b433ca6
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      routers/api/spatialAnalysis/point.py

+ 2 - 2
routers/api/spatialAnalysis/point.py

@@ -265,11 +265,11 @@ def get_points(db:Session,option,latitude_min,latitude_max,longitude_min,longitu
     if iszjcj=='zj':
         zd = ',T2.name as pacname,T2.pac,T2.parent_pac'
         pac = pac[:6]
-        zjcjtable = f"""select * from tp_geojson_data_zj where parent_pac={pac}"""
+        zjcjtable = f"""select * from tp_geojson_data_qx where pac like '{pac}%'"""
         que = f' JOIN ({zjcjtable}) T2 on ST_Intersects(T2.geometry, ST_SRID(POINT(A.longitude, A.latitude), 4326))'
     elif iszjcj=='cj':
         pac = pac[:9]
-        zjcjtable = f"""select * from tp_geojson_data_cj_sq where parent_pac={pac}"""
+        zjcjtable = f"""select * from tp_geojson_data_zj where pac like '{pac}%'"""
         que = f'LEFT JOIN ({zjcjtable}) T2 on ST_Intersects(T2.geometry, ST_SRID(POINT(A.longitude, A.latitude), 4326))'
     else:
         que=''