From 9584e4cd2d095c244d2ad5959b9b0eafd789d66f Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Mon, 26 Aug 2024 10:07:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=BE=84=E8=BF=88=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/ccbevaluation/BigdataDealBatch.groovy | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 8a924e652..7c27892fa 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,10 +68,10 @@ 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() + def allCitys = CommonDatautils.findAllCity() for(def city : allCitys){ addDealPriceMatch(city); } @@ -720,7 +720,7 @@ class BigdataDealBatch extends BaseBatch{ if(!t.match_id){ def region = RegionData.formatRegion(t.city, t.region) def rMap = null - if(region) { + if(region || (!region && ["澄迈"].contains(t.city))) { if(t.house_use && t.house_use.contains("商住")){ if(!t.name.contains("商住")){ t.name = t.name +"商住楼" @@ -744,7 +744,9 @@ class BigdataDealBatch extends BaseBatch{ 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 { + }else if (rMap && ["澄迈"].contains(rMap.city)){ + CcbCommonUtils.updateDealPrice(t._id, rMap.city, rMap.region, rMap.name, rMap.id) + }else{ if (rMap) { println "区域不同" } From 740f165033c7e682b40a9c586c501e28e433ecfa Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Mon, 26 Aug 2024 10:07:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=96=B0=E6=9D=A5=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccbevaluation/ThirdPartyPriceBatch.groovy | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy index 5f5a53f33..98612d573 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy @@ -260,6 +260,9 @@ class ThirdPartyPriceBatch extends BaseBatch { if(third.get("fccs_esf_price")){ price_map.fccs_avg_price = third.get("fccs_esf_price") } + if(third.get("csjj_esf_price")){ + price_map.csjj_avg_price = third.get("csjj_esf_price") + } dataMap.updatetime = DateUtils.formatDateByPattern(new Date(), "yyyy-MM-dd HH:mm:ss") allRows << dataMap } @@ -308,6 +311,8 @@ class ThirdPartyPriceBatch extends BaseBatch { web = "我爱我家" }else if(k=="fccs_avg_price"){ web = "房产超市" + }else if(k=="csjj_avg_price"){ + web = "城市居家" } ret << sourceMap.get(web) @@ -525,6 +530,7 @@ class ThirdPartyPriceBatch extends BaseBatch { q.put("city", city) q.put("s_date", new BasicDBObject('$gte', startDate).append('$lte',endDate)) + def dbcursor = AVERAGE_STATISTICS.find(q).sort(new BasicDBObject("s_date", -1)) def map = [:] for(def db : dbcursor){ @@ -593,6 +599,10 @@ class ThirdPartyPriceBatch extends BaseBatch { if(!dataMap.get("fccs_esf_price") && db.get("fccs_esf_price") && db.get("fccs_esf_price")>3000){ dataMap.put("fccs_esf_price", db.get("fccs_esf_price")) } + + if(!dataMap.get("csjj_esf_price") && db.get("csjj_esf_price") && db.get("csjj_esf_price")>3000){ + dataMap.put("csjj_esf_price", db.get("csjj_esf_price")) + } // if(db.zhugezhaofang_esf_price || db.anjuke_esf_price ||db.soufang_esf_price || db.lianjia_esf_price || db.cityhouse_esf_price || db.maitian_esf_price || db.beike_esf_price || db.get("365house_esf_price") || db.zhongyuan_esf_price || db.tuboshi_esf_price || db.qfang_esf_price || db.fangtan_esf_price || db.fangduoduo_esf_price || db.get("5i5j_esf_price")){ // map.put(key, db) // } @@ -600,8 +610,8 @@ class ThirdPartyPriceBatch extends BaseBatch { def resultMap = [:] map.each {key, value-> - if(value && value.size()>1){ - if(value.size()==2 && !value.lianjia_esf_price && !value.beike_esf_price){ + if(value && value.size()>1){ //csjj_esf_price 国信达成交 + if(value.size()==2 && !value.lianjia_esf_price && !value.beike_esf_price && !value.csjj_esf_price){ def price = statMap.get(key) if(price){ def priceMap = [:]