From 2df46ebb2eb14029f8b605ed8ab41dad005f8557 Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Wed, 23 Oct 2024 17:52:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data_handle/AddDistrictShapeBatch.groovy | 110 ++++++++++++++++-- 1 file changed, 100 insertions(+), 10 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictShapeBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictShapeBatch.groovy index 5093ecb3a..d250b8944 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictShapeBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictShapeBatch.groovy @@ -1,14 +1,18 @@ package com.fangjia.script.gj.data_handle +import com.fangjia.core.util.HttpRequest import com.fangjia.script.BaseBatch import com.fangjia.script.BatchOwner import com.fangjia.script.Watcher import com.fangjia.script.commData.CommonDatautils +import com.fangjia.script.common.DataHandleUtils import com.fangjia.script.util.ElasticUtils import com.fangjia.script.util.MongoUtils import com.mongodb.BasicDBObject import com.mongodb.DBCollection import com.rabbitmq.client.impl.AMQImpl +import groovy.json.JsonSlurper +import net.sf.json.JSONObject import java.util.concurrent.CopyOnWriteArrayList import java.util.concurrent.CountDownLatch @@ -36,6 +40,8 @@ class AddDistrictShapeBatch extends BaseBatch{ @Override public void process(Object args) { + +// findGaoDeDatas2("苏州市","吴中区", "水岸清华瀚宫" ) def citys = CommonDatautils.findAllCity() def index = 1 for(def c : citys){ @@ -228,7 +234,7 @@ class AddDistrictShapeBatch extends BaseBatch{ def fenceMap = null for(def name : alias){ - fenceMap = findGaoDeDatas(fullCityName, fullDistName, name) + fenceMap = findGaoDeDatas2(fullCityName, fullDistName, name) if(!fenceMap){ continue } @@ -244,15 +250,14 @@ class AddDistrictShapeBatch extends BaseBatch{ o.put("data_id", fenceMap.id) o.put("comm_id", d._id.toString()) def resultMap = [:] - - def shape = fenceMap.shape - def points_x = fenceMap.shape.polygon.x - def points_y = fenceMap.shape.polygon.y - def list = [] - for(def i=0;i