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