diff --git a/PriceSystem/config/__init__.py b/PriceSystem/config/__init__.py index 737d33d..6ad0750 100644 --- a/PriceSystem/config/__init__.py +++ b/PriceSystem/config/__init__.py @@ -68,11 +68,11 @@ def get_rent_calc_cmd_queue_name(): ##########################################3 #the code below is about square meter rent price - +''' def get_65_host(): return 'seawater65.mongo.com' - +''' def get_sqm_rentprice_db(): return "sqmetre_rent" diff --git a/PriceSystem/fangjia/__init__.py b/PriceSystem/fangjia/__init__.py index 20e462f..aef2a2c 100644 --- a/PriceSystem/fangjia/__init__.py +++ b/PriceSystem/fangjia/__init__.py @@ -25,7 +25,7 @@ def get_logger(name): file_handler = logging.FileHandler("/home/goojia/logs/" + name + ".log") file_handler.setFormatter(formatter) logger.addHandler(file_handler) - logger.setLevel("INFO") + logger.setLevel("ERROR") return logger @@ -39,7 +39,7 @@ def get_performance_logger(name): file_handler = logging.FileHandler("/home/goojia/logs/" + name + ".performance.log") file_handler.setFormatter(formatter) logger.addHandler(file_handler) - logger.setLevel("INFO") + logger.setLevel("ERROR") return logger diff --git a/PriceSystem/fix/__pycache__/price_fix.cpython-36.pyc b/PriceSystem/fix/__pycache__/price_fix.cpython-36.pyc index 6b3d0f6..d611383 100644 Binary files a/PriceSystem/fix/__pycache__/price_fix.cpython-36.pyc and b/PriceSystem/fix/__pycache__/price_fix.cpython-36.pyc differ diff --git a/PriceSystem/fix/price_fix.py b/PriceSystem/fix/price_fix.py index 7bada9f..9a680bd 100644 --- a/PriceSystem/fix/price_fix.py +++ b/PriceSystem/fix/price_fix.py @@ -136,14 +136,14 @@ def compare(dd1,name,credit,calc_value): fo=line_regre(x1,y1,1) ratio=(calc_value-fo)/fo - #print('ratio=',ratio) + print('ratio=',ratio) - #print('calc_value=',calc_value) - #print('fo=',fo) + print('calc_value=',calc_value) + print('fo=',fo) - ##print('fo=',fo,name) + print('fo=',fo,name) #if credit>=0.75 and(ratio>0.95 and ratio<1.05): if abs(ratio)<=0.05: ##print('cccccc') @@ -151,22 +151,22 @@ def compare(dd1,name,credit,calc_value): #elif ratio>0.85 and ratio<1.05: - ###print('ratio',ratio) + print('ratio',ratio) ##print('ddddddddddddd') - #return calc_value,1 + return calc_value,1 else: ##print('eeeeeeeeeeeeee') - #print('y[-1]=',y[-1]) + print('y[-1]=',y[-1]) def ccp(nihe,znew,ratio): rr0=abs((nihe-znew)/min(nihe,znew)) - #print('nihe=',nihe) + print('nihe=',nihe) - #print('znew=',znew) + print('znew=',znew) - #print('rr0=',rr0) + print('rr0=',rr0) if rr0<=0.07: #print('kkkkkkkkk') if ratio>0.05: diff --git a/PriceSystem/rent_price/district_map0413.py b/PriceSystem/rent_price/district_map0413.py index ff6e7cd..5d1f9fc 100644 --- a/PriceSystem/rent_price/district_map0413.py +++ b/PriceSystem/rent_price/district_map0413.py @@ -898,7 +898,7 @@ def save_to_mongo(ct,rl,lk,timd,timm): print(ppu,mm) - if ppu==None or type(mm)==str: + if ppu==None or type(mm)==str or mm==None : return 0 else: return int(10000*(mm-ppu)/ppu) diff --git a/PriceSystem/rent_test.py b/PriceSystem/rent_test.py index 5e288f2..70d820f 100644 --- a/PriceSystem/rent_test.py +++ b/PriceSystem/rent_test.py @@ -16,9 +16,9 @@ def get_weekend(tt): weekend = get_weekend('20180415') -ct='北京' -rl='东城' -lk='朝阳门内南小街小区'#上海闵行闵浦新苑一村普陀曹杨一村上海北京东城左安漪园 +ct='上海' +rl='宝山' +lk='水上新村'#上海闵行闵浦新苑一村普陀曹杨一村上海北京东城左安漪园 #黄浦伯爵居静安泰安里长宁新泾北苑 timm=20180430 timd=20160603 diff --git a/PriceSystem/sell_price/zhuge0118A.py b/PriceSystem/sell_price/zhuge0118A.py index 75d9e82..433a25a 100644 --- a/PriceSystem/sell_price/zhuge0118A.py +++ b/PriceSystem/sell_price/zhuge0118A.py @@ -1073,7 +1073,7 @@ def commonprice(ct, rl, p): # ####print(time.time()-ttp,'m'*20) junjia = dsfjujia(ct, rl, lk) - #print('junjia=',junjia) + print('junjia=',junjia) print('neighb=',neighb) ''' @@ -1094,7 +1094,7 @@ def commonprice(ct, rl, p): data = consider_villa(ct, rl, p) #data.to_excel('data.xls') - + #print('data=',data) #data.to_excel('ddw.xls') ##print(time.time()-tt,'<>'*26) @@ -1102,6 +1102,7 @@ def commonprice(ct, rl, p): #print('rrrr') #print(data.shape[0]) data=add_weight(data) + #print('data=',data) if data.shape[0] > 3: paa = add_block(data) @@ -1266,7 +1267,7 @@ def commonprice(ct, rl, p): if type(neighb) is not str: #####print('周边价格=', neighb) - ddd11 = data[data['avg'] > 0.7 * neighb] + ddd11 = data[data['avg'] > 0.65 * neighb] return ddd11 else: sss=take_region_price(ct,rl) @@ -1278,7 +1279,7 @@ def commonprice(ct, rl, p): ddd11 = guolv_data11(data, neighb[0]) - #print('ddd11=',ddd11) + print('ddd11=',ddd11[['total_price','area','url']]) if ddd11.shape[0] > 2: diff --git a/PriceSystem/test.py b/PriceSystem/test.py index 876122a..5430f34 100644 --- a/PriceSystem/test.py +++ b/PriceSystem/test.py @@ -14,20 +14,20 @@ def get_weekend(tt): pacific = pytz.timezone('Asia/Shanghai') return pacific.localize(bb) -weekend = get_weekend('20180429') +weekend = get_weekend('20180510') s = time.time() ct='上海' -rl='闵行' -lk='上海康城'#杨浦凤城四村闵行上海康城厦门同安大唐世家二期青岛市北东方小区合肥庐阳海亮红玺台青岛市北东方小区 +rl='宝山' +lk='水上新村'#杨浦凤城四村闵行上海康城厦门同安大唐世家二期青岛市北东方小区合肥庐阳海亮红玺台青岛市北东方小区 -#深圳龙岗浪背村宝安吉祥公寓门头沟 泷悦长安北京上海闵行金盛小区江苏昆山象屿珑庭### +#深圳龙岗浪背村宝安吉祥公寓门头沟 泷悦长安北京上海闵行金盛小区江苏昆山象屿珑庭###浦东交通新村 -#for i in range(0, 100):深圳福田世纪豪庭北京海淀前沙涧襄阳樊城国色天襄上海闵行虹凯小区 -#北区济南章丘朝阳南区上海奉贤嘉安公寓 +#for i in range(0, 100):深圳福田世纪豪庭北京海淀前沙涧襄阳樊城国色天襄上海闵行虹凯小区徐汇前进大楼黄浦伊时代酒店式公寓 +#北区济南章丘朝阳南区上海奉贤嘉安公寓上海宝山水岸蓝桥上海宝山水上新村 sellPrice.out_put_price(ct, rl, lk, weekend) e = time.time()