+15
-4
@@ -7,6 +7,7 @@ import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.common.DataHandleUtils
|
||||
import com.fangjia.script.gj.district.FangjiaClientUtils
|
||||
import com.fangjia.script.util.CommonUtils
|
||||
import com.fangjia.script.util.DataUtil
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
@@ -34,7 +35,7 @@ class ThirdPriceMappingBatch extends BaseBatch{
|
||||
|
||||
final DBCollection dataProcessColl = MongoUtils.getCollectionByName("fangjia_craw", "data_process", "192.168.0.235", 27018)
|
||||
|
||||
def curDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||
def curDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -2, "yyyyMM"));
|
||||
|
||||
static main(args) {
|
||||
runBatch(new ThirdPriceMappingBatch(), args);
|
||||
@@ -76,7 +77,17 @@ class ThirdPriceMappingBatch extends BaseBatch{
|
||||
address = address + nmd.district
|
||||
}
|
||||
address = address + nmd.name
|
||||
def jsonObject = FangjiaClientUtils.newMatch(nmd.city, address, "property", true)
|
||||
def jsonObject = FangjiaClientUtils.newMatch(nmd.city, address, "property", false)
|
||||
if(!jsonObject){
|
||||
if(DataUtil.isPreciseAddress(nmd.address)){
|
||||
address = nmd.city
|
||||
if(nmd.district){
|
||||
address = address + nmd.district
|
||||
}
|
||||
address = address + nmd.address
|
||||
jsonObject = FangjiaClientUtils.newMatch(nmd.city, address, "property", false)
|
||||
}
|
||||
}
|
||||
if(jsonObject) {
|
||||
def udata = new BasicDBObject()
|
||||
udata.put("match_id",jsonObject.get("id"))
|
||||
@@ -161,7 +172,7 @@ class ThirdPriceMappingBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
def addOldMatchResult(){
|
||||
def citys = ["上海"]//CommonUtils.findAllCity()
|
||||
def citys = CommonUtils.findAllCity()
|
||||
def keys = new BasicDBObject()
|
||||
keys.put("_id", 1)
|
||||
|
||||
@@ -199,7 +210,7 @@ class ThirdPriceMappingBatch extends BaseBatch{
|
||||
|
||||
println addCount.get()+"/"+total +" [旧匹配找到] "
|
||||
}else{
|
||||
println addCount.get()+"/"+total +" [旧匹配没找到] "
|
||||
println addCount.get()+"/"+total +" [旧匹配没找到] "+d._id.toString()
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
|
||||
Reference in New Issue
Block a user