update
This commit is contained in:
+1
-1
@@ -4746,7 +4746,7 @@ class CommonDatautils {
|
||||
townMap.put(key, list)
|
||||
}
|
||||
|
||||
println "乡镇街道 加载完成"
|
||||
println "[${city}] 乡镇街道 加载完成 "+new Date().format("yyyy-MM-dd HH:mm:ss")
|
||||
return townMap
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,16 @@ import org.apache.commons.lang.StringUtils
|
||||
class OpenApiUtils {
|
||||
static def matchDistrict(def city, def address, def suggestDistrict, def preciseLevelflag, def suggestName){
|
||||
address = address.replace("(","(").replace(")",")").replace(" ","").replace("#","").replace("<","").replace(">","").replace("%","").replace("\"","")
|
||||
def url = "http://open.fangjia.com/address/matchV2?city="+city+"&address="+address+"&suggestDistrict="+suggestDistrict+"&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB&category=district&__refresh_cache=1"
|
||||
def url = "http://open.fangjia.com/address/matchV2?city="+city+"&address="+address+"&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB&category=district&__refresh_cache=1"
|
||||
if(preciseLevelflag){
|
||||
url = url +"&preciseLevel=strict"
|
||||
}
|
||||
if(suggestName){
|
||||
url = url +"&suggestName="+suggestName
|
||||
}
|
||||
if(suggestDistrict){
|
||||
url = url +"&suggestDistrict="+suggestDistrict
|
||||
}
|
||||
String content = new HttpRequest().get(url, "utf-8");
|
||||
def rMap = [:]
|
||||
if(content){
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ class FangjiaClientUtils {
|
||||
try {
|
||||
address = address.replace("{","")
|
||||
// def url = "http://192.168.0.19:31080/FangJiaNlpService/formatFivelevel?address="+URLEncoder.encode(address,"UTF-8")
|
||||
def url = "http://192.168.0.100:32080/FangJiaNlpService/formatFivelevel?address="+URLEncoder.encode(address,"UTF-8")
|
||||
def url = "http://192.168.0.19:31080/FangJiaNlpService/formatFivelevel?address="+URLEncoder.encode(address,"UTF-8")
|
||||
if(city){
|
||||
url = url +"&city="+URLEncoder.encode(city,"UTF-8")
|
||||
}
|
||||
|
||||
+6
-2
@@ -204,7 +204,7 @@ class GaoDePoiDataProcess extends BaseBatch{
|
||||
def prov = ProvinceData.getProvince(p.city.replace("市",""))
|
||||
|
||||
def ret = createVillageData(prov, p, townMap)
|
||||
if(!keyRets.contains(ret.city+"##"+ret.district+"##"+ret.name)){
|
||||
if(ret && !keyRets.contains(ret.city+"##"+ret.district+"##"+ret.name)){
|
||||
keyRets << ret.city+"##"+ret.district+"##"+ret.name
|
||||
rets << ret
|
||||
}
|
||||
@@ -317,6 +317,11 @@ class GaoDePoiDataProcess extends BaseBatch{
|
||||
// retMap.small_type = "村庄级地名"
|
||||
retMap.cat = map.std_tag
|
||||
|
||||
if(!map.std_tag){
|
||||
println map.name +" std_tag: "+ map.std_tag +" 为空过滤"
|
||||
return null
|
||||
}
|
||||
|
||||
def nameArr = map.std_tag.split(";|:")
|
||||
if(nameArr.size()>=1){
|
||||
retMap.type = nameArr[0]
|
||||
@@ -728,7 +733,6 @@ class GaoDePoiDataProcess extends BaseBatch{
|
||||
}
|
||||
}
|
||||
|
||||
println "[${city}] 结束时间 "+new Date()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user