From ce3788bfe8c731d2136eb30e9b893a84e8d7d299 Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Tue, 15 Oct 2024 13:36:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E6=9C=88=E5=BA=A6=E5=9D=87=E4=BB=B7=EF=BC=8C=E9=98=B2=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E5=B0=8F=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fangjia/script/fuzhou/DistrictSellStatBatch.groovy | 9 +++++++-- 1 file changed, 7 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 ff963b129..5a6cba7f2 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 @@ -202,13 +202,18 @@ class DistrictSellStatBatch extends BaseBatch { if(curPrice!=curPriceObj.avg_price){ def data = new BasicDBObject() data.put("m_date", new Date()) - data.put("commid", dist._id.toString()) +// data.put("commid", dist._id.toString()) data.put("mom", mom) data.put("yoy", yoy) data.put("avg_price",curPrice) data.put("value_type", weekendPriceObj.value_type) data.put("credit", weekendPriceObj.credit) - DISTRICT_SELL_STAT.update(new BasicDBObject("_id", curPriceObj._id) , new BasicDBObject('$set', data),true,false) + + def q = new BasicDBObject() + q.put("date", curMonth) + q.put("commid", dist._id.toString()) + DISTRICT_SELL_STAT.update(q , new BasicDBObject('$set', data),true,false) +// DISTRICT_SELL_STAT.update(new BasicDBObject("_id", curPriceObj._id) , new BasicDBObject('$set', data),true,false) println "[update]"+totalCount.get()+" "+ dist.city+" "+dist.name } }else{ From 5d69d4a95086db130f99c156d27268898627384b Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Tue, 15 Oct 2024 14:32:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/gj/xiamen/RelatedTaiWanBatch.groovy | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/RelatedTaiWanBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/RelatedTaiWanBatch.groovy index c1684e2f8..e0324502c 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/RelatedTaiWanBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/RelatedTaiWanBatch.groovy @@ -36,7 +36,7 @@ class RelatedTaiWanBatch extends BaseBatch{ @Override public void process(Object args) { - createDatas() //企业库获取涉台园区企业 +// createDatas() //企业库获取涉台园区企业 updateRangeByPoint() //更改企业所在自贸区 export() //导出数据 } @@ -57,12 +57,14 @@ class RelatedTaiWanBatch extends BaseBatch{ println dbcursor.count() for(def r : dbcursor){ def resKey = null - for(def m : zimaoqu_range_datas){ + if(r.lon && r.lat){ + for(def m : zimaoqu_range_datas){ // def flag = InsidePolygon.isInArea(r.lon, r.lat, InsidePolygon.createPoint5(m.shape)) - def flag = InsidePolygon.isPtInPoly(r.lon, r.lat, InsidePolygon.createPoint5(m.shape)) - if(flag){ - resKey = m.name - break + def flag = InsidePolygon.isPtInPoly(r.lon, r.lat, InsidePolygon.createPoint5(m.shape)) + if(flag){ + resKey = m.name + break + } } } if(resKey){