物业费添加分数

This commit is contained in:
shenjian@fangjia.com
2023-03-29 13:22:09 +08:00
parent e0e18e5d36
commit d43a950e83
@@ -248,11 +248,11 @@ def find_estate_charge(community, max_now):
"""
estate_charge = None
if pd.isna(community['location']) or pd.isna(community['location']['lon']):
return estate_charge
return estate_charge, 5
location = [community['location']['lon'], community['location']['lat']]
docs = find_nearest_by_location(community['city'], location)
if len(docs) <= 0 or 'estate_charge' not in docs.columns:
return estate_charge
return estate_charge, 5
if 'estate_charge_fix' not in docs.columns:
docs['estate_charge_fix'] = None
# 用修正后的物业费补充
@@ -297,7 +297,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, estate_type, 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()