From fef6749ff75e1202ff9e0aae26b6e9f7095c454d Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Fri, 24 Oct 2025 10:34:31 +0800 Subject: [PATCH] update --- .../com/fangjia/script/gj/OpenApiUtils.groovy | 20 ++++++++++++++++++- .../gj/data_handle/AddDevShapeData.groovy | 2 +- .../gj/data_handle/DevUpdateTestBatch.groovy | 4 ++-- .../script/gj/village/GuangDaVillage.groovy | 4 ++-- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/OpenApiUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/OpenApiUtils.groovy index 3c827d188..56d1edabf 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/OpenApiUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/OpenApiUtils.groovy @@ -813,7 +813,7 @@ class OpenApiUtils { static def addrVerifyGuangda(city, address){ address = URLEncoder.encode(address, "utf-8"); - def url = "http://192.168.0.19:32080/FangJiaAddressService/cebEnterpriseVillageIdentify?address=${address}" + def url = "http://192.168.0.100:32080/FangJiaAddressService/cebEnterpriseVillageIdentify?address=${address}" // def url = "http://localhost:8080/fangjia-open/addrSvc/njcbVillageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB" if(city){ url = url + "&city=${city}" @@ -830,6 +830,24 @@ class OpenApiUtils { } + static def addrVerifyBase(city, address){ + address = URLEncoder.encode(address, "utf-8"); + def url = "http://192.168.0.100:32080/FangJiaAddressService/cebEnterpriseVillageIdentify?address=${address}" +// def url = "http://localhost:8080/fangjia-open/addrSvc/njcbVillageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB" + if(city){ + url = url + "&city=${city}" + } + String content = new HttpRequest().get(url, "utf-8"); + if(content){ + def doc = new JsonSlurper().parseText(content) + if(doc && doc.msgCode ==200 && doc.result){ + def dtos = doc.result + return dtos + } + } + return null; + } + // 省、市、区、街道、社区居委、POI补全 static def complete(city, address){ def url = "http://open.fangjia.com/addrSvc/complete?city=${city}&address=${address}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB" diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDevShapeData.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDevShapeData.groovy index c9053f536..dd09d15a5 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDevShapeData.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDevShapeData.groovy @@ -189,7 +189,7 @@ class AddDevShapeData { def run(){ - def directoryPath = 'D:\\数据\\数据建设\\开发区外包\\1016' + def directoryPath = 'D:\\数据\\数据建设\\开发区外包\\1020' def dir = new File(directoryPath) if (dir.isDirectory()) { dir.eachFileRecurse(FileType.FILES) { file -> diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevUpdateTestBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevUpdateTestBatch.groovy index 50ec412b8..671266e38 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevUpdateTestBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevUpdateTestBatch.groovy @@ -33,8 +33,8 @@ class DevUpdateTestBatch { static main(args) { def task = new DevUpdateTestBatch() def path = "D:\\数据\\数据建设\\开发区\\开发区-园区.xlsx"//开发区-园区.xlsx -// task.addDev(path) - task.addDevAddress(path) + task.addDev(path) +// task.addDevAddress(path) // // task.updateHasGov("新疆维吾尔自治区","喀什地区","麦盖提县", "麦盖提镇", "是") diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/village/GuangDaVillage.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/village/GuangDaVillage.groovy index 13470de95..a064f1913 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/village/GuangDaVillage.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/village/GuangDaVillage.groovy @@ -10,9 +10,9 @@ class GuangDaVillage { } def run(){ - ExcelUtils.multiThreadingModify("D:\\数据\\光大\\公开数据信息补充v3.xlsx",{ d-> + ExcelUtils.multiThreadingModify("D:\\数据\\光大\\公开数据地址情况.xlsx",{ d-> - if(!d['R']){ + if(!d['R'] && d['A']){ def dto = OpenApiUtils.addrVerifyGuangda(null, d['A']) if(dto){ // def dto = jsonObj.result