From 6c2b70c18f7520c521f1f8d74e5a471012c8cb11 Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Thu, 19 Dec 2024 16:50:36 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/gj/data_handle/NewGaoDePoiBatch.groovy | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy index 3dc4ffbca..29c5560d4 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy @@ -439,12 +439,17 @@ class NewGaoDePoiBatch extends BaseBatch{ def esValue = regionMap.get(key) if(esValue.township && ret.township){ if(esValue.name.contains(ret.name) || ret.name.contains(esValue.name)){//|| - def distance = GeoUtils.calculateDistance(ret.location.lon, ret.location.lat, esValue.location.lon, esValue.location.lat); - if(distance <100){ - simlarObj = esValue - println esValue.name +" "+ret.name+" "+distance - break; + if(ret.location && ret.location.lon){ + def distance = GeoUtils.calculateDistance(ret.location.lon, ret.location.lat, esValue.location.lon, esValue.location.lat); + if(distance <100){ + simlarObj = esValue + println esValue.name +" "+ret.name+" "+distance + break; + } + }else{ + println ret.data_id +" 无经纬度信息" } + } } }