Merge branch 'script_gj' into 'master'
Script gj See merge request !872
This commit is contained in:
+19
-10
@@ -67,8 +67,8 @@ class PoiLocation {
|
|||||||
index++
|
index++
|
||||||
def datas = checkData(index, rets)
|
def datas = checkData(index, rets)
|
||||||
// updateToEs(datas)
|
// updateToEs(datas)
|
||||||
updateToEs2(datas)
|
// updateToEs2(datas)
|
||||||
updateToMG(datas)
|
// updateToMG(datas)
|
||||||
rets = []
|
rets = []
|
||||||
print "."
|
print "."
|
||||||
}
|
}
|
||||||
@@ -92,6 +92,10 @@ class PoiLocation {
|
|||||||
if(map.update_status && map.update_status!=100){
|
if(map.update_status && map.update_status!=100){
|
||||||
println "[ ${index} ]"+d.city +" "+totalCount.get() +"/"+rets.size()+" "+map.id+" "+d.district+" 原:"+d.township+" 新:"+map.township
|
println "[ ${index} ]"+d.city +" "+totalCount.get() +"/"+rets.size()+" "+map.id+" "+d.district+" 原:"+d.township+" 新:"+map.township
|
||||||
}
|
}
|
||||||
|
if (map.update_status && map.update_status !=100) {
|
||||||
|
updateMapPoi(map.id, map.township)
|
||||||
|
}
|
||||||
|
updateToMG(map)
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
println d.city +" "+d.name
|
println d.city +" "+d.name
|
||||||
@@ -231,9 +235,14 @@ class PoiLocation {
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
HttpRequest request = new HttpRequest()
|
HttpRequest request = new HttpRequest()
|
||||||
String res = request.postWithBody(seawaterUrl, JSONObject.fromObject(body.toString()), header, "UTF-8")
|
try{
|
||||||
def response = JSONObject.fromObject(res)
|
String res = request.postWithBody(seawaterUrl, JSONObject.fromObject(body.toString()), header, "UTF-8")
|
||||||
println(response)
|
def response = JSONObject.fromObject(res)
|
||||||
|
println(response)
|
||||||
|
}catch(Exception e){
|
||||||
|
println "error : "+e.getMessage()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -295,10 +304,10 @@ class PoiLocation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def updateToMG(rows){
|
def updateToMG(m){
|
||||||
def rets = []
|
// def rets = []
|
||||||
for(def i=0;i<rows.size();i++){
|
// for(def i=0;i<rows.size();i++){
|
||||||
def m = rows[i]
|
// def m = rows[i]
|
||||||
def udata = new BasicDBObject()
|
def udata = new BasicDBObject()
|
||||||
m.each{k,v->
|
m.each{k,v->
|
||||||
if(k!="id"){
|
if(k!="id"){
|
||||||
@@ -313,7 +322,7 @@ class PoiLocation {
|
|||||||
println m.toString()+" 无法修改-无值"
|
println m.toString()+" 无法修改-无值"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user