From f502d7f05ed0d30fb6871771364066a0a5eabbfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Thu, 5 Jun 2025 17:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/company/company/fill_company_comm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dags/company/company/fill_company_comm.py b/dags/company/company/fill_company_comm.py index 73ba986..35e0bd0 100644 --- a/dags/company/company/fill_company_comm.py +++ b/dags/company/company/fill_company_comm.py @@ -14,8 +14,8 @@ def sync(province): company_ids = ids['_id'].to_list() else: company_ids = list() - shape_df = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select city_name, area_name, street_name, name, shape from community where province_name='{province}' ") - if len(shape_df) == 0: + shape_df = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select city_name, area_name, street_name, name, shape from community where province_name='{province}'") + if len(shape_df) == 0 or len(shape_df[shape_df['shape']]) == 0: log.info(f"{province}无围栏数据") return actions = list()