From d9181fdb611326119b26f2e0526a65a2a22c0919 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 15 Jan 2024 18:38:15 +0800 Subject: [PATCH] update --- .../script/gj/xiamen/SuggestionDataSynch.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/SuggestionDataSynch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/SuggestionDataSynch.groovy index 57c7023b0..883b7371b 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/SuggestionDataSynch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/SuggestionDataSynch.groovy @@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicLong class SuggestionDataSynch extends BaseBatch{ static def targetUrl = "http://192.168.0.12:9200/seaweed/" - public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20) + public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(50) def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009"; DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL) @@ -264,12 +264,15 @@ class SuggestionDataSynch extends BaseBatch{ map.location = dist.location map.source = "FJW" - map.township = InsidePolygon.isInArea2(map.location.lon, map.location.lat, townMap) - if(!map.township){ + if(townshipMap && townshipMap.containsKey(dist.id)){ def obj = townshipMap.get(dist.id) if(obj){ map.township = obj.township - }else{ + } + } + if(!map.township){ + map.township = InsidePolygon.isInArea2(map.location.lon, map.location.lat, townMap) + if(!map.township){ def gaodeMap = getTownshipInfo(map.location.lon+","+map.location.lat) if(gaodeMap && gaodeMap.township){ map.township = gaodeMap.township