Merge remote-tracking branch 'origin/script_gj' into script_gj
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.fangjia.script.ccbevaluation
|
||||
|
||||
import com.fangjia.script.util.DateUtils
|
||||
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
@@ -9,7 +9,7 @@ import com.mongodb.DBCollection
|
||||
* 深圳公众号成交数据录入
|
||||
*/
|
||||
|
||||
def datas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\成交\\深圳8月成交数据.xlsx", 0, 1)
|
||||
def datas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\成交\\深圳9月份成交数据.xlsx", 0, 1)
|
||||
|
||||
def lineUrl = "mongodb://developer:G00IDCDEV12385@mongo.db.fangjia.com:28017";
|
||||
DBCollection DEAL_PRICE_COLL = MongoUtils.getCollectionByName2("fangjia", "deal_price", lineUrl)
|
||||
|
||||
@@ -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");
|
||||
@@ -830,9 +847,28 @@ class OpenApiUtils {
|
||||
}
|
||||
|
||||
|
||||
static def addrVerifyShBank(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/addrSvc/boscEnterpriseVillageIdentify?address=${address}&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.code ==200 && doc.result){
|
||||
def dtos = doc.result
|
||||
return dtos
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
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://192.168.0.100:32080/FangJiaAddressService/enterpriseVillageIdentify?address=${address}"
|
||||
// def url = "http://localhost:8080/fangjia-open/addrSvc/njcbVillageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
if(city){
|
||||
url = url + "&city=${city}"
|
||||
|
||||
+2
-2
@@ -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("新疆维吾尔自治区","喀什地区","麦盖提县", "麦盖提镇", "是")
|
||||
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.fangjia.script.gj.village
|
||||
|
||||
import com.fangjia.script.gj.OpenApiUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
class KunlunVillage {
|
||||
static main(args) {
|
||||
def task = new KunlunVillage();
|
||||
task.run()
|
||||
}
|
||||
|
||||
def run(){
|
||||
ExcelUtils.multiThreadingModify("D:\\数据\\昆仑\\3987户需批量更新涉农信息明细-20251023-结果.xlsx",{ d->
|
||||
|
||||
if(!d['R'] && d['B']){
|
||||
def dto = OpenApiUtils.addrVerifyGuangda(null, d['B'])
|
||||
if(dto){
|
||||
// def dto = jsonObj.result
|
||||
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; //县政府所在镇
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.fangjia.script.gj.village
|
||||
|
||||
import com.fangjia.script.gj.OpenApiUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
class ShBank {
|
||||
static main(args) {
|
||||
def task = new ShBank();
|
||||
task.run()
|
||||
}
|
||||
|
||||
def run(){
|
||||
ExcelUtils.multiThreadingModify("D:\\数据\\上海银行\\上海银行新逻辑的测试案例.xls",{ d->
|
||||
|
||||
if(!d['R'] && d['B']){
|
||||
def dto = OpenApiUtils.addrVerifyShBank(null, d['B'])
|
||||
if(dto){
|
||||
// def dto = jsonObj.result
|
||||
d['E'] = dto.addrArea //所属区域 农村区域 城市区域 县城城区(对公)
|
||||
d['F'] = dto.remark
|
||||
|
||||
d['G'] = dto.province
|
||||
d['H'] = dto.provinceCode
|
||||
d['I'] = dto.city
|
||||
d['J'] = dto.cityCode;
|
||||
d['K'] = dto.district
|
||||
d['L'] = dto.districtCode
|
||||
d['M'] = dto.town
|
||||
d['N'] = dto.townCode
|
||||
// d['N'] = dto.committee
|
||||
// d['O'] = dto.committeeCode
|
||||
// d['P'] = dto.typeCode
|
||||
// d['Q'] = dto.typeName
|
||||
d['O'] = dto.verifyFlag//涉农标识
|
||||
d['P'] = dto.addrVerify//地址是否有效信息
|
||||
d['Q'] = dto.countyLevelCity//是否为县级市
|
||||
d['R'] = dto.countyGov//是否为县政府
|
||||
d['S'] = dto.devDistrict//是否为开发区
|
||||
d['T'] = dto.devDistrictName//开发区
|
||||
d['U'] = dto.devLevel//开发区等级
|
||||
d['V']= dto.administrativeTowns;//是否市辖建制
|
||||
d['W'] = dto.prefectureLevelOrAbove ;// 是否为地级市以上行政区划
|
||||
d['X'] = dto.countyGovTown; //县政府所在镇
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
+48
@@ -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; //县政府所在镇
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.fangjia.script.gj.village
|
||||
|
||||
import com.fangjia.script.gj.OpenApiUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
class XiamenVillage {
|
||||
static main(args) {
|
||||
def task = new XiamenVillage();
|
||||
task.run()
|
||||
}
|
||||
|
||||
def run(){
|
||||
ExcelUtils.multiThreadingModify("D:\\数据\\厦门\\涉农组织类型判定(to估家,2025-09-30)-结果.xlsx",{ d->
|
||||
|
||||
if(!d['R']){
|
||||
def dto = OpenApiUtils.addrVerifyXiameng(null, d['B'], 2)
|
||||
if(dto){
|
||||
// def dto = jsonObj.result
|
||||
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; //县政府所在镇
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
+76
-3
@@ -3,13 +3,12 @@ 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 com.fangjia.script.util.OpenApiClient
|
||||
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
/**
|
||||
* Created by gaojuan on 2017/12/7.
|
||||
*/
|
||||
@@ -20,7 +19,11 @@ class TestEvaluation {
|
||||
// task.run();
|
||||
|
||||
// task.match()
|
||||
task.houseSimilar()
|
||||
// task.houseSimilar()
|
||||
task.newMatch()
|
||||
// task.houseSimilar()
|
||||
|
||||
task.newAndOldMatch()
|
||||
}
|
||||
|
||||
def houseSimilar(){
|
||||
@@ -91,6 +94,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){
|
||||
@@ -133,4 +155,55 @@ class TestEvaluation {
|
||||
println s
|
||||
}
|
||||
|
||||
def newAndOldMatch(){
|
||||
ExcelUtils.multiThreadingModify("D:\\数据\\估值\\地址估价-匹配(加写字楼-商铺).xlsx",{d->
|
||||
if(d['A']){
|
||||
def address = d['A']
|
||||
def city = '上海'
|
||||
if(!d['B']){
|
||||
def jsonObject = FangjiaClientUtils.newMatch(city, address, "property", false)
|
||||
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")
|
||||
}else{
|
||||
jsonObject = FangjiaClientUtils.newMatch(city, address, "property", 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!d['G']){
|
||||
def jsonObject2 = OpenApiClient.addressMatch(city, address, "shop", false, null, null)
|
||||
if(jsonObject2 != null && jsonObject2.precise!=-1) {
|
||||
d['G'] = jsonObject2.get("id")
|
||||
d['H'] = jsonObject2.get("city")
|
||||
d['I'] = jsonObject2.get("district")
|
||||
d['J'] = jsonObject2.get("name")
|
||||
d['K'] = jsonObject2.get("propertyType")
|
||||
}
|
||||
// else{
|
||||
// jsonObject2 = OpenApiClient.addressMatch(city, address, "property", true, null, null)
|
||||
// if(jsonObject2 != null && jsonObject2.precise!=-1) {
|
||||
// d['F'] = jsonObject2.get("id")
|
||||
// d['G'] = jsonObject2.get("city")+"(地图)"
|
||||
// d['H'] = jsonObject2.get("district")
|
||||
// d['I'] = jsonObject2.get("name")
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user