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 +" 无经纬度信息" } + } } }