高德ID反查
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ class CounterCheckGaoDe {
|
||||
static final def URL = "http://192.168.0.216:38080/FangJiaDataService/saveAmapPoi"
|
||||
|
||||
static void main(String[] args) {
|
||||
List<List<String>> infos = ExcelUtils.read("D:\\Users\\Domi\\Desktop\\房价网\\项目\\建行\\模型级联\\地图反查信息_高德结果.xlsx")
|
||||
List<List<String>> infos = ExcelUtils.read("D:\\Users\\Domi\\Desktop\\房价网\\项目\\建行\\模型级联\\地图反查信息_高德结果2.xlsx")
|
||||
for (List<String> info : infos) {
|
||||
if (info.size() < 6) {
|
||||
String id = info.get(4)
|
||||
|
||||
+33
-1
@@ -4,6 +4,7 @@ package com.fangjia.script.temp.shenjian.poi
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.fangjia.script.lixue.util.DBUtils
|
||||
import com.fangjia.script.statistics.poi.AmapPoi
|
||||
import com.fangjia.script.temp.shenjian.util.ExcelUtils
|
||||
import com.fangjia.script.temp.shenjian.util.GaoDeUtils
|
||||
import com.fangjia.script.temp.shenjian.util.HttpUtils
|
||||
import com.fangjia.script.temp.shenjian.util.SeaweedUtils
|
||||
@@ -18,6 +19,7 @@ import org.bson.types.ObjectId
|
||||
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
/**
|
||||
* 获取具体点poi
|
||||
@@ -27,9 +29,39 @@ import java.util.concurrent.Executors
|
||||
*/
|
||||
class GetPoi {
|
||||
|
||||
static final def URL = "http://192.168.0.19:38080/FangJiaDataService/saveAmapPoi"
|
||||
static final def URL = "http://192.168.0.216:38080/FangJiaDataService/saveAmapPoi"
|
||||
static final ExecutorService executorService = Executors.newFixedThreadPool(10)
|
||||
|
||||
static void main(String[] args) {
|
||||
AtomicLong atomicLong = new AtomicLong(0)
|
||||
List<List<String>> seaweeds = ExcelUtils.read("D:\\Users\\Domi\\Desktop\\房价网\\项目\\建行\\模型级联\\分期数据高德核实.xlsx")
|
||||
for (List<String> infoTemp : seaweeds) {
|
||||
final List<String> info = infoTemp
|
||||
executorService.submit(new Runnable() {
|
||||
@Override
|
||||
void run() {
|
||||
String city = info.get(2)
|
||||
String region = info.get(3)
|
||||
String seaweedName = info.get(4)
|
||||
List<AmapPoi> pois = GaoDeUtils.searchPoi(city, seaweedName, region, "120300|120301|120302");
|
||||
if (CollectionUtils.isNotEmpty(pois)) {
|
||||
String jsonStr = JSONObject.toJSONString(pois)
|
||||
HttpUtils.postForJson(URL, jsonStr)
|
||||
atomicLong.incrementAndGet()
|
||||
}
|
||||
synchronized (this) {
|
||||
if (atomicLong.intValue() % 500 == 0) {
|
||||
println(atomicLong.intValue())
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
executorService.shutdown()
|
||||
}
|
||||
|
||||
|
||||
static void getPointInfo() {
|
||||
List<AmapPoi> pois = GaoDeUtils.searchNearDtoByPoi("无锡","190301",120.411465,31.864912, 1000, "江苏省江阴市周庄镇兴隆北路");
|
||||
if (CollectionUtils.isNotEmpty(pois)) {
|
||||
String jsonStr = JSONObject.toJSONString(pois)
|
||||
|
||||
Reference in New Issue
Block a user