新增匹配
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
package com.fangjia.script.temp.shenjian.didata
|
||||
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.OpenApiClient
|
||||
|
||||
/**
|
||||
* 从excel中匹配出
|
||||
*/
|
||||
ExcelUtils.multiThreadingModify("D:\\Users\\Domi\\Documents\\知识库\\地数\\数据建设\\待审核小区(地图匹配).xlsx", { row ->
|
||||
def city = row['A']
|
||||
def region = row['B']
|
||||
def district_name = row['C']
|
||||
|
||||
def gaodeRegion = row['H']
|
||||
def gaodeName = row['I']
|
||||
|
||||
def jsonObject = OpenApiClient.addressMatch(city, null, "district", false, region, district_name, "strict")
|
||||
if (jsonObject != null && jsonObject.precise != -1) {
|
||||
row['D'] = jsonObject.get("name")
|
||||
}
|
||||
|
||||
def jsonObject2 = OpenApiClient.addressMatch(city, null, "district", false, gaodeRegion, gaodeName, "strict")
|
||||
if (jsonObject != null && jsonObject.precise != -1) {
|
||||
row['J'] = jsonObject.get("name")
|
||||
}
|
||||
});
|
||||
+3
-3
@@ -32,9 +32,9 @@ class GetPoiFromExcel {
|
||||
executorService.submit(new Runnable() {
|
||||
@Override
|
||||
void run() {
|
||||
String city = info.get(1)
|
||||
String region = info.get(2)
|
||||
String seaweedName = info.get(3)
|
||||
String city = info.get(0)
|
||||
String region = info.get(1)
|
||||
String seaweedName = info.get(2)
|
||||
List<AmapPoi> pois = GaoDeUtils.searchPoi(city, seaweedName, region, typecodes);
|
||||
if (CollectionUtils.isNotEmpty(pois)) {
|
||||
List<AmapPoiDetail> detailList = CommonDtoUtils.transformListV(AmapPoiDetail.class, pois);
|
||||
|
||||
Reference in New Issue
Block a user