bug修改
This commit is contained in:
+1
-1
@@ -4209,7 +4209,7 @@ class CommonDatautils {
|
|||||||
|
|
||||||
|
|
||||||
static def findAllNewPoiDatas(city){
|
static def findAllNewPoiDatas(city){
|
||||||
String sql = "select pname,cityname,adname,name,address,location,type,id from poi_amap_2024 where cityname='${city}' limit 100"
|
String sql = "select pname,cityname,adname,name,address,location,type,id from poi_amap_2024 where cityname='${city}' "
|
||||||
def rets = []
|
def rets = []
|
||||||
def index= 0
|
def index= 0
|
||||||
ElasticUtils.executeSqlQuery(sql, { map->
|
ElasticUtils.executeSqlQuery(sql, { map->
|
||||||
|
|||||||
+6
-5
@@ -74,8 +74,8 @@ class NewGaoDePoiBatch extends BaseBatch{
|
|||||||
def townMap = CommonDatautils.queryFullRegionTownByCity(city, ["city","district","street", "shape"])
|
def townMap = CommonDatautils.queryFullRegionTownByCity(city, ["city","district","street", "shape"])
|
||||||
for(def i=0;i<results.size();i++){
|
for(def i=0;i<results.size();i++){
|
||||||
def map = results[i]
|
def map = results[i]
|
||||||
// fixedThreadPool.execute(new Runnable() {
|
fixedThreadPool.execute(new Runnable() {
|
||||||
// void run() {
|
void run() {
|
||||||
try{
|
try{
|
||||||
totalCount.addAndGet(1)
|
totalCount.addAndGet(1)
|
||||||
rets.addAll(createData(map, townMap))
|
rets.addAll(createData(map, townMap))
|
||||||
@@ -84,10 +84,10 @@ class NewGaoDePoiBatch extends BaseBatch{
|
|||||||
} finally {
|
} finally {
|
||||||
latch.countDown()
|
latch.countDown()
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
// latch.await()
|
latch.await()
|
||||||
return rets;
|
return rets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,6 +181,7 @@ class NewGaoDePoiBatch extends BaseBatch{
|
|||||||
if(address.toString().startsWith(saveObj.township)){
|
if(address.toString().startsWith(saveObj.township)){
|
||||||
address = address.toString().substring(0, saveObj.township.toString().length())
|
address = address.toString().substring(0, saveObj.township.toString().length())
|
||||||
}
|
}
|
||||||
|
i++
|
||||||
}
|
}
|
||||||
saveObj.township = address
|
saveObj.township = address
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user