+7
-4
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicLong
|
|||||||
class SuggestionDataSynch extends BaseBatch{
|
class SuggestionDataSynch extends BaseBatch{
|
||||||
|
|
||||||
static def targetUrl = "http://192.168.0.12:9200/seaweed/"
|
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";
|
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||||
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
||||||
@@ -264,12 +264,15 @@ class SuggestionDataSynch extends BaseBatch{
|
|||||||
map.location = dist.location
|
map.location = dist.location
|
||||||
map.source = "FJW"
|
map.source = "FJW"
|
||||||
|
|
||||||
map.township = InsidePolygon.isInArea2(map.location.lon, map.location.lat, townMap)
|
if(townshipMap && townshipMap.containsKey(dist.id)){
|
||||||
if(!map.township){
|
|
||||||
def obj = townshipMap.get(dist.id)
|
def obj = townshipMap.get(dist.id)
|
||||||
if(obj){
|
if(obj){
|
||||||
map.township = obj.township
|
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)
|
def gaodeMap = getTownshipInfo(map.location.lon+","+map.location.lat)
|
||||||
if(gaodeMap && gaodeMap.township){
|
if(gaodeMap && gaodeMap.township){
|
||||||
map.township = gaodeMap.township
|
map.township = gaodeMap.township
|
||||||
|
|||||||
Reference in New Issue
Block a user