From 6caa0b07e6e79dd8f74c327ee49e2bc2d2d73075 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Mon, 12 Mar 2018 14:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BD=E4=BB=A4=E7=89=A9?= =?UTF-8?q?=E4=B8=9A=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/sell_price/zhuge0118A.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/PriceSystem/sell_price/zhuge0118A.py b/PriceSystem/sell_price/zhuge0118A.py index 28c7941..53ca8d8 100644 --- a/PriceSystem/sell_price/zhuge0118A.py +++ b/PriceSystem/sell_price/zhuge0118A.py @@ -1266,12 +1266,19 @@ def out_put_price(ct, rl, lk, weekend): c_date = datetime.datetime.utcnow() m_date = datetime.datetime.utcnow() + estate_type = lf['estate_type2'].iloc[0] + if estate_type is not None and "别墅" in estate_type: + estate_type = '别墅' + cmd_estate_type = '别墅' + else: + estate_type = '小区' + cmd_estate_type = "普通住宅" if type(mm[0]) != str: print(ct, rl, lk, mm, '$' * 20) # print(lf['estate_type2'].iloc[0],'*'*10) - estate_type = lf['estate_type2'].iloc[0] + # last_sunday=last_sunday() # t1=time.time() @@ -1294,6 +1301,7 @@ def out_put_price(ct, rl, lk, weekend): try: + stat.replace_one( {"city": ct, "region": rl, "district_name": p[0], "weekend": weekend}, @@ -1311,7 +1319,7 @@ def out_put_price(ct, rl, lk, weekend): {"city": ct, "region": rl, "name": p[0], "c_date": c_date, 'status': int(102), 'remark': 'week', 'category': 'sell', "calc_date": weekend, 'priority': int(0), - 'problem': None, "calc_type": int(0) + 'estate_type': cmd_estate_type, 'problem': None, "calc_type": int(0) }, True ) @@ -1336,6 +1344,6 @@ def out_put_price(ct, rl, lk, weekend): {"city": ct, "region": rl, "name": p[0], "c_date": c_date, 'status': int(3), 'remark': 'week', 'category': 'sell', "calc_date": weekend, 'priority': int(0), - 'problem': mm[0], "calc_type": int(0) + 'problem': mm[0], 'estate_type': cmd_estate_type, "calc_type": int(0) }, True )