+10
-6
@@ -89,14 +89,14 @@ class BigdataDealBatch extends BaseBatch{
|
||||
def statMap = [:]//getDistrictStatByCity(city, weekend)
|
||||
if(city=="上海"){
|
||||
def youDataTrade = getYouDaData(statMap)
|
||||
def youdaDatas = createData(youDataTrade, cityCodeDataMap, distCodeMap, "youda", dealIds)
|
||||
def youdaDatas = createData(city, youDataTrade, cityCodeDataMap, distCodeMap, "youda", dealIds)
|
||||
rows.addAll(youdaDatas)
|
||||
println city +" "+youdaDatas.size()
|
||||
}
|
||||
|
||||
def trades = getCityData(city, statMap, ppeDists)
|
||||
if(trades){
|
||||
def rets = createData(trades, cityCodeDataMap, distCodeMap, "other", dealIds)
|
||||
def rets = createData(city, trades, cityCodeDataMap, distCodeMap, "other", dealIds)
|
||||
rows.addAll(rets)
|
||||
println "【${index}】"+city +" 成交共:"+rets.size()
|
||||
|
||||
@@ -118,7 +118,7 @@ class BigdataDealBatch extends BaseBatch{
|
||||
saveToPgSql(rows)
|
||||
}
|
||||
|
||||
def createData(def rets, cityCodeDatas, distCodeMap, source, dealIds){
|
||||
def createData(city, def rets, cityCodeDatas, distCodeMap, source, dealIds){
|
||||
def result = Collections.synchronizedList(new ArrayList());
|
||||
def totalCount = new AtomicLong()
|
||||
final CountDownLatch latch = new CountDownLatch(rets.size())
|
||||
@@ -127,7 +127,11 @@ class BigdataDealBatch extends BaseBatch{
|
||||
// def startDate = DateUtils.parseFromTightByPattern(DateUtils.addMonth(new Date(),-2),'yyyy-MM-dd')
|
||||
// def lianjiaPriceMap = getDistrictStatByCity("上海", startDate)
|
||||
|
||||
def ccbPriceMap = getCommunityPrices("上海")
|
||||
def ccbPriceMap = null
|
||||
if(city == "上海"){
|
||||
ccbPriceMap = getCommunityPrices("上海")
|
||||
}
|
||||
|
||||
for(def i=0;i<rets.size();i++){
|
||||
final def trade = rets[i]
|
||||
if(dealIds.contains(trade._id.toString())){
|
||||
@@ -143,13 +147,13 @@ class BigdataDealBatch extends BaseBatch{
|
||||
def ret = converYouDaData(trade, cityCodeDatas, distCodeMap, ccbPriceMap)
|
||||
if(ret){
|
||||
result << ret
|
||||
println totalCount.get() +" "+trade.city+" "+trade.region+" "+trade.fjName+" "+new Date().toLocaleString()
|
||||
println totalCount.get() +" 友达:"+trade.city+" "+trade.region+" "+trade.fjName+" "+new Date().toLocaleString()
|
||||
}
|
||||
}else{
|
||||
def ret = converData(trade, cityCodeDatas, distCodeMap)
|
||||
if(ret){
|
||||
result << ret
|
||||
println totalCount.get() +" "+trade.city+" "+trade.region+" "+trade.district_name+" "+new Date().toLocaleString()
|
||||
println totalCount.get() +" 第三方:"+trade.city+" "+trade.region+" "+trade.district_name+" "+new Date().toLocaleString()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user