From 7d1ee1a59ce2925c1d753198a3335541aa0426ef Mon Sep 17 00:00:00 2001 From: gaojuan Date: Fri, 14 Jul 2023 18:43:22 +0800 Subject: [PATCH] update --- .../fangjia/script/fuzhou/DistrictSellStatBatch.groovy | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 644156419..cce1de4df 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 @@ -62,7 +62,7 @@ class DistrictSellStatBatch extends BaseBatch { def calcMonthlyPrice(){ //只有福州使用tob价格 def citys = CommonUtils.findAllCity() - def keys = new BasicDBObject("city", 1).append("name", 1).append("region", 1).append("estate_type2", 1) + def keys = new BasicDBObject("city", 1).append("name", 1).append("region", 1).append("estate_type2", 1).append("status", 1) def lastMonthWeekend = DateUtils.truncateDay(DateUtils.getLastSundayInWeekOfLastMonth(new Date())) @@ -169,6 +169,10 @@ class DistrictSellStatBatch extends BaseBatch { if(lastYearPriceObj){ yoy = DataUtil.roundDouble(((curPrice - lastYearPriceObj.avg_price)/(double)lastYearPriceObj.avg_price),4) } + + if(dist.status==1){ + curPrice = 0 + } if(curPriceObj){ if(curPrice!=weekendPriceObj.avg_price){ def data = new BasicDBObject() @@ -232,7 +236,7 @@ class DistrictSellStatBatch extends BaseBatch { def priceMap = [:] for(def d : dbcursor){ if(city == "福州"){ - if(d.avg_price_2b){ + if(d.avg_price_2b && d.value_type!=1){ d.avg_price = d.avg_price_2b } }