From 713e358000d5d9fcd8f997d5aa710c713896463f Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Mon, 20 Mar 2023 17:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=AB=E5=A2=85=E7=89=A9?= =?UTF-8?q?=E4=B8=9A=E8=B4=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/business/community/estate_charge_complete.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dags/business/business/community/estate_charge_complete.py b/dags/business/business/community/estate_charge_complete.py index b07fb58..c836c45 100644 --- a/dags/business/business/community/estate_charge_complete.py +++ b/dags/business/business/community/estate_charge_complete.py @@ -196,7 +196,7 @@ def deal_adjust(community): def adjust_estate_charge(city_now): log.info(f"{city_now}开始调整物业费....") - sql = f"select id, city, region, name, estate_charge, finish_building_date, location from community_summary where city='{city_now}' and estate_charge_flag != 1" + sql = f"select id, city, region, name, estate_charge, finish_building_date, location from community_summary where city='{city_now}' and estate_charge_flag != 1 and estate_type != '别墅' " community_summary_df = es206_client.scan_by_sql_to_data_frame(sql) community_summary_list = list() community_summary_df.apply(lambda x: community_summary_list.append(dict(x)), axis=1) @@ -273,7 +273,9 @@ def deal_fill(community): max_now = estate_charge_city_region_dict[city_short + region_short]['max'] elif city_short in estate_charge_city_region_dict: max_now = estate_charge_city_region_dict[city_short]['max'] - + if community['estate_type'] == '别墅': + # 别墅不限制物业费最大值 + max_now = 99 estate_charge = find_estate_charge(community, max_now) if pd.notna(estate_charge): mutex.acquire(timeout=60) @@ -282,7 +284,7 @@ def deal_fill(community): def fill_estate_charge(city_now): log.info(f"{city_now}开始补充物业费....") - sql = "select id, city, region, name, estate_charge, estate_charge_fix, finish_building_date, location from community_summary where city='" + city_now + "' and (estate_charge is null or estate_charge_flag=1)" + sql = "select id, city, region, name, estate_charge, estate_charge_fix, finish_building_date, estate_type, location from community_summary where city='" + city_now + "' and (estate_charge is null or estate_charge_flag=1)" community_summary_df = es206_client.scan_by_sql_to_data_frame(sql) community_summary_list = list()