diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/didata/MatchFromExcel.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/didata/MatchFromExcel.groovy new file mode 100644 index 000000000..20de59c5f --- /dev/null +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/didata/MatchFromExcel.groovy @@ -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") + } +}); diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/GetPoiFromExcel.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/GetPoiFromExcel.groovy index f9b073743..235d779e4 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/GetPoiFromExcel.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/GetPoiFromExcel.groovy @@ -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 pois = GaoDeUtils.searchPoi(city, seaweedName, region, typecodes); if (CollectionUtils.isNotEmpty(pois)) { List detailList = CommonDtoUtils.transformListV(AmapPoiDetail.class, pois);