This commit is contained in:
2025-11-03 10:04:36 +08:00
parent 1dba82bb74
commit 50c91f98e7
4 changed files with 87 additions and 4 deletions
@@ -810,6 +810,23 @@ class OpenApiUtils {
return null;
}
static def addrVerifyShBank(city, address){
address = URLEncoder.encode(address, "utf-8");
def url = "http://192.168.0.100:32080/FangJiaAddressService/boscEnterpriseVillageIdentify?address=${address}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
// 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;
}
static def addrVerifyGuangda(city, address){
address = URLEncoder.encode(address, "utf-8");
@@ -1,4 +1,4 @@
package com.fangjia.script.gj.village.ailiyun
package com.fangjia.script.gj.village
import com.fangjia.script.gj.OpenApiUtils
import com.fangjia.script.util.ExcelUtils
@@ -0,0 +1,48 @@
package com.fangjia.script.gj.village
import com.fangjia.script.gj.OpenApiUtils
import com.fangjia.script.util.ExcelUtils
class ShBankVillage {
static main(args) {
def task = new ShBankVillage();
task.run()
}
def run(){
ExcelUtils.multiThreadingModify("D:\\数据\\上海银行\\内部测试数据.xlsx", { d ->
if (!d['R'] && d['B']) {
def dto = OpenApiUtils.addrVerifyShBank(null, d['B'])
if (dto) {
// def dto = jsonObj.result
d['E'] = dto.remark
d['F'] = dto.province
d['G'] = dto.provinceCode
d['H'] = dto.city
d['I'] = dto.cityCode;
d['J'] = dto.district
d['K'] = dto.districtCode
d['L'] = dto.town
d['M'] = dto.townCode
d['N'] = dto.committee
d['O'] = dto.committeeCode
d['P'] = dto.typeCode
d['Q'] = dto.typeName
d['R'] = dto.verifyFlag//涉农标识
d['S'] = dto.addrVerify//地址是否有效信息
d['T'] = dto.countyLevelCity//是否为县级市
d['U'] = dto.countyGov//是否为县政府
d['V'] = dto.addrArea //所属区域 农村区域 城市区域 县城城区(对公)
d['W'] = dto.devDistrict//是否为开发区
d['X'] = dto.devDistrictName//开发区
d['Y'] = dto.devLevel//开发区等级
d['Z'] = dto.administrativeTowns;//是否市辖建制
d['AA'] = dto.prefectureLevelOrAbove;// 是否为地级市以上行政区划
d['AB'] = dto.countyGovTown; //县政府所在镇
}
}
})
}
}
@@ -3,13 +3,11 @@ package com.fangjia.script.jiangnanblank
import com.fangjia.core.util.HttpRequest
import com.fangjia.script.ccbevaluation.CcbCommonUtils
import com.fangjia.script.commData.CommonDatautils
import com.fangjia.script.gj.ccb.CcbCodeUtils
import com.fangjia.script.gj.district.FangjiaClientUtils
import com.fangjia.script.util.ExcelUtils
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
/**
* Created by gaojuan on 2017/12/7.
*/
@@ -20,7 +18,8 @@ class TestEvaluation {
// task.run();
// task.match()
task.houseSimilar()
// task.houseSimilar()
task.newMatch()
}
def houseSimilar(){
@@ -91,6 +90,25 @@ class TestEvaluation {
}
def newMatch(){
ExcelUtils.multiThreadingModify("D:\\数据\\估值\\地址估价-匹配(加写字楼-商铺) - v2.xlsx", { d ->
def city = "上海"
def address = d['A']
if(!d['B'] && address){
def jsonObject = FangjiaClientUtils.newMatch(city, address, "", true)
if (jsonObject) {
d['B'] = jsonObject.get("id")
d['C'] = jsonObject.get("city")
d['D'] = jsonObject.get("district")
d['E'] = jsonObject.get("name")
d['F'] = jsonObject.get("propertyType")?jsonObject.get("propertyType"):jsonObject.get("category")
d['G'] = jsonObject.get("credit")
}
}
});
}
def run(){
def citys = CommonDatautils.findAllCity();
for(def city :citys){