From bcbb9552fb021bc58e1abea0c6e24fee7862a7bb Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Wed, 10 Dec 2025 10:43:21 +0800 Subject: [PATCH] update --- .../script/fuzhou/DistrictSellStatBatch.groovy | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/fuzhou/DistrictSellStatBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/fuzhou/DistrictSellStatBatch.groovy index 47a6ec543..084ff8148 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/fuzhou/DistrictSellStatBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/fuzhou/DistrictSellStatBatch.groovy @@ -69,14 +69,16 @@ class DistrictSellStatBatch extends BaseBatch { def weekend = obj.weekend def startMonth = DateUtils.formatDateByPattern(weekend, "yyyyMM").toInteger() def months = DateUtils.getMonthList(startMonth) - months = months[1..(months.size()-1)] - println months - for(def month : months){ - def curDate = DateUtils.parseFromTightByPattern(month.toString()+"01", "yyyyMMdd") - calcMonthlyPriceByName(curDate, command.city, command.region, command.name) - } - //ɾ³ýÃüÁî - COMMAND_COLL.remove(new BasicDBObject("_id", id)) + if(months.size()>1){ + months = months[1..(months.size()-1)] + println months + for(def month : months){ + def curDate = DateUtils.parseFromTightByPattern(month.toString()+"01", "yyyyMMdd") + calcMonthlyPriceByName(curDate, command.city, command.region, command.name) + } + //ɾ³ýÃüÁî + COMMAND_COLL.remove(new BasicDBObject("_id", id)) + } } } }