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 7c27892fa..73a7cd0b4 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 @@ -68,14 +68,14 @@ class BigdataDealBatch extends BaseBatch{ //664a22000000000000000000 5-20 //664b73800000000000000000 5-21 - def citys =CcbCommonUtils.getRunningCitys(args) + def citys = CcbCommonUtils.getRunningCitys(args) println "curDate:"+curDate def allCitys = CommonDatautils.findAllCity() for(def city : allCitys){ addDealPriceMatch(city); } - updateCrawlTradeDate()//修改后抓取的成交,将时间改为本月 +// updateCrawlTradeDate()//修改后抓取的成交,将时间改为本月 def rows = [] @@ -720,38 +720,38 @@ class BigdataDealBatch extends BaseBatch{ if(!t.match_id){ def region = RegionData.formatRegion(t.city, t.region) def rMap = null - if(region || (!region && ["澄迈"].contains(t.city))) { - if(t.house_use && t.house_use.contains("商住")){ - if(!t.name.contains("商住")){ - t.name = t.name +"商住楼" - } + if(t.house_use && t.house_use.contains("商住")){ + if(!t.name.contains("商住")){ + t.name = t.name +"商住楼" } - def flag = false - def address = null - if(t.address){ - flag = t.address.matches('^[\u4e00-\u9fa5]+?(路|大道|街|巷).+[弄号]$') - if(flag){ - address = t.address - } + } + def flag = false + def address = null + if(t.address){ + flag = t.address.matches('^[\u4e00-\u9fa5]+?(路|大道|街|巷).+[弄号]$') + if(flag){ + address = t.address } + } - rMap = SeaweedDataMatchProcess.doMatch(t.city, region, t.name, address); - if(!rMap && !t.name.toString().endsWith("小区")){ - rMap = SeaweedDataMatchProcess.doMatch(t.city, region, t.name+"小区", address); - } + rMap = SeaweedDataMatchProcess.doMatch(t.city, region, t.name, address); + if(!rMap && !t.name.toString().endsWith("小区")){ + rMap = SeaweedDataMatchProcess.doMatch(t.city, region, t.name+"小区", address); + } - if(rMap && rMap.region==region){ + if(rMap && region && rMap.region==region){ + CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) + }else if(rMap && rMap.address && address && region && rMap.region!=region && address.contains(rMap.address)){ + CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) + }else if (rMap && ["澄迈"].contains(rMap.city)){ + CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) + }else if(rMap && rMap.region!=t.region && ["开发区","八里湖新区","经济技术开发区(头屯河区)","角美台商投资区","贵州双龙航空港经济区","东津新区"].contains(t.region)){ + def lists = CommonDatautils.findDistrictList(rMap.city, null, rMap.name, "district") + if(lists && lists.size()==1){ CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) - }else if(rMap && rMap.address && address && rMap.region!=region && address.contains(rMap.address)){ - CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) - }else if (rMap && ["澄迈"].contains(rMap.city)){ - CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) - }else{ - if (rMap) { - println "区域不同" - } + }else { + println "多区域" } - } println count_.get()+" "+t+" "+ rMap }