This commit is contained in:
2023-08-15 17:07:59 +08:00
parent 7f664dfefa
commit 4fb29fc530
3 changed files with 8 additions and 7 deletions
@@ -140,6 +140,7 @@ class DistrictSellStatBatch extends BaseBatch {
try {
totalCount.addAndGet(1)
def key = dist.region +"##" + dist.name
def weekendPriceObj = weekendPriceMap.get(key)
if(weekendPriceObj){
def curPriceObj = curMonthlyPriceMap.get(key)
@@ -155,7 +156,7 @@ class DistrictSellStatBatch extends BaseBatch {
if(curPriceObj){
curPrice = curPriceObj.avg_price
}else{
curPrice = weekendPriceObj.avg_price
curPrice = weekendPriceObj.avg_price
}
if(weekendPriceObj.value_type!=1){
@@ -197,7 +198,7 @@ class DistrictSellStatBatch extends BaseBatch {
data.put("commid", dist._id.toString())
data.put("mom", mom)
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)
println "[update]"+totalCount.get()+" "+ dist.city+" "+dist.name
}
@@ -76,7 +76,7 @@ class ThirdPriceExportBatch extends BaseBatch{
row << dist.name
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
if(zgf_price){
add = true;
@@ -217,8 +217,8 @@ class ThirdPriceExportBatch extends BaseBatch{
if(!retMap.s_date){
retMap.s_date = curDate
}
if(!retMap.zhugezhaofang_esf_price && d.zhugezhaofang_esf_price){
retMap.zhugezhaofang_esf_price = d.zhugezhaofang_esf_price
if(!retMap.xingfuli_esf_price && d.xingfuli_esf_price){
retMap.xingfuli_esf_price = d.xingfuli_esf_price
}
if(!retMap.anjuke_esf_price && d.get("anjuke_esf_price")){
retMap.anjuke_esf_price = d.get("anjuke_esf_price")
@@ -64,7 +64,7 @@ class DataStandardBatch extends BaseBatch{
def static final SHORT_DATE = Utils.getLastMonth()
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)
static {
thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
@@ -92,7 +92,7 @@ class DataStandardBatch extends BaseBatch{
cityMap.each{city,alias->
println "开始加载【${city}】"
// if(city == "石家庄"){
// if(city == "福州"){
def detailMap = CommonDatautils.findAllCityDistrictNameAndAlias(city, "district", ["city","region","name","address","alias","addr_alias","mapping_alias","estate_type2"])
districtMap.putAll(detailMap)
// }