+8
-3
@@ -93,7 +93,7 @@ class NewGaoDePoiBatch extends BaseBatch{
|
|||||||
|
|
||||||
def createData(map, townMap){
|
def createData(map, townMap){
|
||||||
def saveObj = [:]
|
def saveObj = [:]
|
||||||
def towns = townMap.get(saveObj.district)
|
def towns = townMap.get(map.district)
|
||||||
saveObj.province = map.province
|
saveObj.province = map.province
|
||||||
saveObj.city = map.city
|
saveObj.city = map.city
|
||||||
if(towns){
|
if(towns){
|
||||||
@@ -158,7 +158,7 @@ class NewGaoDePoiBatch extends BaseBatch{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(map.address && saveObj.township){
|
if(map.address && !saveObj.township){
|
||||||
for(def town : towns){
|
for(def town : towns){
|
||||||
if(map.address.contains(town.street)){
|
if(map.address.contains(town.street)){
|
||||||
saveObj.township = town.street
|
saveObj.township = town.street
|
||||||
@@ -196,7 +196,12 @@ class NewGaoDePoiBatch extends BaseBatch{
|
|||||||
}
|
}
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
saveObj.address = address
|
if(address && address.startsWith("(") && address.endsWith(")")){
|
||||||
|
saveObj.address = address.substring(1, address.length()-1)
|
||||||
|
}else{
|
||||||
|
saveObj.address = address
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return saveObj
|
return saveObj
|
||||||
|
|||||||
Reference in New Issue
Block a user