diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy index 7f08e30ac..d6f4bbf05 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy @@ -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