update
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ import com.mongodb.DBCollection
|
||||
* 深圳公众号成交数据录入
|
||||
*/
|
||||
|
||||
def datas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\成交\\深圳7月成交.xlsx", 0, 1)
|
||||
def datas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\成交\\深圳8月成交数据.xlsx", 0, 1)
|
||||
|
||||
def lineUrl = "mongodb://developer:G00IDCDEV12385@mongo.db.fangjia.com:28017";
|
||||
DBCollection DEAL_PRICE_COLL = MongoUtils.getCollectionByName2("fangjia", "deal_price", lineUrl)
|
||||
|
||||
@@ -778,6 +778,26 @@ class OpenApiUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
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://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"
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.fangjia.script.gj.village
|
||||
|
||||
import com.fangjia.script.gj.OpenApiUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
class GuangDaVillage {
|
||||
static main(args) {
|
||||
def task = new GuangDaVillage();
|
||||
task.run()
|
||||
}
|
||||
|
||||
def run(){
|
||||
ExcelUtils.multiThreadingModify("D:\\数据\\光大\\公开数据信息补充v3.xlsx",{ d->
|
||||
|
||||
if(!d['R']){
|
||||
def dto = OpenApiUtils.addrVerifyGuangda(null, d['A'])
|
||||
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; //县政府所在镇
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user