From 4b869b2797b040328a0278f917195a1478028c0e Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 10 Jan 2023 10:46:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9F=8E=E5=B8=82=E8=A1=8C=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy index 90a46050c..e7c767739 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy @@ -34,8 +34,8 @@ class BigdataCitypriceBatch extends BaseBatch{ @Override void process(Object args) { def citys = CcbCommonUtils.getRunningCitys(args) - def startDate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMMdd").toInteger(); - def endDate = DateUtils.formatDateByPattern(DateUtils.getLastDayOfMonth(new Date(),-1), "yyyyMMdd").toInteger(); + def startDate = 20221201//DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMMdd").toInteger(); + def endDate = 20221231//DateUtils.formatDateByPattern(DateUtils.getLastDayOfMonth(new Date(),-1), "yyyyMMdd").toInteger(); def cityCodeDataMap = CcbCommonUtils.findCityCodeValue() cityRun(citys, startDate, endDate, cityCodeDataMap) From 3bb6bee02bc11a8c6ab3c943eb55ca871c95dfee Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 10 Jan 2023 11:20:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccbevaluation/ronghe/BigdataCitypriceBatch.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy index e7c767739..2d248a235 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCitypriceBatch.groovy @@ -27,6 +27,8 @@ class BigdataCitypriceBatch extends BaseBatch{ public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(80) + def curRunDate = 202212//DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMM").toInteger(); + static main(args) { runBatch(new BigdataCitypriceBatch(), args) } @@ -238,7 +240,7 @@ class BigdataCitypriceBatch extends BaseBatch{ if (sell_avg_price || rent_avg_price) { def row = [] row << cityCodeDataMap.get(dist.city) - row << DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMM").toInteger(); + row << curRunDate//DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMM").toInteger(); row << dist._id.toString() if (sell_avg_price) { @@ -362,7 +364,7 @@ class BigdataCitypriceBatch extends BaseBatch{ if (sell_avg_price || rent_avg_price) { def row = [] row << cityCodeDataMap.get(city) - row << DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMM").toInteger(); + row << curRunDate//DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(),-1), "yyyyMM").toInteger(); if(region){ row << regionCodeDataMap.district_code