update
This commit is contained in:
+3
-2
@@ -140,6 +140,7 @@ class DistrictSellStatBatch extends BaseBatch {
|
|||||||
try {
|
try {
|
||||||
totalCount.addAndGet(1)
|
totalCount.addAndGet(1)
|
||||||
def key = dist.region +"##" + dist.name
|
def key = dist.region +"##" + dist.name
|
||||||
|
|
||||||
def weekendPriceObj = weekendPriceMap.get(key)
|
def weekendPriceObj = weekendPriceMap.get(key)
|
||||||
if(weekendPriceObj){
|
if(weekendPriceObj){
|
||||||
def curPriceObj = curMonthlyPriceMap.get(key)
|
def curPriceObj = curMonthlyPriceMap.get(key)
|
||||||
@@ -155,7 +156,7 @@ class DistrictSellStatBatch extends BaseBatch {
|
|||||||
if(curPriceObj){
|
if(curPriceObj){
|
||||||
curPrice = curPriceObj.avg_price
|
curPrice = curPriceObj.avg_price
|
||||||
}else{
|
}else{
|
||||||
curPrice = weekendPriceObj.avg_price
|
curPrice = weekendPriceObj.avg_price
|
||||||
}
|
}
|
||||||
|
|
||||||
if(weekendPriceObj.value_type!=1){
|
if(weekendPriceObj.value_type!=1){
|
||||||
@@ -197,7 +198,7 @@ class DistrictSellStatBatch extends BaseBatch {
|
|||||||
data.put("commid", dist._id.toString())
|
data.put("commid", dist._id.toString())
|
||||||
data.put("mom", mom)
|
data.put("mom", mom)
|
||||||
data.put("yoy", yoy)
|
data.put("yoy", yoy)
|
||||||
data.put("avg_price", curPrice)
|
data.put("avg_price", weekendPriceObj.avg_price)
|
||||||
DISTRICT_SELL_STAT.update(new BasicDBObject("_id", curPriceObj._id) , new BasicDBObject('$set', data),true,false)
|
DISTRICT_SELL_STAT.update(new BasicDBObject("_id", curPriceObj._id) , new BasicDBObject('$set', data),true,false)
|
||||||
println "[update]"+totalCount.get()+" "+ dist.city+" "+dist.name
|
println "[update]"+totalCount.get()+" "+ dist.city+" "+dist.name
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -76,7 +76,7 @@ class ThirdPriceExportBatch extends BaseBatch{
|
|||||||
row << dist.name
|
row << dist.name
|
||||||
row << o.s_date
|
row << o.s_date
|
||||||
|
|
||||||
def zgf_price = getLastThirdPrice(o.zhugezhaofang_esf_price, curPrice)
|
def zgf_price = getLastThirdPrice(o.xingfuli_esf_price, curPrice)
|
||||||
row << zgf_price
|
row << zgf_price
|
||||||
if(zgf_price){
|
if(zgf_price){
|
||||||
add = true;
|
add = true;
|
||||||
@@ -217,8 +217,8 @@ class ThirdPriceExportBatch extends BaseBatch{
|
|||||||
if(!retMap.s_date){
|
if(!retMap.s_date){
|
||||||
retMap.s_date = curDate
|
retMap.s_date = curDate
|
||||||
}
|
}
|
||||||
if(!retMap.zhugezhaofang_esf_price && d.zhugezhaofang_esf_price){
|
if(!retMap.xingfuli_esf_price && d.xingfuli_esf_price){
|
||||||
retMap.zhugezhaofang_esf_price = d.zhugezhaofang_esf_price
|
retMap.xingfuli_esf_price = d.xingfuli_esf_price
|
||||||
}
|
}
|
||||||
if(!retMap.anjuke_esf_price && d.get("anjuke_esf_price")){
|
if(!retMap.anjuke_esf_price && d.get("anjuke_esf_price")){
|
||||||
retMap.anjuke_esf_price = d.get("anjuke_esf_price")
|
retMap.anjuke_esf_price = d.get("anjuke_esf_price")
|
||||||
|
|||||||
+2
-2
@@ -64,7 +64,7 @@ class DataStandardBatch extends BaseBatch{
|
|||||||
def static final SHORT_DATE = Utils.getLastMonth()
|
def static final SHORT_DATE = Utils.getLastMonth()
|
||||||
def static final statusMap = ["城市未匹配":1,"区域未匹配":2,"小区匹配失败":3,"小区匹配成功":4,"异常错误":5, "无价格":6, "无名称":7]
|
def static final statusMap = ["城市未匹配":1,"区域未匹配":2,"小区匹配失败":3,"小区匹配成功":4,"异常错误":5, "无价格":6, "无名称":7]
|
||||||
|
|
||||||
def static final websites = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集", "链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋"]
|
def static final websites = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集", "链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋","幸福里"]
|
||||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
||||||
static {
|
static {
|
||||||
thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
||||||
@@ -92,7 +92,7 @@ class DataStandardBatch extends BaseBatch{
|
|||||||
|
|
||||||
cityMap.each{city,alias->
|
cityMap.each{city,alias->
|
||||||
println "开始加载【${city}】"
|
println "开始加载【${city}】"
|
||||||
// if(city == "石家庄"){
|
// if(city == "福州"){
|
||||||
def detailMap = CommonDatautils.findAllCityDistrictNameAndAlias(city, "district", ["city","region","name","address","alias","addr_alias","mapping_alias","estate_type2"])
|
def detailMap = CommonDatautils.findAllCityDistrictNameAndAlias(city, "district", ["city","region","name","address","alias","addr_alias","mapping_alias","estate_type2"])
|
||||||
districtMap.putAll(detailMap)
|
districtMap.putAll(detailMap)
|
||||||
// }
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user