From 351bad8b57a8c99c51801fd171cbdcff7ed892ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Mon, 9 Jun 2025 14:36:20 +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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dags/company/company/fill_company_comm.py b/dags/company/company/fill_company_comm.py index 2a13f79..8d65df0 100644 --- a/dags/company/company/fill_company_comm.py +++ b/dags/company/company/fill_company_comm.py @@ -14,7 +14,7 @@ def sync(province): index="didata_company", body={"index": {"refresh_interval": "-1"}} ) - ids = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select company_name from didata_company where province='{province}'") + ids = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select company_name, committee from didata_company where province='{province}'") if len(ids) > 0: company_ids = ids['_id'].to_list() else: @@ -92,6 +92,9 @@ def sync(province): body={"index": {"refresh_interval": "5s"}} ) - +flag = False for province in areautils.get_all_province(): - sync(province) \ No newline at end of file + if '西藏自治区' == province: + flag = True + if flag: + sync(province) \ No newline at end of file