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()