update
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
|
|
||||||
//添加自己库中的人工指导价
|
//添加自己库中的人工指导价
|
||||||
def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-1", "2022-02-1")
|
def prices = CcbCommonUtils.findPersonPrice(city, "2022-02-1", "2022-03-1")
|
||||||
if(prices){
|
if(prices){
|
||||||
def distMap = getDistrictMap(city)
|
def distMap = getDistrictMap(city)
|
||||||
def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices)
|
def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices)
|
||||||
|
|||||||
+3
-3
@@ -22,9 +22,9 @@ import java.util.concurrent.ConcurrentHashMap
|
|||||||
@BatchOwner(Watcher.GaoJuan)
|
@BatchOwner(Watcher.GaoJuan)
|
||||||
class ThirdPartyPriceBatch extends BaseBatch {
|
class ThirdPartyPriceBatch extends BaseBatch {
|
||||||
|
|
||||||
def sDate= 202112//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
def sDate= 202201//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||||
def startDate = 202110
|
def startDate = 202111
|
||||||
def endDate = 202112
|
def endDate = 202201
|
||||||
def curDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -6, "yyyyMM"));
|
def curDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -6, "yyyyMM"));
|
||||||
|
|
||||||
static final DBCollection AVERAGE_STATISTICS = MongoUtils.getCollectionByName("fangjia", "average_statistics", "192.168.0.43")
|
static final DBCollection AVERAGE_STATISTICS = MongoUtils.getCollectionByName("fangjia", "average_statistics", "192.168.0.43")
|
||||||
|
|||||||
+8
-8
@@ -39,8 +39,8 @@ class TradeStatLog {
|
|||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new TradeStatLog()
|
def task = new TradeStatLog()
|
||||||
// task.run()//统计最近3个月抓取的成交数据量
|
task.run()//统计最近3个月抓取的成交数据量
|
||||||
task.exportTrade()//导出未入库成交
|
// task.exportTrade()//导出未入库成交
|
||||||
// task.thirdPartyStat()
|
// task.thirdPartyStat()
|
||||||
// println Calendar.getInstance().get(Calendar.YEAR)
|
// println Calendar.getInstance().get(Calendar.YEAR)
|
||||||
// task.averageStat()
|
// task.averageStat()
|
||||||
@@ -73,13 +73,13 @@ class TradeStatLog {
|
|||||||
def run(){
|
def run(){
|
||||||
def citys = CcbCommonUtils.citys;
|
def citys = CcbCommonUtils.citys;
|
||||||
def rets = []
|
def rets = []
|
||||||
rets << ["城市","10月总量","11月总量","12月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
rets << ["城市","11月总量","12月总量","1月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
||||||
def sources = ["贝壳找房","链家在线", "我爱我家","房天下","中原地产"]
|
def sources = ["贝壳找房","链家在线", "我爱我家","房天下","中原地产"]
|
||||||
//def startDate = "2021-05-01"
|
//def startDate = "2021-05-01"
|
||||||
def startDate = "2021-10-01"
|
def startDate = "2021-11-01"
|
||||||
def date = "2021-11-01"
|
def date = "2021-12-01"
|
||||||
def endDate = "2021-12-01"
|
def endDate = "2022-01-01"
|
||||||
def newDate = "2022-01-01"
|
def newDate = "2022-02-01"
|
||||||
|
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
||||||
@@ -129,7 +129,7 @@ class TradeStatLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ExcelUtils.write("D:\\数据\\建行\\房产估值\\成交\\12月成交统计.xlsx", rets, "数据")
|
ExcelUtils.write("D:\\数据\\建行\\房产估值\\成交\\2022-01成交统计.xlsx", rets, "数据")
|
||||||
println "表格生成完成"
|
println "表格生成完成"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+82
-1
@@ -12,9 +12,90 @@ import com.fangjia.core.util.BaiDuApiUtils
|
|||||||
class DistrictMarge {
|
class DistrictMarge {
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new DistrictMarge()
|
def task = new DistrictMarge()
|
||||||
task.run()
|
//task.run()
|
||||||
|
task.repeatAddress()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def repeatAddress(){
|
||||||
|
def citys = CommonDatautils.findAllCity()
|
||||||
|
for(def c : citys){
|
||||||
|
def districts = CommonDatautils.findAllDistrictByCity(c, "district", ["city", "region", "name", "lng","address","name_cat"])
|
||||||
|
findRepead(c, districts)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
def findRepead(city, districts){
|
||||||
|
def map = [:]
|
||||||
|
for(def d : districts){
|
||||||
|
if(d.name_cat == 0 && d.lng){
|
||||||
|
if(d.address && d.address.contains("号")){
|
||||||
|
def list = map.get(d.address)
|
||||||
|
if(!list){
|
||||||
|
list = []
|
||||||
|
map.put(d.address, list)
|
||||||
|
}
|
||||||
|
list << d
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def newMap = [:]
|
||||||
|
map.each {k,vals->
|
||||||
|
if(vals.size()>=2){
|
||||||
|
vals.sort{o1,o2->
|
||||||
|
return o1.name.size() <=> o2.name.size()
|
||||||
|
}
|
||||||
|
newMap.put(k,vals)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
newMap.each {k,vals->
|
||||||
|
def names = []
|
||||||
|
for(def d : vals){
|
||||||
|
def newKey = d.name
|
||||||
|
if(d.name.contains("小区")){
|
||||||
|
newKey = d.name.toString().replace("小区", "")
|
||||||
|
}
|
||||||
|
if(!names.contains(newKey)){
|
||||||
|
names << newKey
|
||||||
|
}else{
|
||||||
|
d.flag = "删除"
|
||||||
|
def udata = new BasicDBObject()
|
||||||
|
udata.put("name_cat", 11)
|
||||||
|
udata.put("m_date",new Date())
|
||||||
|
|
||||||
|
def q = new BasicDBObject()
|
||||||
|
q.put("_id", new ObjectId( d._id.toString()))
|
||||||
|
DbUtils.seaweed.update(q, new BasicDBObject('$set', udata))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def values = newMap.values()
|
||||||
|
def allRets = []
|
||||||
|
for(def list : values){
|
||||||
|
allRets.addAll(list)
|
||||||
|
}
|
||||||
|
def results = []
|
||||||
|
def delcount = 0
|
||||||
|
for(def r : allRets){
|
||||||
|
def rows = []
|
||||||
|
rows << r._id.toString()
|
||||||
|
rows << r.city
|
||||||
|
rows << r.name
|
||||||
|
rows << r.address
|
||||||
|
rows << r.name_cat
|
||||||
|
if(r.flag){
|
||||||
|
rows << r.flag
|
||||||
|
delcount++
|
||||||
|
}
|
||||||
|
results << rows
|
||||||
|
}
|
||||||
|
// ExcelUtils.write("d:\\数据\\小区\\删除重复地址(${city}).xlsx", results, "sheet")
|
||||||
|
println "${city} 共:"+map.size()+" 2个以上:"+newMap.size()+" delcount:"+delcount
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def run(){
|
def run(){
|
||||||
def rets = getDatas()
|
def rets = getDatas()
|
||||||
def deleteIndex = 0
|
def deleteIndex = 0
|
||||||
|
|||||||
+35
-15
@@ -433,23 +433,43 @@ def city = "
|
|||||||
// }
|
// }
|
||||||
//})
|
//})
|
||||||
|
|
||||||
def index = 0
|
//def index = 0
|
||||||
ExcelUtils.modify("D:\\数据\\建行\\房产估值\\小区\\漏映射别名.xlsx", { d ->
|
//ExcelUtils.modify("D:\\数据\\建行\\房产估值\\小区\\漏映射别名.xlsx", { d ->
|
||||||
if (d['B']) {
|
// if (d['B']) {
|
||||||
def dist = CommonDatautils.findDistrictFieldById(d['B'],["city","region","name","mapping_alias"])
|
// def dist = CommonDatautils.findDistrictFieldById(d['B'],["city","region","name","mapping_alias"])
|
||||||
|
// if(dist){
|
||||||
|
// def alias = dist.mapping_alias
|
||||||
|
// if(!alias){
|
||||||
|
// alias = []
|
||||||
|
// }
|
||||||
|
// if(alias && !alias.contains(d['C'])){
|
||||||
|
// index++
|
||||||
|
// println index
|
||||||
|
// alias << d['C']
|
||||||
|
// def udata = new BasicDBObject()
|
||||||
|
// udata.put("mapping_alias",alias)
|
||||||
|
// DbUtils.seaweed.update(new BasicDBObject("_id", dist._id), new BasicDBObject('$set', udata))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//})
|
||||||
|
|
||||||
|
ExcelUtils.modify("D:\\数据\\小区\\评级小区.xls", { d ->
|
||||||
|
if(d['A']){
|
||||||
|
try{
|
||||||
|
def dist = CommonDatautils.findDistrictFieldById(d['A'],["city","region","name"])
|
||||||
if(dist){
|
if(dist){
|
||||||
def alias = dist.mapping_alias
|
d['B'] = dist.city
|
||||||
if(!alias){
|
d['C'] = dist.region
|
||||||
alias = []
|
d['D'] = dist.name
|
||||||
}
|
|
||||||
if(alias && !alias.contains(d['C'])){
|
def price = CommonDatautils.queryDistrictPrice(dist.city, dist.region, dist.name)
|
||||||
index++
|
d['E'] = price
|
||||||
println index
|
|
||||||
alias << d['C']
|
|
||||||
def udata = new BasicDBObject()
|
|
||||||
udata.put("mapping_alias",alias)
|
|
||||||
DbUtils.seaweed.update(new BasicDBObject("_id", dist._id), new BasicDBObject('$set', udata))
|
|
||||||
}
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
println d['A']
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
+1
-1
@@ -218,7 +218,7 @@ class CommonDatautils {
|
|||||||
q.put("visible", 0);
|
q.put("visible", 0);
|
||||||
q.put("cat", cat);
|
q.put("cat", cat);
|
||||||
q.put("city", city);
|
q.put("city", city);
|
||||||
// q.put("name","金辉伯爵山")
|
// q.put("name","玉泉路甲46号院")
|
||||||
|
|
||||||
DBObject keys = new BasicDBObject();
|
DBObject keys = new BasicDBObject();
|
||||||
if(fields){
|
if(fields){
|
||||||
|
|||||||
+2
-2
@@ -53,7 +53,7 @@ class FzDataResultStat {
|
|||||||
}
|
}
|
||||||
rows << [keys[0], keys[1], keys[2], v.toString(), lastPrice.toString(), markup]
|
rows << [keys[0], keys[1], keys[2], v.toString(), lastPrice.toString(), markup]
|
||||||
}
|
}
|
||||||
//ExcelUtils.write("D:\\数据\\福州\\价格比对_${curMonth}.xlsx", rows, "数据")
|
ExcelUtils.write("D:\\数据\\福州\\价格比对_${curMonth}.xlsx", rows, "数据")
|
||||||
|
|
||||||
|
|
||||||
def regions = ["鼓楼","仓山","台江","晋安","马尾","长乐"];
|
def regions = ["鼓楼","仓山","台江","晋安","马尾","长乐"];
|
||||||
@@ -94,7 +94,7 @@ class FzDataResultStat {
|
|||||||
}
|
}
|
||||||
def prices = exportRegion(city, months)
|
def prices = exportRegion(city, months)
|
||||||
def curMonth = DateUtils.formatDateByPattern(new Date(), "yyyy-MM")
|
def curMonth = DateUtils.formatDateByPattern(new Date(), "yyyy-MM")
|
||||||
ExcelUtils.write("D:\\数据\\福州\\区域均价半年走势_${curMonth}.xlsx", prices, "数据")
|
ExcelUtils.write("D:\\数据\\福州\\福州6区均价半年走势_${curMonth}.xlsx", prices, "数据")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.mongodb.DBCollection
|
|||||||
//福州第三方均价统计,发送钉钉消息
|
//福州第三方均价统计,发送钉钉消息
|
||||||
//def datas = ExcelUtils.read("d:\\数据\\福州\\福州4月2.xlsx",0,1)
|
//def datas = ExcelUtils.read("d:\\数据\\福州\\福州4月2.xlsx",0,1)
|
||||||
//def datas = CsvUtils.read("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202105.csv");
|
//def datas = CsvUtils.read("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202105.csv");
|
||||||
def datas = readTxt("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202112.csv")
|
def datas = readTxt("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202201.csv")
|
||||||
def count0 = 0
|
def count0 = 0
|
||||||
def count1 = 0
|
def count1 = 0
|
||||||
def count2 = 0
|
def count2 = 0
|
||||||
|
|||||||
+5
-2
@@ -143,8 +143,8 @@ class ThirdPriceExportBatch extends BaseBatch{
|
|||||||
if(!retMap.zhugezhaofang_esf_price && d.zhugezhaofang_esf_price){
|
if(!retMap.zhugezhaofang_esf_price && d.zhugezhaofang_esf_price){
|
||||||
retMap.zhugezhaofang_esf_price = d.zhugezhaofang_esf_price
|
retMap.zhugezhaofang_esf_price = d.zhugezhaofang_esf_price
|
||||||
}
|
}
|
||||||
if(!retMap.anjuke_esf_price && d.anjuke_esf_price){
|
if(!retMap.anjuke_esf_price && d.get("58tc_esf_price")){
|
||||||
retMap.anjuke_esf_price = d.anjuke_esf_price
|
retMap.anjuke_esf_price = d.get("58tc_esf_price")
|
||||||
}
|
}
|
||||||
if(!retMap.soufang_esf_price && d.soufang_esf_price){
|
if(!retMap.soufang_esf_price && d.soufang_esf_price){
|
||||||
retMap.soufang_esf_price = d.soufang_esf_price
|
retMap.soufang_esf_price = d.soufang_esf_price
|
||||||
@@ -152,6 +152,9 @@ class ThirdPriceExportBatch extends BaseBatch{
|
|||||||
if(!retMap.lianjia_esf_price && d.lianjia_esf_price){
|
if(!retMap.lianjia_esf_price && d.lianjia_esf_price){
|
||||||
retMap.lianjia_esf_price = d.lianjia_esf_price
|
retMap.lianjia_esf_price = d.lianjia_esf_price
|
||||||
}
|
}
|
||||||
|
if(!retMap.lianjia_esf_price && d.beike_esf_price){
|
||||||
|
retMap.lianjia_esf_price = d.beike_esf_price
|
||||||
|
}
|
||||||
|
|
||||||
if(!retMap.cityhouse_esf_price && d.cityhouse_esf_price){
|
if(!retMap.cityhouse_esf_price && d.cityhouse_esf_price){
|
||||||
retMap.cityhouse_esf_price = d.cityhouse_esf_price
|
retMap.cityhouse_esf_price = d.cityhouse_esf_price
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class EsHouseStat {
|
|||||||
|
|
||||||
public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
def task = new EsHouseStat();
|
def task = new EsHouseStat();
|
||||||
//task.run();
|
task.run();
|
||||||
// task.testRun("深圳")
|
// task.testRun("深圳")
|
||||||
// task.exportOpenLog();
|
// task.exportOpenLog();
|
||||||
// task.exportMongoLog()
|
// task.exportMongoLog()
|
||||||
@@ -59,7 +59,7 @@ class EsHouseStat {
|
|||||||
// task.szRentHouseStat();
|
// task.szRentHouseStat();
|
||||||
// task.addPrice();
|
// task.addPrice();
|
||||||
|
|
||||||
task.statNoHouseCCBData();
|
// task.statNoHouseCCBData();
|
||||||
}
|
}
|
||||||
|
|
||||||
def addPrice(){
|
def addPrice(){
|
||||||
@@ -337,21 +337,6 @@ class EsHouseStat {
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
def findHouse(def city, def startDate, def endDate){
|
|
||||||
final StringBuffer sqlBuffer = new StringBuffer()
|
|
||||||
sqlBuffer.append("SELECT count(*) as count FROM \"seawater-20*\" WHERE 1=1")
|
|
||||||
sqlBuffer.append(" and city = '"+city+"'")
|
|
||||||
sqlBuffer.append(" and cat = 'sell'")
|
|
||||||
sqlBuffer.append(" and p_date >="+startDate).append(" and p_date <"+endDate);
|
|
||||||
ResultSet rs = dataSource.connection.createStatement().executeQuery(sqlBuffer.toString())
|
|
||||||
def total = 0;
|
|
||||||
while (rs.next()){
|
|
||||||
total = rs.getInt("count")
|
|
||||||
}
|
|
||||||
return total;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def findHouseSource(def city, def startDate, def endDate){
|
def findHouseSource(def city, def startDate, def endDate){
|
||||||
final StringBuffer sqlBuffer = new StringBuffer()
|
final StringBuffer sqlBuffer = new StringBuffer()
|
||||||
sqlBuffer.append("SELECT * FROM \"seawater-20*\" WHERE 1=1")
|
sqlBuffer.append("SELECT * FROM \"seawater-20*\" WHERE 1=1")
|
||||||
@@ -373,6 +358,21 @@ class EsHouseStat {
|
|||||||
return statMap;
|
return statMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def findHouse(def city, def startDate, def endDate){
|
||||||
|
final StringBuffer sqlBuffer = new StringBuffer()
|
||||||
|
sqlBuffer.append("SELECT count(*) as count FROM \"seawater-20*\" WHERE 1=1")
|
||||||
|
sqlBuffer.append(" and city = '"+city+"'")
|
||||||
|
sqlBuffer.append(" and cat = 'sell'")
|
||||||
|
sqlBuffer.append(" and p_date >="+startDate).append(" and p_date <"+endDate);
|
||||||
|
ResultSet rs = dataSource.connection.createStatement().executeQuery(sqlBuffer.toString())
|
||||||
|
def total = 0;
|
||||||
|
while (rs.next()){
|
||||||
|
total = rs.getInt("count")
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
def testRun(def city){
|
def testRun(def city){
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ class OpenApiUtils {
|
|||||||
ret.lng2 = gmap.get("lng")
|
ret.lng2 = gmap.get("lng")
|
||||||
ret.lat2 = gmap.get("lat")
|
ret.lat2 = gmap.get("lat")
|
||||||
ret.estateType = ret.type
|
ret.estateType = ret.type
|
||||||
|
ret.source = "高德"
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -250,14 +251,14 @@ class OpenApiUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(type && type.contains("出入口")){
|
if(type && type.contains("出入口")){
|
||||||
println "X 高德地图:【"+jo_item.getString("cityname")+"-"+jo_item.getString("pname")+"-"+jo_item.getString("name")+"-"+jo_item.getString("address")+"】" +" 搜索:【"+city+"-"+address+"】-${type}"
|
println "X 高德地图:【"+jo_item.getString("cityname")+"-"+jo_item.getString("adname")+"-"+jo_item.getString("name")+"-"+jo_item.getString("address")+"】" +" 搜索:【"+city+"-"+address+"】-${type}"
|
||||||
}else{
|
}else{
|
||||||
println "√高德地图:【"+jo_item.getString("cityname")+"-"+jo_item.getString("pname")+"-"+jo_item.getString("name")+"-"+jo_item.getString("address")+"】" +" 搜索:【"+city+"-"+address+"】"
|
println "√高德地图:【"+jo_item.getString("cityname")+"-"+jo_item.getString("adname")+"-"+jo_item.getString("name")+"-"+jo_item.getString("address")+"】" +" 搜索:【"+city+"-"+address+"】"
|
||||||
poiList.add(jo);
|
poiList.add(jo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
println "X 高德地图:【"+jo_item.getString("cityname")+"-"+jo_item.getString("pname")+"-"+jo_item.getString("name")+"-"+jo_item.getString("address")+"】" +" 搜索:【"+city+"-"+address+"】"
|
println "X 高德地图:【"+jo_item.getString("cityname")+"-"+jo_item.getString("adname")+"-"+jo_item.getString("name")+"-"+jo_item.getString("address")+"】" +" 搜索:【"+city+"-"+address+"】"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@@ -302,7 +303,7 @@ class OpenApiUtils {
|
|||||||
def distname = formatName(ret.get("name"))
|
def distname = formatName(ret.get("name"))
|
||||||
address = ret.get("address")
|
address = ret.get("address")
|
||||||
if((distname && distname.contains(name)) || (distname && name.contains(distname)) || (address && address.contains(name)) || ( address && name.contains(address))){
|
if((distname && distname.contains(name)) || (distname && name.contains(distname)) || (address && address.contains(name)) || ( address && name.contains(address))){
|
||||||
if(ret.get("area") && (region.contains(ret.get("area")) || ret.get("area").contains(region))){
|
// if(ret.get("area") && (region.contains(ret.get("area")) || ret.get("area").contains(region))){
|
||||||
lng2 = location.lng
|
lng2 = location.lng
|
||||||
lat2 = location.lat
|
lat2 = location.lat
|
||||||
def gmap = GeocodeUtils.geoconvBaiduToGoogle(lng2, lat2)
|
def gmap = GeocodeUtils.geoconvBaiduToGoogle(lng2, lat2)
|
||||||
@@ -311,7 +312,7 @@ class OpenApiUtils {
|
|||||||
def mapRegion = ret.get("area")
|
def mapRegion = ret.get("area")
|
||||||
distRegion = mapRegion
|
distRegion = mapRegion
|
||||||
districtName = distname
|
districtName = distname
|
||||||
if(address && address.contains(mapRegion)){
|
if(address && mapRegion && address.contains(mapRegion)){
|
||||||
address = address.substring(address.indexOf(mapRegion)+mapRegion.size());
|
address = address.substring(address.indexOf(mapRegion)+mapRegion.size());
|
||||||
}
|
}
|
||||||
if(ret.get("detail_info")){
|
if(ret.get("detail_info")){
|
||||||
@@ -330,6 +331,7 @@ class OpenApiUtils {
|
|||||||
map.name = districtName
|
map.name = districtName
|
||||||
map.region = distRegion
|
map.region = distRegion
|
||||||
map.estateType = estateType
|
map.estateType = estateType
|
||||||
|
map.source = "百度"
|
||||||
rets << map
|
rets << map
|
||||||
|
|
||||||
lat = null
|
lat = null
|
||||||
@@ -340,12 +342,18 @@ class OpenApiUtils {
|
|||||||
println "√百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+address+"】" +" DB:【"+city+"-"+region+"-"+name+"】"
|
println "√百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+address+"】" +" DB:【"+city+"-"+region+"-"+name+"】"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
// println "X百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+ret.get("address")+"】" +" DB:【"+city+"-"+region+"-"+name+"】"
|
||||||
|
// }
|
||||||
}else{
|
}else{
|
||||||
println "X百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+ret.get("address")+"】" +" DB:【"+city+"-"+region+"-"+name+"】"
|
def score1 = 0
|
||||||
|
if(distname && name){
|
||||||
|
score1 = CosineSimilarAlgorithm.getSimilarityRatio(distname, name);
|
||||||
|
}
|
||||||
|
def score2 = 0
|
||||||
|
if(address && name){
|
||||||
|
score2 = CosineSimilarAlgorithm.getSimilarityRatio(address, name);
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
def score1 = CosineSimilarAlgorithm.getSimilarityRatio(distname, name);
|
|
||||||
def score2 = CosineSimilarAlgorithm.getSimilarityRatio(address, name);
|
|
||||||
if(score1 || score2){
|
if(score1 || score2){
|
||||||
rets << map
|
rets << map
|
||||||
println "√百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+address+"】" +" DB:【"+city+"-"+region+"-"+name+"】(score:"+score1+"#"+score2+")"
|
println "√百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+address+"】" +" DB:【"+city+"-"+region+"-"+name+"】(score:"+score1+"#"+score2+")"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class RegionPointCrawl {
|
|||||||
//河北省、山西省、辽宁省、吉林省、黑龙江省、江苏省、浙江省、
|
//河北省、山西省、辽宁省、吉林省、黑龙江省、江苏省、浙江省、
|
||||||
// def provinces = ["安徽省","福建省","江西省","山东省","河南省","湖南省","广东省","海南省","四川省","贵州省","云南省","陕西省","甘肃省","青海省","台湾省","内蒙古自治区","广西壮族自治区","西藏自治区","宁夏回族自治区","新疆维吾尔自治区"]
|
// def provinces = ["安徽省","福建省","江西省","山东省","河南省","湖南省","广东省","海南省","四川省","贵州省","云南省","陕西省","甘肃省","青海省","台湾省","内蒙古自治区","广西壮族自治区","西藏自治区","宁夏回族自治区","新疆维吾尔自治区"]
|
||||||
//def provinces = ["河北省","山西省","辽宁省","吉林省","黑龙江省","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省","湖北省","湖南省","广东省","海南省","四川省","贵州省","云南省","陕西省","甘肃省","青海省","台湾省"]
|
//def provinces = ["河北省","山西省","辽宁省","吉林省","黑龙江省","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省","湖北省","湖南省","广东省","海南省","四川省","贵州省","云南省","陕西省","甘肃省","青海省","台湾省"]
|
||||||
def provinces = ["内蒙古自治区","广西壮族自治区","新疆维吾尔自治区"]
|
def provinces = ["福建省"]//"内蒙古自治区","广西壮族自治区","新疆维吾尔自治区"
|
||||||
for(def p : provinces){
|
for(def p : provinces){
|
||||||
task.crawlCityAndDistrictCode(p);
|
task.crawlCityAndDistrictCode(p);
|
||||||
task.run(p);
|
task.run(p);
|
||||||
|
|||||||
+34
-17
@@ -7,13 +7,17 @@ import com.fangjia.script.Watcher
|
|||||||
import com.fangjia.script.commData.CommonDatautils
|
import com.fangjia.script.commData.CommonDatautils
|
||||||
import com.fangjia.script.common.DataHandleUtils
|
import com.fangjia.script.common.DataHandleUtils
|
||||||
import com.fangjia.script.util.DateUtils
|
import com.fangjia.script.util.DateUtils
|
||||||
|
import com.fangjia.script.util.DbUtils
|
||||||
|
import com.fangjia.script.util.ExcelUtils
|
||||||
import com.fangjia.script.util.GeoHelper
|
import com.fangjia.script.util.GeoHelper
|
||||||
import com.mongodb.BasicDBObject
|
import com.mongodb.BasicDBObject
|
||||||
|
import org.bson.types.ObjectId
|
||||||
import org.elasticsearch.xpack.sql.jdbc.EsDataSource
|
import org.elasticsearch.xpack.sql.jdbc.EsDataSource
|
||||||
|
|
||||||
import java.sql.ResultSet
|
import java.sql.ResultSet
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
import com.fangjia.script.util.DbUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模糊地址经纬度更新
|
* 模糊地址经纬度更新
|
||||||
@@ -44,13 +48,16 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
void process(Object args) {
|
void process(Object args) {
|
||||||
//"北京","常州",
|
//"北京","常州",
|
||||||
// def citys =["无锡","重庆","东莞","中山","合肥","苏州","广州","深圳","佛山","长沙","韶关","惠州","清远","珠海","福州","厦门","龙岩","漳州","成都","天津","南京","青岛"] //CommonDatautils.findAllCity();
|
// def citys =["无锡","重庆","东莞","中山","合肥","苏州","广州","深圳","佛山","长沙","韶关","惠州","清远","珠海","福州","厦门","龙岩","漳州","成都","天津","南京","青岛"] //CommonDatautils.findAllCity();
|
||||||
def citys =["上海"] //CommonDatautils.findAllCity();
|
def citys =["北京"] //CommonDatautils.findAllCity();
|
||||||
|
//,"济南","青岛","烟台","威海","潍坊","淄博","临沂","泰安","菏泽","东营","德州","济宁","日照","聊城","滨州","枣庄"
|
||||||
|
//市谊大厦 华三新村 阳光家园
|
||||||
for (def city : citys) {
|
for (def city : citys) {
|
||||||
def districts = CommonDatautils.findAllDistricts(city, "district", ["city", "region", "name", "address", "lat2", "lat", "lng2", "lng"]);
|
def districts = CommonDatautils.findAllDistricts(city, "district", ["city", "region", "name", "address", "lat2", "lat", "lng2", "lng"]);
|
||||||
def rets = findVagueAddress(city, districts);
|
def rets = findVagueAddress(city, districts);
|
||||||
findAndUpdateLocation(rets);
|
findAndUpdateLocation(rets);
|
||||||
writeCSV(results, "d:\\数据\\结果\\" + city + "地址更新.csv")
|
// writeCSV(results, "d:\\数据\\结果\\" + city + "地址更新.csv")
|
||||||
|
writeCSV(results, "d:\\数据\\结果\\" + city + "地址模糊.csv")
|
||||||
|
// ExcelUtils.write("d:\\数据\\结果\\" + city + "地址模糊.xlsx", rets, "数据")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -58,6 +65,7 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
|
|
||||||
def findVagueAddress(def city, def districts) {
|
def findVagueAddress(def city, def districts) {
|
||||||
def rets = []
|
def rets = []
|
||||||
|
def rows = []
|
||||||
for (def district : districts) {
|
for (def district : districts) {
|
||||||
def address = district.address;
|
def address = district.address;
|
||||||
if (address) {
|
if (address) {
|
||||||
@@ -66,10 +74,13 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
//没地址
|
//没地址
|
||||||
if (!address) {
|
if (!address) {
|
||||||
rets << district;
|
rets << district;
|
||||||
|
|
||||||
|
// rows << [district.city, district.region, district.name, district.address]
|
||||||
println district.city + " " + district.name + " ******[" + district.address + "]******** 模糊地址"
|
println district.city + " " + district.name + " ******[" + district.address + "]******** 模糊地址"
|
||||||
} else {
|
} else {
|
||||||
if (!findPattern(address)) {
|
if (!findPattern(address)) {
|
||||||
rets << district;
|
rets << district;
|
||||||
|
// rows << [district.city, district.region, district.name, district.address]
|
||||||
println district.city + " " + district.name + " ******[" + district.address + "]******** 模糊地址"
|
println district.city + " " + district.name + " ******[" + district.address + "]******** 模糊地址"
|
||||||
} else {
|
} else {
|
||||||
println district.city + " " + district.address + " 精确地址"
|
println district.city + " " + district.address + " 精确地址"
|
||||||
@@ -97,7 +108,7 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
} else if (address.indexOf("路") == -1 && address.indexOf("街") == -1 && address.indexOf("大道") == -1 && address.indexOf("巷") == -1 && address.indexOf("北里") == -1 && address.indexOf("南里") == -1 && address.indexOf("东里") == -1 && address.indexOf("西里") == -1) {
|
} else if (address.indexOf("路") == -1 && address.indexOf("街") == -1 && address.indexOf("大道") == -1 && address.indexOf("巷") == -1 && address.indexOf("北里") == -1 && address.indexOf("南里") == -1 && address.indexOf("东里") == -1 && address.indexOf("西里") == -1) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
pattern = Pattern.compile("[路|街|大道|巷]\\d+");
|
pattern = Pattern.compile("[路甲|路|街|大道|巷|弄|里]\\d+");
|
||||||
matcher = pattern.matcher(address)
|
matcher = pattern.matcher(address)
|
||||||
if(matcher.find()){
|
if(matcher.find()){
|
||||||
return s;
|
return s;
|
||||||
@@ -123,16 +134,14 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
for (def ret : rets) {
|
for (def ret : rets) {
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if(ret.name!="药师新村"){
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
def locationMap = findLatAndLng(ret);
|
def locationMap = findLatAndLng(ret);
|
||||||
if (locationMap) {
|
if (locationMap) {
|
||||||
updateLocation(locationMap, ret);
|
updateLocation(locationMap, ret);
|
||||||
} else {
|
} else {
|
||||||
println "[没找到] " + ret.city + " " + ret.region + " " + ret.name + " " + ret.address
|
println "[没找到] " + ret.city + " " + ret.region + " " + ret.name + " " + ret.address
|
||||||
}
|
}
|
||||||
println "【${index}/${rets.size()}】************************************************************************************"
|
println "【${index}/${rets.size()}】**************【${ret.region}---${ret.name}----${ret.address}】**********************************************************************"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,14 +157,14 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
msgMap.db_lng2 = ret.lng2
|
msgMap.db_lng2 = ret.lng2
|
||||||
BasicDBObject udata = new BasicDBObject()
|
BasicDBObject udata = new BasicDBObject()
|
||||||
|
|
||||||
if (ret.lat2 != locationMap.lat2) {
|
if (ret.lat2 && ret.lat2 != locationMap.lat2) {
|
||||||
udata.put('lat2', locationMap.lat2)
|
|
||||||
udata.put('lng2', locationMap.lng2)
|
|
||||||
msgMap.m_lat2 = locationMap.lat2
|
msgMap.m_lat2 = locationMap.lat2
|
||||||
msgMap.m_lng2 = locationMap.lng2
|
msgMap.m_lng2 = locationMap.lng2
|
||||||
def distance = GeoHelper.GetDistance(ret.lat2, ret.lng2, locationMap.lat2, locationMap.lng2)
|
def distance = GeoHelper.GetDistance(ret.lat2, ret.lng2, locationMap.lat2, locationMap.lng2)
|
||||||
msgMap.updateLngFlag = true
|
msgMap.updateLngFlag = true
|
||||||
msgMap.distance = distance
|
msgMap.distance = distance
|
||||||
|
udata.put('lat2', locationMap.lat2)
|
||||||
|
udata.put('lng2', locationMap.lng2)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret.lat != locationMap.lat) {
|
if (ret.lat != locationMap.lat) {
|
||||||
@@ -171,27 +180,33 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
if (udata) {
|
if (udata) {
|
||||||
println ret.city + " " + ret.region + " " + ret.name + " [ 修改其经纬度!]"
|
println ret.city + " " + ret.region + " " + ret.name + " [ 修改其经纬度!]"
|
||||||
udata.put("m_date", new Date())
|
udata.put("m_date", new Date())
|
||||||
// DBUtils.seaweed.update(new BasicDBObject('_id',locationMap._id),new BasicDBObject('$set',udata))
|
DbUtils.seaweed.update(new BasicDBObject('_id',locationMap.id),new BasicDBObject('$set',udata))
|
||||||
}
|
}
|
||||||
|
|
||||||
results << msgMap
|
results << msgMap
|
||||||
}
|
}
|
||||||
|
|
||||||
def findStandardObject(def city, def name, def rets) {
|
def findStandardObject(def city, def region, def name, def rets) {
|
||||||
def map;
|
def map;
|
||||||
if (rets) {
|
if (rets) {
|
||||||
if (rets.size() > 1) {
|
if (rets.size() > 1) {
|
||||||
//相似里找有精确地址
|
//相似里找有精确地址
|
||||||
for (def mapObj : rets) {
|
for (def mapObj : rets) {
|
||||||
|
if((mapObj.adname && mapObj.adname.contains(region)) || (mapObj.region && mapObj.region.contains(region))){
|
||||||
|
if(mapObj.name.contains(name) || name.contains(mapObj.name)){
|
||||||
mapObj.address = com.fangjia.script.util.DataUtil.formateAddress(city, mapObj.address);
|
mapObj.address = com.fangjia.script.util.DataUtil.formateAddress(city, mapObj.address);
|
||||||
if (mapObj.address && findPattern(mapObj.address)) {
|
if (mapObj.address && findPattern(mapObj.address)) {
|
||||||
map = mapObj;
|
map = mapObj;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if(!map){
|
if(!map){
|
||||||
//交带有交叉口地址
|
//交带有交叉口地址
|
||||||
for (def mapObj : rets) {
|
for (def mapObj : rets) {
|
||||||
|
if((mapObj.adname && mapObj.adname.contains(region)) || (mapObj.region && mapObj.region.contains(region))){
|
||||||
|
if(mapObj.name.contains(name) || name.contains(mapObj.name)) {
|
||||||
if (mapObj.address && (mapObj.address.contains("交汇") || mapObj.address.contains("交叉"))) {
|
if (mapObj.address && (mapObj.address.contains("交汇") || mapObj.address.contains("交叉"))) {
|
||||||
if (!mapObj.address.contains("与;") && !mapObj.address.startsWith("路") && !mapObj.address.startsWith("路;")) {
|
if (!mapObj.address.contains("与;") && !mapObj.address.startsWith("路") && !mapObj.address.startsWith("路;")) {
|
||||||
map = mapObj;
|
map = mapObj;
|
||||||
@@ -201,6 +216,8 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// if (!map) {
|
// if (!map) {
|
||||||
// map = rets[0]
|
// map = rets[0]
|
||||||
// }
|
// }
|
||||||
@@ -211,18 +228,18 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
def findLatAndLng(ret) {
|
def findLatAndLng(ret) {
|
||||||
//https://restapi.amap.com/v3/place/text?keywords=
|
//https://restapi.amap.com/v3/place/text?keywords=
|
||||||
def rets = OpenApiUtils.getGaoDeSearchLocation(ret.city, ret.region, ret.name)
|
def rets = OpenApiUtils.getGaoDeSearchLocation(ret.city, ret.region, ret.name)
|
||||||
def map = findStandardObject(ret.city, ret.name, rets);
|
def map = findStandardObject(ret.city, ret.region, ret.name, rets);
|
||||||
def locationMap = [:]
|
def locationMap = [:]
|
||||||
if (!map || !map.lat) {
|
if (!map || !map.lat) {
|
||||||
//http://api.map.baidu.com/place/v2/search
|
//http://api.map.baidu.com/place/v2/search
|
||||||
rets = OpenApiUtils.getBiDuLocation(ret.city, ret.region, ret.name);
|
rets = OpenApiUtils.getBiDuLocation(ret.city, ret.region, ret.name);
|
||||||
map = findStandardObject(ret.city, ret.name, rets);
|
map = findStandardObject(ret.city, ret.region, ret.name, rets);
|
||||||
}
|
}
|
||||||
if (!map || !map.lat) {
|
if (!map || !map.lat) {
|
||||||
//https://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap
|
//https://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap
|
||||||
def code = codeMap.get(ret.city);
|
def code = codeMap.get(ret.city);
|
||||||
rets = OpenApiUtils.searchBaiDuMap(ret.name, ret.region, code.toInteger());
|
rets = OpenApiUtils.searchBaiDuMap(ret.name, ret.region, code.toInteger());
|
||||||
map = findStandardObject(ret.city, ret.name, rets);
|
map = findStandardObject(ret.city, ret.region, ret.name, rets);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if((!map || !map.lat)){
|
// if((!map || !map.lat)){
|
||||||
@@ -237,7 +254,7 @@ class VagueAddressLocationBatch extends BaseBatch {
|
|||||||
locationMap.lng2 = (map.lng2.toDouble() * 10000000000).longValue()
|
locationMap.lng2 = (map.lng2.toDouble() * 10000000000).longValue()
|
||||||
locationMap.id = ret._id
|
locationMap.id = ret._id
|
||||||
locationMap.city = ret.city
|
locationMap.city = ret.city
|
||||||
if (ret.address.toString().endsWith("路")) {
|
if (map.address) {
|
||||||
locationMap.address = map.address.replace("(","").replace(")","");
|
locationMap.address = map.address.replace("(","").replace(")","");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -48,7 +48,7 @@ class YouDaDataParser {
|
|||||||
def final AtomicInteger count_ = new AtomicInteger(0)
|
def final AtomicInteger count_ = new AtomicInteger(0)
|
||||||
|
|
||||||
|
|
||||||
static def statDate = "2021-12-01"
|
static def statDate = "2022-01-01"
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new YouDaDataParser();
|
def task = new YouDaDataParser();
|
||||||
// task.newHouseparse();//友达一手房存入mongo
|
// task.newHouseparse();//友达一手房存入mongo
|
||||||
@@ -285,7 +285,7 @@ class YouDaDataParser {
|
|||||||
|
|
||||||
|
|
||||||
def esfParser(){
|
def esfParser(){
|
||||||
def files = ["D:\\数据\\友达\\2022年1月\\查询1.DBF"]
|
def files = ["D:\\数据\\友达\\2022年2月\\查询1.DBF"]
|
||||||
def datas = []
|
def datas = []
|
||||||
for(def fileName : files){
|
for(def fileName : files){
|
||||||
def rows = readDBF(fileName);
|
def rows = readDBF(fileName);
|
||||||
|
|||||||
+14
-2
@@ -12,7 +12,19 @@ class TempMatchDistrict {
|
|||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new TempMatchDistrict()
|
def task = new TempMatchDistrict()
|
||||||
// task.run()
|
// task.run()
|
||||||
task.regionConver()
|
// task.regionConver()
|
||||||
|
task.stat()
|
||||||
|
}
|
||||||
|
|
||||||
|
def stat(){
|
||||||
|
def citys = ["广州","深圳","佛山","东莞","中山","湛江","惠州","江门","珠海","汕头","揭阳","茂名","清远","肇庆","潮州","河源","韶关","阳江","梅州","云浮","汕尾"]
|
||||||
|
def total = 0
|
||||||
|
for(def city : citys){
|
||||||
|
def count = CommonDatautils.findAllDistrictCount("district", city)
|
||||||
|
total = total + count
|
||||||
|
println city +" "+count
|
||||||
|
}
|
||||||
|
println "共:"+total
|
||||||
}
|
}
|
||||||
|
|
||||||
def regionConver(){
|
def regionConver(){
|
||||||
@@ -29,7 +41,7 @@ class TempMatchDistrict {
|
|||||||
}
|
}
|
||||||
def run(){
|
def run(){
|
||||||
def path = "D:\\数据\\小区\\收集数据-匹配\\收集数据"
|
def path = "D:\\数据\\小区\\收集数据-匹配\\收集数据"
|
||||||
def files = ["合肥.xlsx","湖北.xlsx","陕西.xlsx","上海.xlsx","深圳.xlsx","苏州.xlsx","天津.xlsx","雄安.xlsx","浙江.xlsx","重庆.xlsx"]
|
def files = ["杭州.xlsx"]
|
||||||
for(def f : files){
|
for(def f : files){
|
||||||
def filePath = path+"\\"+f;
|
def filePath = path+"\\"+f;
|
||||||
match(filePath);
|
match(filePath);
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ class FangjiaClientUtils {
|
|||||||
public static def getMapData(def city, def region, def name, def address, def types, def mapCode){
|
public static def getMapData(def city, def region, def name, def address, def types, def mapCode){
|
||||||
JSONObject jsonObj = null
|
JSONObject jsonObj = null
|
||||||
try {
|
try {
|
||||||
def url = "http://192.168.0.19:38080/FangJiaDataService/match?city="+city+"®ion="+region+"&name="+name+"&types="+types+"&mapCode="+mapCode
|
def url = "http://192.168.0.216:38080/FangJiaDataService/match?city="+city+"®ion="+region+"&name="+name+"&types="+types+"&mapCode="+mapCode
|
||||||
//def url = "http://192.168.10.166:8080/FangJiaDataService/match?city="+city+"®ion="+region+"&name="+name+"&types="+types+"&mapCode="+mapCode
|
//def url = "http://192.168.10.166:8080/FangJiaDataService/match?city="+city+"®ion="+region+"&name="+name+"&types="+types+"&mapCode="+mapCode
|
||||||
if(address){
|
if(address){
|
||||||
url = url + "&address="+address
|
url = url + "&address="+address
|
||||||
|
|||||||
+2
-2
@@ -40,9 +40,9 @@ class LocationTest {
|
|||||||
// System.out.println(str);
|
// System.out.println(str);
|
||||||
|
|
||||||
def task = new LocationTest()
|
def task = new LocationTest()
|
||||||
// task.run()
|
task.run()
|
||||||
// task.run2()
|
// task.run2()
|
||||||
task.run3()
|
// task.run3()
|
||||||
// task.run4()
|
// task.run4()
|
||||||
// task.run5()
|
// task.run5()
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-11
@@ -1,5 +1,6 @@
|
|||||||
package com.fangjia.script.gj.paimai
|
package com.fangjia.script.gj.paimai
|
||||||
|
|
||||||
|
import com.fangjia.core.RegionData
|
||||||
import com.fangjia.script.commData.CommonDatautils
|
import com.fangjia.script.commData.CommonDatautils
|
||||||
import com.fangjia.script.crawl.JQueryUtils
|
import com.fangjia.script.crawl.JQueryUtils
|
||||||
import com.fangjia.script.thirdPriceCrawl.CrawalDBUtil
|
import com.fangjia.script.thirdPriceCrawl.CrawalDBUtil
|
||||||
@@ -33,7 +34,7 @@ public class LianjiaCrawlByChrome {
|
|||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new LianjiaCrawlByChrome();
|
def task = new LianjiaCrawlByChrome();
|
||||||
task.run()
|
// task.run()
|
||||||
// task.run1()
|
// task.run1()
|
||||||
task.addDealRegion();
|
task.addDealRegion();
|
||||||
}
|
}
|
||||||
@@ -94,12 +95,12 @@ public class LianjiaCrawlByChrome {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def run(){
|
def run(){
|
||||||
// System.setProperty("webdriver.chrome.driver", "C:\\Users\\gaojuan\\AppData\\Local\\Google\\Chrome\\Application\\chromedriver.exe");
|
System.setProperty("webdriver.chrome.driver", "C:\\Users\\gaojuan\\AppData\\Local\\Google\\Chrome\\Application\\chromedriver.exe");
|
||||||
// System.setProperty("http.nonProxyHosts", "localhost");
|
System.setProperty("http.nonProxyHosts", "localhost");
|
||||||
// WebDriver driver = new ChromeDriver()
|
WebDriver driver = new ChromeDriver()
|
||||||
// def cityMap = getAllCityUrls(driver)
|
def cityMap = getAllCityUrls(driver)
|
||||||
// getLogin(driver)
|
getLogin(driver)
|
||||||
// crawlData(driver, cityMap)
|
crawlData(driver, cityMap)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -109,7 +110,7 @@ public class LianjiaCrawlByChrome {
|
|||||||
lastMonth = lastMonth +"-01"
|
lastMonth = lastMonth +"-01"
|
||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
q.put("region", null)
|
q.put("region", null)
|
||||||
q.put("trade_date", new BasicDBObject(QueryOperators.GTE, DateUtils.parseFromTightByPattern("2021-12-01","yyyy-MM-dd")))
|
q.put("trade_date", new BasicDBObject(QueryOperators.GTE, DateUtils.parseFromTightByPattern("2022-01-01","yyyy-MM-dd")))
|
||||||
// q.put("source", new BasicDBObject('$in', ["Á´¼ÒÔÚÏß","±´¿ÇÕÒ·¿"]))
|
// q.put("source", new BasicDBObject('$in', ["Á´¼ÒÔÚÏß","±´¿ÇÕÒ·¿"]))
|
||||||
def dbcursor = DEAL_PRICE_COLL.find(q)
|
def dbcursor = DEAL_PRICE_COLL.find(q)
|
||||||
def keys = []
|
def keys = []
|
||||||
@@ -193,7 +194,7 @@ public class LianjiaCrawlByChrome {
|
|||||||
def durl = e.select(".title a").attr("href")
|
def durl = e.select(".title a").attr("href")
|
||||||
def dealDate = e.select(".dealDate").text()
|
def dealDate = e.select(".dealDate").text()
|
||||||
dealDate = DateUtils.parseFromTightByPattern(dealDate, "yyyy.MM.dd")
|
dealDate = DateUtils.parseFromTightByPattern(dealDate, "yyyy.MM.dd")
|
||||||
def endDate = DateUtils.parseFromTightByPattern("2021-11-30", "yyyy-MM-dd")
|
def endDate = DateUtils.parseFromTightByPattern("2021-12-31", "yyyy-MM-dd")
|
||||||
if(dealDate.getTime()>=endDate.getTime()){
|
if(dealDate.getTime()>=endDate.getTime()){
|
||||||
detailUrls << durl
|
detailUrls << durl
|
||||||
parse(city, e)
|
parse(city, e)
|
||||||
@@ -219,6 +220,9 @@ public class LianjiaCrawlByChrome {
|
|||||||
detail.city = city
|
detail.city = city
|
||||||
detail.district_name = arrs[0]
|
detail.district_name = arrs[0]
|
||||||
detail.region = findRegionByThirdPary(detail.city, detail.district_name)
|
detail.region = findRegionByThirdPary(detail.city, detail.district_name)
|
||||||
|
if(detail.region){
|
||||||
|
detail.region = RegionData.formatRegion(city, detail.region)
|
||||||
|
}
|
||||||
|
|
||||||
def roomStr = arrs[1]
|
def roomStr = arrs[1]
|
||||||
if (roomStr) {
|
if (roomStr) {
|
||||||
@@ -391,9 +395,9 @@ public class LianjiaCrawlByChrome {
|
|||||||
if(cityEles){
|
if(cityEles){
|
||||||
for(def e : cityEles){
|
for(def e : cityEles){
|
||||||
def href = e.attr("href")
|
def href = e.attr("href")
|
||||||
if(!href.contains("fang.lianjia")){
|
// if(!href.contains("fang.lianjia") && e.text().contains("¸£ÖÝ")){
|
||||||
cityMap.put(e.text(), href)
|
cityMap.put(e.text(), href)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cityMap
|
return cityMap
|
||||||
|
|||||||
+9
-6
@@ -60,12 +60,12 @@ class CrawlDistrictIdSelect {
|
|||||||
|
|
||||||
def findCrawlData(){
|
def findCrawlData(){
|
||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
q.put("city","福州")
|
q.put("city","±±¾©")
|
||||||
q.put("source", "城市房产")
|
q.put("source", "ËÑ·¿")
|
||||||
q.put("s_date",202012)
|
q.put("s_date",202112)
|
||||||
def dbcursor = thirdPartyColl.find(q).batchSize(10000).setOptions(Bytes.QUERYOPTION_NOTIMEOUT)
|
def dbcursor = thirdPartyColl.find(q).batchSize(10000).setOptions(Bytes.QUERYOPTION_NOTIMEOUT)
|
||||||
def retMap = [:]
|
def retMap = [:]
|
||||||
def prefix = ".cityhouse.cn/ha/"
|
def prefix = "esf.fang.com/loupan/"
|
||||||
def keyList =new HashSet()
|
def keyList =new HashSet()
|
||||||
for(def db : dbcursor){
|
for(def db : dbcursor){
|
||||||
def url = null
|
def url = null
|
||||||
@@ -77,11 +77,14 @@ class CrawlDistrictIdSelect {
|
|||||||
url = db.url
|
url = db.url
|
||||||
}
|
}
|
||||||
if(url && url.contains(prefix) ){
|
if(url && url.contains(prefix) ){
|
||||||
def district_id = url.substring(url.indexOf(prefix)+prefix.length(),url.indexOf(".html"))
|
def district_id = url.substring(url.indexOf(prefix)+prefix.length(),url.indexOf(".htm"))
|
||||||
if(district_id=="0"){
|
if(district_id=="0"){
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
def shortCity = url.substring(url.indexOf("//")+2, url.indexOf(prefix))
|
def shortCity = url.substring(url.indexOf("//")+2, url.indexOf(prefix))
|
||||||
|
if(!shortCity){
|
||||||
|
shortCity = "bj"
|
||||||
|
}
|
||||||
def key = shortCity +"#"+district_id
|
def key = shortCity +"#"+district_id
|
||||||
|
|
||||||
def ids = retMap.get(key)
|
def ids = retMap.get(key)
|
||||||
@@ -92,7 +95,7 @@ class CrawlDistrictIdSelect {
|
|||||||
|
|
||||||
if(!keyList.contains(key)){
|
if(!keyList.contains(key)){
|
||||||
def map = new BasicDBObject()
|
def map = new BasicDBObject()
|
||||||
map.root = "cityhouse.com"
|
map.root = "fang.com"
|
||||||
map.city_short= shortCity
|
map.city_short= shortCity
|
||||||
map.city = db.city
|
map.city = db.city
|
||||||
map.region = db.region
|
map.region = db.region
|
||||||
|
|||||||
+2
-2
@@ -68,7 +68,7 @@ class FZloationUpdate {
|
|||||||
Long lng0 = lng*10000000000L
|
Long lng0 = lng*10000000000L
|
||||||
udata.put("lat", lat0)
|
udata.put("lat", lat0)
|
||||||
udata.put("lng", lng0 )
|
udata.put("lng", lng0 )
|
||||||
DbUtils.seaweed.update(new BasicDBObject("_id", dist._id), new BasicDBObject('$set', udata))
|
// DbUtils.seaweed.update(new BasicDBObject("_id", dist._id), new BasicDBObject('$set', udata))
|
||||||
println "[ÐÞ¸Ä-${total}] "+ dist.region+" "+dist.name+" "+dist.address+" "+upldateFlag
|
println "[ÐÞ¸Ä-${total}] "+ dist.region+" "+dist.name+" "+dist.address+" "+upldateFlag
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ class FZloationUpdate {
|
|||||||
if(addr){
|
if(addr){
|
||||||
def rMap = [:]
|
def rMap = [:]
|
||||||
def reps = GaoDeApiUtils.geo(dist.city, addr);
|
def reps = GaoDeApiUtils.geo(dist.city, addr);
|
||||||
if(reps && reps.count.toInteger()>=1){
|
if(reps && reps.count && reps.count.toInteger()>=1){
|
||||||
def map = reps.geocodes.get(0)
|
def map = reps.geocodes.get(0)
|
||||||
def location = map.location
|
def location = map.location
|
||||||
def level = map.level
|
def level = map.level
|
||||||
|
|||||||
+4
-4
@@ -40,11 +40,11 @@ class DataStat {
|
|||||||
|
|
||||||
|
|
||||||
def run(){
|
def run(){
|
||||||
def source = "58ͬ³Ç"//
|
def source = "城市房产"//
|
||||||
def citys = findCrawlCity(source, 202111);
|
def citys = findCrawlCity(source, 202112);
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def count1 = findCount(source, city, 202111);
|
def count1 = findCount(source, city, 202112);
|
||||||
def count2 = findCount(source, city, 202112);
|
def count2 = findCount(source, city, 202201);
|
||||||
println city +" "+count1+" "+count2
|
println city +" "+count1+" "+count2
|
||||||
// println count1
|
// println count1
|
||||||
// println "--- ----"
|
// println "--- ----"
|
||||||
|
|||||||
+130
-128
@@ -43,7 +43,8 @@ class Esf58Crawl extends BaseBatch{
|
|||||||
// "兰州":"lz|952","合肥":"hf|837", "乌鲁木齐":"xj|984","南昌":"nc|669","沈阳":"sy|188","西安":"xa|483","苏州":"su|5","无锡":"wx|93","潍坊":"wf|362",
|
// "兰州":"lz|952","合肥":"hf|837", "乌鲁木齐":"xj|984","南昌":"nc|669","沈阳":"sy|188","西安":"xa|483","苏州":"su|5","无锡":"wx|93","潍坊":"wf|362",
|
||||||
// "芜湖":"wuhu|2045","东莞":"dg|413","常州":"cz|463","佛山":"fs|222",
|
// "芜湖":"wuhu|2045","东莞":"dg|413","常州":"cz|463","佛山":"fs|222",
|
||||||
// "南通":"nt|394","东莞":"dg|413","吉林":"jl|700","中山":"zs|771","阜阳":"fy|2325",
|
// "南通":"nt|394","东莞":"dg|413","吉林":"jl|700","中山":"zs|771","阜阳":"fy|2325",
|
||||||
// "呼和浩特":"hu|811","济南":"jn|265","温州":"wz|330","台州":"tz|403","东营":"dy|623","咸阳":"xianyang|7453","安庆":"anqing|3251","宿州":"suzhou|3359","六安":"la|2328","唐山":"ts|276","商丘":"sq|1029","大同":"dt|6964","威海":"weihai|518","安阳":"ay|1096",
|
// "呼和浩特":"hu|811",
|
||||||
|
// "济南":"jn|265","温州":"wz|330","台州":"tz|403","东营":"dy|623","咸阳":"xianyang|7453","安庆":"anqing|3251","宿州":"suzhou|3359","六安":"la|2328","唐山":"ts|276","商丘":"sq|1029","大同":"dt|6964","威海":"weihai|518","安阳":"ay|1096",
|
||||||
// "临汾":"linfen|5669","临沂":"linyi|505","九江":"jj|2247","淄博":"zb|385","北京":"bj|1","上海":"sh|2",
|
// "临汾":"linfen|5669","临沂":"linyi|505","九江":"jj|2247","淄博":"zb|385","北京":"bj|1","上海":"sh|2",
|
||||||
// "三亚":"sanya|2422","烟台":"yt|228","宁波":"nb|135","金华":"jh|531", "绍兴":"sx|355","湖州":"huzhou|831","张家口":"zjk|3328","珠海":"zh|910","海口":"haikou|2053","保定":"bd|424","保亭":"baoting|10367","南宁":"nn|845", "扬州":"yz|637","汕头":"st|783","泰州":"taizhou|693","淮安":"ha|968","湛江":"zhanjiang|791","锦州":"jinzhou|2354","昆明":"km|541","柳州":"liuzhou|7133","肇庆":"zq|901","连云港":"lyg|2049","日照":"rizhao|3177","常德":"changde|872",
|
// "三亚":"sanya|2422","烟台":"yt|228","宁波":"nb|135","金华":"jh|531", "绍兴":"sx|355","湖州":"huzhou|831","张家口":"zjk|3328","珠海":"zh|910","海口":"haikou|2053","保定":"bd|424","保亭":"baoting|10367","南宁":"nn|845", "扬州":"yz|637","汕头":"st|783","泰州":"taizhou|693","淮安":"ha|968","湛江":"zhanjiang|791","锦州":"jinzhou|2354","昆明":"km|541","柳州":"liuzhou|7133","肇庆":"zq|901","连云港":"lyg|2049","日照":"rizhao|3177","常德":"changde|872",
|
||||||
// "沧州":"cangzhou|652", "泉州":"qz|291","清远":"qingyuan|7303", "西宁":"xn|2052","遵义":"zunyi|7620","株洲":"zhuzhou|1086","贵阳":"gy|2015","岳阳":"yy|821","徐州":"xz|471", "哈尔滨":"hrb|202","宜昌":"yc|858", "廊坊":"lf|772","秦皇岛":"qhd|1078","惠州":"huizhou|722","洛阳":"luoyang|556",
|
// "沧州":"cangzhou|652", "泉州":"qz|291","清远":"qingyuan|7303", "西宁":"xn|2052","遵义":"zunyi|7620","株洲":"zhuzhou|1086","贵阳":"gy|2015","岳阳":"yy|821","徐州":"xz|471", "哈尔滨":"hrb|202","宜昌":"yc|858", "廊坊":"lf|772","秦皇岛":"qhd|1078","惠州":"huizhou|722","洛阳":"luoyang|556",
|
||||||
@@ -53,133 +54,134 @@ class Esf58Crawl extends BaseBatch{
|
|||||||
// "马鞍山":"mas|2039","铜陵":"tongling|10285","宣城":"xuancheng|5633","亳州":"bozhou|2329","黄山":"huangshan|2323",
|
// "马鞍山":"mas|2039","铜陵":"tongling|10285","宣城":"xuancheng|5633","亳州":"bozhou|2329","黄山":"huangshan|2323",
|
||||||
// "池州":"chizhou|10260","巢湖":"ch|10229","和县":"hexian|10892","霍邱":"hq|11226","桐城":"tongcheng|11296",
|
// "池州":"chizhou|10260","巢湖":"ch|10229","和县":"hexian|10892","霍邱":"hq|11226","桐城":"tongcheng|11296",
|
||||||
// "宁国":"ningguo|5645","天长":"tianchang|10273","东至":"dongzhi|10262","无为":"wuweixian|10232",
|
// "宁国":"ningguo|5645","天长":"tianchang|10273","东至":"dongzhi|10262","无为":"wuweixian|10232",
|
||||||
// "莆田":"pt|2429","漳州":"zhangzhou|710","宁德":"nd|7951","三明":"sm|2048","南平":"np|10291","龙岩":"ly|6752",
|
// "莆田":"pt|2429","漳州":"zhangzhou|710","宁德":"nd|7951","三明":"sm|2048","南平":"np|10291","龙岩":"ly|6752","武夷山":"wuyishan|10761",
|
||||||
def cityList = ["武夷山":"wuyishan|10761",
|
// "石狮":"shishi|296","晋江":"jinjiangshi|297","南安":"nananshi|293","龙海":"longhai|713","上杭":"shanghangxian|6757",
|
||||||
"石狮":"shishi|296","晋江":"jinjiangshi|297","南安":"nananshi|293","龙海":"longhai|713","上杭":"shanghangxian|6757",
|
// "福安":"fuanshi|7969","福鼎":"fudingshi|7970","安溪":"anxixian|7100","永春":"yongchunxian|7101","永安":"yongan|2133",
|
||||||
"福安":"fuanshi|7969","福鼎":"fudingshi|7970","安溪":"anxixian|7100","永春":"yongchunxian|7101","永安":"yongan|2133",
|
// "漳浦":"zhangpu|717", "珠海":"zh|910","江门":"jm|629",
|
||||||
"漳浦":"zhangpu|717", "珠海":"zh|910","江门":"jm|629",
|
// "茂名":"mm|679","揭阳":"jy|927","梅州":"mz|9389",
|
||||||
"茂名":"mm|679","揭阳":"jy|927","梅州":"mz|9389",
|
// "阳江":"yj|2284","韶关":"sg|2192","河源":"heyuan|10467","云浮":"yf|10485","汕尾":"sw|9449",
|
||||||
"阳江":"yj|2284","韶关":"sg|2192","河源":"heyuan|10467","云浮":"yf|10485","汕尾":"sw|9449",
|
// "潮州":"chaozhou|10461","台山":"taishan|11263","阳春":"yangchun|8566","顺德":"sd|8716","惠东":"huidong|725",
|
||||||
"潮州":"chaozhou|10461","台山":"taishan|11263","阳春":"yangchun|8566","顺德":"sd|8716","惠东":"huidong|725",
|
// "博罗":"boluo|726","海丰":"haifengxian|9444","开平":"kaipingshi|634","陆丰":"lufengshi|9456",
|
||||||
"博罗":"boluo|726","海丰":"haifengxian|9444","开平":"kaipingshi|634","陆丰":"lufengshi|9456",
|
// "桂林":"gl|1039","玉林":"yulin|2337","梧州":"wuzhou|2046",
|
||||||
"桂林":"gl|1039","玉林":"yulin|2337","梧州":"wuzhou|2046",
|
// "北海":"bh|10536","贵港":"gg|6770","钦州":"qinzhou|2335","百色":"baise|10513","河池":"hc|2340",
|
||||||
"北海":"bh|10536","贵港":"gg|6770","钦州":"qinzhou|2335","百色":"baise|10513","河池":"hc|2340",
|
// "来宾":"lb|10552","贺州":"hezhou|10549","防城港":"fcg|10539","崇左":"chongzuo|10524","桂平":"guipingqu|6774",
|
||||||
"来宾":"lb|10552","贺州":"hezhou|10549","防城港":"fcg|10539","崇左":"chongzuo|10524","桂平":"guipingqu|6774",
|
// "北流":"beiliushi|9168","博白":"bobaixian|9173","岑溪":"cenxi|2119",
|
||||||
"北流":"beiliushi|9168","博白":"bobaixian|9173","岑溪":"cenxi|2119",
|
// "黔东南":"qdn|9363","黔南":"qn|10492","六盘水":"lps|10506",
|
||||||
"黔东南":"qdn|9363","黔南":"qn|10492","六盘水":"lps|10506",
|
// "毕节":"bijie|10564","铜仁":"tr|10417","安顺":"anshun|7468","黔西南":"qxn|10434","仁怀":"renhuaishi|7628",
|
||||||
"毕节":"bijie|10564","铜仁":"tr|10417","安顺":"anshun|7468","黔西南":"qxn|10434","仁怀":"renhuaishi|7628",
|
// "清镇":"qingzhen|12703","天水":"tianshui|8601","白银":"by|10304","庆阳":"qingyang|10475","平凉":"pl|7154",
|
||||||
"清镇":"qingzhen|12703","天水":"tianshui|8601","白银":"by|10304","庆阳":"qingyang|10475","平凉":"pl|7154",
|
// "酒泉":"jq|10387","张掖":"zhangye|10454","武威":"wuwei|10448","定西":"dx|10322","金昌":"jinchang|7428",
|
||||||
"酒泉":"jq|10387","张掖":"zhangye|10454","武威":"wuwei|10448","定西":"dx|10322","金昌":"jinchang|7428",
|
// "陇南":"ln|10415","临夏":"linxia|7112","嘉峪关":"jyg|10362","甘南":"gn|10343","敦煌":"dunhuang|10390",
|
||||||
"陇南":"ln|10415","临夏":"linxia|7112","嘉峪关":"jyg|10362","甘南":"gn|10343","敦煌":"dunhuang|10390",
|
// "五指山":"wzs|9952","三沙":"sansha|13722","琼海":"qh|10136",
|
||||||
"五指山":"wzs|9952","三沙":"sansha|13722","琼海":"qh|10136",
|
// "文昌":"wenchang|9984","万宁":"wanning|10022","屯昌":"tunchang|10044","琼中":"qiongzhong|10064","陵水":"lingshui|10184",
|
||||||
"文昌":"wenchang|9984","万宁":"wanning|10022","屯昌":"tunchang|10044","琼中":"qiongzhong|10064","陵水":"lingshui|10184",
|
// "东方":"df|10250","定安":"da|10303","澄迈":"cm|10331","白沙":"baish|10380",
|
||||||
"东方":"df|10250","定安":"da|10303","澄迈":"cm|10331","白沙":"baish|10380",
|
// "儋州":"danzhou|10394", "郑州":"zz|342","新乡":"xx|1016","许昌":"xc|977",
|
||||||
"儋州":"danzhou|10394", "郑州":"zz|342","新乡":"xx|1016","许昌":"xc|977",
|
// "平顶山":"pds|1005","焦作":"jiaozuo|3266","开封":"kaifeng|2342",
|
||||||
"平顶山":"pds|1005","焦作":"jiaozuo|3266","开封":"kaifeng|2342",
|
// "濮阳":"puyang|2346","周口":"zk|933","驻马店":"zmd|1067","漯河":"luohe|2347",
|
||||||
"濮阳":"puyang|2346","周口":"zk|933","驻马店":"zmd|1067","漯河":"luohe|2347",
|
// "三门峡":"smx|9317","鹤壁":"hb|2344","济源":"jiyuan|9918","明港":"mg|8541","鄢陵":"yanling|9123",
|
||||||
"三门峡":"smx|9317","鹤壁":"hb|2344","济源":"jiyuan|9918","明港":"mg|8541","鄢陵":"yanling|9123",
|
// "禹州":"yuzhou|979","长葛":"changge|9344","灵宝":"lingbaoshi|9307","杞县":"qixianqu|7389","汝州":"ruzhou|1010",
|
||||||
"禹州":"yuzhou|979","长葛":"changge|9344","灵宝":"lingbaoshi|9307","杞县":"qixianqu|7389","汝州":"ruzhou|1010",
|
// "项城":"xiangchengshi|935","偃师":"yanshiqu|7121","长垣":"changyuan|5936","滑县":"huaxian|5405","林州":"linzhou|1101",
|
||||||
"项城":"xiangchengshi|935","偃师":"yanshiqu|7121","长垣":"changyuan|5936","滑县":"huaxian|5405","林州":"linzhou|1101",
|
// "沁阳":"qinyang|3268","孟州":"mengzhou|3267","温县":"wenxian|7312","尉氏":"weishixian|7391","兰考":"lankaoxian|7393",
|
||||||
"沁阳":"qinyang|3268","孟州":"mengzhou|3267","温县":"wenxian|7312","尉氏":"weishixian|7391","兰考":"lankaoxian|7393",
|
// "通许":"tongxuxian|7390","新安":"lyxinan|11217","伊川":"yichuan|11220","孟津":"mengjinqu|7122","宜阳":"lyyiyang|11219",
|
||||||
"通许":"tongxuxian|7390","新安":"lyxinan|11217","伊川":"yichuan|11220","孟津":"mengjinqu|7122","宜阳":"lyyiyang|11219",
|
// "舞钢":"wugang|1011","永城":"yongcheng|1032","睢县":"suixian|1038","鹿邑":"luyi|939","渑池":"yingchixian|9322",
|
||||||
"舞钢":"wugang|1011","永城":"yongcheng|1032","睢县":"suixian|1038","鹿邑":"luyi|939","渑池":"yingchixian|9322",
|
// "沈丘":"shenqiu|942","太康":"taikang|938","商水":"shangshui|936","淇县":"qixianq|9186","浚县":"junxian|9185",
|
||||||
"沈丘":"shenqiu|942","太康":"taikang|938","商水":"shangshui|936","淇县":"qixianq|9186","浚县":"junxian|9185",
|
// "范县":"fanxian|7285","固始":"gushixian|8698","淮滨":"huaibinxian|8702","邓州":"dengzhou|595","新野":"xinye|603",
|
||||||
"范县":"fanxian|7285","固始":"gushixian|8698","淮滨":"huaibinxian|8702","邓州":"dengzhou|595","新野":"xinye|603",
|
// "大庆":"dq|375","齐齐哈尔":"qqhr|5853","牡丹江":"mdj|3489","绥化":"suihua|6718",
|
||||||
"大庆":"dq|375","齐齐哈尔":"qqhr|5853","牡丹江":"mdj|3489","绥化":"suihua|6718",
|
// "佳木斯":"jms|6776","鸡西":"jixi|7289","双鸭山":"sys|9837","鹤岗":"hegang|9061","黑河":"heihe|9862",
|
||||||
"佳木斯":"jms|6776","鸡西":"jixi|7289","双鸭山":"sys|9837","鹤岗":"hegang|9061","黑河":"heihe|9862",
|
// "伊春":"yich|9773","七台河":"qth|9848","大兴安岭":"dxal|9878","安达":"shanda|6720","肇东":"shzhaodong|6721",
|
||||||
"伊春":"yich|9773","七台河":"qth|9848","大兴安岭":"dxal|9878","安达":"shanda|6720","肇东":"shzhaodong|6721",
|
// "肇州":"zhaozhou|382", "襄阳":"xf|891","荆州":"jingzhou|3479","十堰":"shiyan|2032",
|
||||||
"肇州":"zhaozhou|382", "襄阳":"xf|891","荆州":"jingzhou|3479","十堰":"shiyan|2032",
|
// "黄石":"hshi|1734","孝感":"xiaogan|3434","黄冈":"hg|2299","恩施":"es|2302","荆门":"jingmen|2296",
|
||||||
"黄石":"hshi|1734","孝感":"xiaogan|3434","黄冈":"hg|2299","恩施":"es|2302","荆门":"jingmen|2296",
|
// "咸宁":"xianning|9617","鄂州":"ez|9709","随州":"suizhou|9656","潜江":"qianjiang|9669","天门":"tm|9517",
|
||||||
"咸宁":"xianning|9617","鄂州":"ez|9709","随州":"suizhou|9656","潜江":"qianjiang|9669","天门":"tm|9517",
|
// "仙桃":"xiantao|9736","神农架":"snj|9605","宜都":"yidou|864","汉川":"hanchuan|3439","枣阳":"zaoyang|896",
|
||||||
"仙桃":"xiantao|9736","神农架":"snj|9605","宜都":"yidou|864","汉川":"hanchuan|3439","枣阳":"zaoyang|896",
|
// "武穴":"wuxueshi|7362","钟祥":"zhongxiangshi|9119","京山":"jingshanxian|9117","沙洋":"shayangxian|9118","松滋":"songzi|3484",
|
||||||
"武穴":"wuxueshi|7362","钟祥":"zhongxiangshi|9119","京山":"jingshanxian|9117","沙洋":"shayangxian|9118","松滋":"songzi|3484",
|
// "广水":"guangshuishi|9657","赤壁":"chibishi|9623","老河口":"laohekou|895","谷城":"gucheng|899","宜城":"yichengshi|897",
|
||||||
"广水":"guangshuishi|9657","赤壁":"chibishi|9623","老河口":"laohekou|895","谷城":"gucheng|899","宜城":"yichengshi|897",
|
// "南漳":"nanzhang|898","云梦":"yunmeng|3438","安陆":"anlu|3442","大悟":"dawu|3437","孝昌":"xiaochang|3436",
|
||||||
"南漳":"nanzhang|898","云梦":"yunmeng|3438","安陆":"anlu|3442","大悟":"dawu|3437","孝昌":"xiaochang|3436",
|
// "当阳":"dangyang|865","枝江":"zhijiang|866","嘉鱼":"jiayuxian|9624","随县":"suixia|9660",
|
||||||
"当阳":"dangyang|865","枝江":"zhijiang|866","嘉鱼":"jiayuxian|9624","随县":"suixia|9660",
|
// "长沙":"cs|414","益阳":"yiyang|10198","衡阳":"hy|914",
|
||||||
"长沙":"cs|414","益阳":"yiyang|10198","衡阳":"hy|914",
|
// "湘潭":"xiangtan|2047","郴州":"chenzhou|5695","邵阳":"shaoyang|2303","怀化":"hh|5756",
|
||||||
"湘潭":"xiangtan|2047","郴州":"chenzhou|5695","邵阳":"shaoyang|2303","怀化":"hh|5756",
|
// "永州":"yongzhou|2307","娄底":"ld|9481","湘西":"xiangxi|10219","张家界":"zjj|6788","醴陵":"liling|1091",
|
||||||
"永州":"yongzhou|2307","娄底":"ld|9481","湘西":"xiangxi|10219","张家界":"zjj|6788","醴陵":"liling|1091",
|
// "澧县":"lixian|876","桂阳":"czguiyang|5699","资兴":"zixing|5698","永兴":"yongxing|5701","常宁":"changningshi|921",
|
||||||
"澧县":"lixian|876","桂阳":"czguiyang|5699","资兴":"zixing|5698","永兴":"yongxing|5701","常宁":"changningshi|921",
|
// "祁东":"qidongxian|5690","衡东":"hengdong|5693","冷水江":"lengshuijiangshi|9470","涟源":"lianyuanshi|9471","双峰":"shuangfengxian|9473",
|
||||||
"祁东":"qidongxian|5690","衡东":"hengdong|5693","冷水江":"lengshuijiangshi|9470","涟源":"lianyuanshi|9471","双峰":"shuangfengxian|9473",
|
// "邵阳县":"shaoyangxian|6955","邵东":"shaodongxian|6954","沅江":"yuanjiangs|10201","南县":"nanxian|10202","祁阳":"qiyang|8532",
|
||||||
"邵阳县":"shaoyangxian|6955","邵东":"shaodongxian|6954","沅江":"yuanjiangs|10201","南县":"nanxian|10202","祁阳":"qiyang|8532",
|
// "湘阴":"xiangyin|828","华容":"huarong|830","慈利":"cilixian|6791","攸县":"zzyouxian|1095",
|
||||||
"湘阴":"xiangyin|828","华容":"huarong|830","慈利":"cilixian|6791","攸县":"zzyouxian|1095",
|
// "邢台":"xt|751","衡水":"hs|993",
|
||||||
"邢台":"xt|751","衡水":"hs|993",
|
// "承德":"chengde|6760","定州":"dingzhou|8398","馆陶":"gt|8706","张北":"zhangbei|11201","赵县":"zx|9048",
|
||||||
"承德":"chengde|6760","定州":"dingzhou|8398","馆陶":"gt|8706","张北":"zhangbei|11201","赵县":"zx|9048",
|
// "正定":"zd|3198","迁安市":"qianan|284","任丘":"renqiu|656","三河":"sanhe|776","武安":"wuan|577",
|
||||||
"正定":"zd|3198","迁安市":"qianan|284","任丘":"renqiu|656","三河":"sanhe|776","武安":"wuan|577",
|
// "雄安新区":"xionganxinqu|111234","燕郊":"lfyanjiao|12804","涿州":"zhuozhou|428","河间":"hejian|658","黄骅":"huanghua|657",
|
||||||
"雄安新区":"xionganxinqu|111234","燕郊":"lfyanjiao|12804","涿州":"zhuozhou|428","河间":"hejian|658","黄骅":"huanghua|657",
|
// "沧县":"cangxian|659","磁县":"cixian|591","涉县":"shexian|14059","霸州":"bazhou|775","香河":"xianghe|5395",
|
||||||
"沧县":"cangxian|659","磁县":"cixian|591","涉县":"shexian|14059","霸州":"bazhou|775","香河":"xianghe|5395",
|
// "固安":"lfguan|12803","遵化市":"zunhua|283","迁西":"qianxixian|7061","玉田":"yutianxian|7060","滦南":"luannanxian|7066",
|
||||||
"固安":"lfguan|12803","遵化市":"zunhua|283","迁西":"qianxixian|7061","玉田":"yutianxian|7060","滦南":"luannanxian|7066",
|
// "沙河":"shaheshi|755",
|
||||||
"沙河":"shaheshi|755",
|
// "宿迁":"suqian|2350","镇江":"zj|645","沭阳":"shuyang|5772","大丰":"dafeng|11279",
|
||||||
"宿迁":"suqian|2350","镇江":"zj|645","沭阳":"shuyang|5772","大丰":"dafeng|11279",
|
// "如皋":"rugao|397","启东":"qidong|400","溧阳":"liyang|469","海门":"haimen|399","东海":"donghai|2147",
|
||||||
"如皋":"rugao|397","启东":"qidong|400","溧阳":"liyang|469","海门":"haimen|399","东海":"donghai|2147",
|
// "扬中":"yangzhong|649","兴化":"xinghuashi|699","新沂":"xinyishi|478","泰兴":"taixing|696","如东":"rudong|402",
|
||||||
"扬中":"yangzhong|649","兴化":"xinghuashi|699","新沂":"xinyishi|478","泰兴":"taixing|696","如东":"rudong|402",
|
// "邳州":"pizhou|477","沛县":"xzpeixian|11349","靖江":"jingjiang|698","建湖":"jianhu|618","海安":"haian|401",
|
||||||
"邳州":"pizhou|477","沛县":"xzpeixian|11349","靖江":"jingjiang|698","建湖":"jianhu|618","海安":"haian|401",
|
// "东台":"dongtai|615","丹阳":"danyang|648","宝应县":"baoyingx|14451","灌南":"guannan|2150","灌云":"guanyun|2148",
|
||||||
"东台":"dongtai|615","丹阳":"danyang|648","宝应县":"baoyingx|14451","灌南":"guannan|2150","灌云":"guanyun|2148",
|
// "姜堰":"jiangyan|697","金坛":"jintan|468","昆山":"szkunshan|16","泗洪":"sihong|5958","泗阳":"siyang|5959",
|
||||||
"姜堰":"jiangyan|697","金坛":"jintan|468","昆山":"szkunshan|16","泗洪":"sihong|5958","泗阳":"siyang|5959",
|
// "句容":"jurong|650","射阳":"sheyang|621","阜宁":"funingxian|620","响水":"xiangshui|619","盱眙":"xuyi|976",
|
||||||
"句容":"jurong|650","射阳":"sheyang|621","阜宁":"funingxian|620","响水":"xiangshui|619","盱眙":"xuyi|976",
|
// "金湖":"jinhu|975","江阴":"jiangyins|34984", "赣州":"ganzhou|2363","宜春":"yichun|5709","吉安":"ja|2364",
|
||||||
"金湖":"jinhu|975","江阴":"jiangyins|34984", "赣州":"ganzhou|2363","宜春":"yichun|5709","吉安":"ja|2364",
|
// "上饶":"sr|10120","萍乡":"px|2248","抚州":"fuzhou|10134","景德镇":"jdz|2360","新余":"xinyu|10115",
|
||||||
"上饶":"sr|10120","萍乡":"px|2248","抚州":"fuzhou|10134","景德镇":"jdz|2360","新余":"xinyu|10115",
|
// "鹰潭":"yingtan|3209","永新":"yxx|11077","乐平":"lepingshi|9048","进贤":"jinxian|677","分宜":"fenyi|10118",
|
||||||
"鹰潭":"yingtan|3209","永新":"yxx|11077","乐平":"lepingshi|9048","进贤":"jinxian|677","分宜":"fenyi|10118",
|
// "丰城":"fengchengshi|5711","樟树":"zhangshu|5713","高安":"gaoan|5712","余江":"yujiang|3210","南城":"nanchengx|10137",
|
||||||
"丰城":"fengchengshi|5711","樟树":"zhangshu|5713","高安":"gaoan|5712","余江":"yujiang|3210","南城":"nanchengx|10137",
|
// "浮梁":"fuliangxian|9071",
|
||||||
"浮梁":"fuliangxian|9071",
|
// "长春":"cc|319","四平":"sp|10171","延边":"yanbian|3184","松原":"songyuan|2315",
|
||||||
"长春":"cc|319","四平":"sp|10171","延边":"yanbian|3184","松原":"songyuan|2315",
|
// "白城":"bc|5918","通化":"th|10159","白山":"baishan|10179","辽源":"liaoyuan|2501","公主岭":"gongzhuling|10171",
|
||||||
"白城":"bc|5918","通化":"th|10159","白山":"baishan|10179","辽源":"liaoyuan|2501","公主岭":"gongzhuling|10171",
|
// "梅河口":"meihekou|10162","扶余":"fuyuxian|9085","长岭":"changlingxian|9084","桦甸":"huadian|706","磐石":"panshi|708",
|
||||||
"梅河口":"meihekou|10162","扶余":"fuyuxian|9085","长岭":"changlingxian|9084","桦甸":"huadian|706","磐石":"panshi|708",
|
// "梨树县":"lishu|10176",
|
||||||
"梨树县":"lishu|10176",
|
// "鞍山":"as|523","抚顺":"fushun|5722",
|
||||||
"鞍山":"as|523","抚顺":"fushun|5722",
|
// "营口":"yk|5898","盘锦":"pj|2041","朝阳":"cy|10106","丹东":"dandong|3445","辽阳":"liaoyang|2038",
|
||||||
"营口":"yk|5898","盘锦":"pj|2041","朝阳":"cy|10106","丹东":"dandong|3445","辽阳":"liaoyang|2038",
|
// "本溪":"benxi|5845","葫芦岛":"hld|10088","铁岭":"tl|6729","阜新":"fx|10097","庄河":"pld|3306",
|
||||||
"本溪":"benxi|5845","葫芦岛":"hld|10088","铁岭":"tl|6729","阜新":"fx|10097","庄河":"pld|3306",
|
// "瓦房店":"wfd|3279","灯塔":"dengta|2071","凤城":"fengcheng|3450","北票":"beipiao|10109","开原":"kaiyuan|6733",
|
||||||
"瓦房店":"wfd|3279","灯塔":"dengta|2071","凤城":"fengcheng|3450","北票":"beipiao|10109","开原":"kaiyuan|6733",
|
// "银川":"yinchuan|2054","吴忠":"wuzhong|9962","石嘴山":"szs|9971","中卫":"zw|9951","固原":"guyuan|2421",
|
||||||
"银川":"yinchuan|2054","吴忠":"wuzhong|9962","石嘴山":"szs|9971","中卫":"zw|9951","固原":"guyuan|2421",
|
// "包头":"bt|801","赤峰":"chifeng|6700","鄂尔多斯":"erds|2037","通辽":"tongliao|10015",
|
||||||
"包头":"bt|801","赤峰":"chifeng|6700","鄂尔多斯":"erds|2037","通辽":"tongliao|10015",
|
// "呼伦贝尔":"hlbe|10039","巴彦淖尔市":"bycem|10070","乌兰察布":"wlcb|9993","锡林郭勒":"xl|2408","兴安盟":"xam|9976",
|
||||||
"呼伦贝尔":"hlbe|10039","巴彦淖尔市":"bycem|10070","乌兰察布":"wlcb|9993","锡林郭勒":"xl|2408","兴安盟":"xam|9976",
|
// "乌海":"wuhai|2404","阿拉善盟":"alsm|10083","海拉尔":"hlr|2043",
|
||||||
"乌海":"wuhai|2404","阿拉善盟":"alsm|10083","海拉尔":"hlr|2043",
|
// "海西":"hx|9902","海北":"haibei|9917","果洛":"guoluo|9936","海东":"haidong|9909",
|
||||||
"海西":"hx|9902","海北":"haibei|9917","果洛":"guoluo|9936","海东":"haidong|9909",
|
// "黄南":"huangnan|9896","玉树":"ys|9888","海南":"hainan|10574","格尔木":"geermushi|9904",
|
||||||
"黄南":"huangnan|9896","玉树":"ys|9888","海南":"hainan|10574","格尔木":"geermushi|9904",
|
// "泰安":"ta|686","聊城":"lc|882",
|
||||||
"泰安":"ta|686","聊城":"lc|882",
|
// "枣庄":"zaozhuang|961","德州":"dz|728","菏泽":"heze|5632",
|
||||||
"枣庄":"zaozhuang|961","德州":"dz|728","菏泽":"heze|5632",
|
// "滨州":"bz|944","莱芜":"lw|2292","章丘":"zhangqiu|8680","垦利":"kl|11313","诸城":"zc|9146",
|
||||||
"滨州":"bz|944","莱芜":"lw|2292","章丘":"zhangqiu|8680","垦利":"kl|11313","诸城":"zc|9146",
|
// "寿光":"shouguang|369","龙口":"longkou|233","曹县":"caoxian|5638","单县":"shanxian|5636","肥城":"feicheng|690",
|
||||||
"寿光":"shouguang|369","龙口":"longkou|233","曹县":"caoxian|5638","单县":"shanxian|5636","肥城":"feicheng|690",
|
// "高密":"gaomi|371","广饶":"guangrao|627","桓台":"huantaixian|7335","莒县":"juxian|3180","莱州":"laizhou|235",
|
||||||
"高密":"gaomi|371","广饶":"guangrao|627","桓台":"huantaixian|7335","莒县":"juxian|3180","莱州":"laizhou|235",
|
// "蓬莱":"penglai|237","青州":"qingzhou|367","荣成":"rongcheng|522","乳山":"rushan|520","滕州":"tengzhou|967",
|
||||||
"蓬莱":"penglai|237","青州":"qingzhou|367","荣成":"rongcheng|522","乳山":"rushan|520","滕州":"tengzhou|967",
|
// "新泰":"xintai|689","招远":"zhaoyuan|3325","邹城":"zoucheng|455","邹平":"zouping|946","临清":"linqing|884",
|
||||||
"新泰":"xintai|689","招远":"zhaoyuan|3325","邹城":"zoucheng|455","邹平":"zouping|946","临清":"linqing|884",
|
// "茌平":"chiping|887","郓城":"hzyc|5637","博兴":"boxing|949","东明":"dongming|5641","巨野":"juye|5640",
|
||||||
"茌平":"chiping|887","郓城":"hzyc|5637","博兴":"boxing|949","东明":"dongming|5641","巨野":"juye|5640",
|
// "无棣":"wudi|951","齐河":"qihe|734","微山":"weishan|459","禹城":"yuchengshi|731","临邑":"linyixianq|739",
|
||||||
"无棣":"wudi|951","齐河":"qihe|734","微山":"weishan|459","禹城":"yuchengshi|731","临邑":"linyixianq|739",
|
// "乐陵":"leling|730","莱阳":"laiyang|234","宁津":"ningjin|733","高唐":"gaotang|885","莘县":"shenxian|888",
|
||||||
"乐陵":"leling|730","莱阳":"laiyang|234","宁津":"ningjin|733","高唐":"gaotang|885","莘县":"shenxian|888",
|
// "阳谷":"yanggu|886","冠县":"guanxian|890","平邑":"pingyi|514","郯城":"tancheng|510","沂源":"yiyuanxian|7334",
|
||||||
"阳谷":"yanggu|886","冠县":"guanxian|890","平邑":"pingyi|514","郯城":"tancheng|510","沂源":"yiyuanxian|7334",
|
// "汶上":"wenshang|460","梁山":"liangshanx|462","利津":"lijin|628","沂南":"yinanxian|7301","栖霞":"qixia|238",
|
||||||
"汶上":"wenshang|460","梁山":"liangshanx|462","利津":"lijin|628","沂南":"yinanxian|7301","栖霞":"qixia|238",
|
// "宁阳":"ningyang|691","东平":"dongping|692","昌邑":"changyishi|372","安丘":"anqiu|370","昌乐":"changle|373",
|
||||||
"宁阳":"ningyang|691","东平":"dongping|692","昌邑":"changyishi|372","安丘":"anqiu|370","昌乐":"changle|373",
|
// "临朐":"linqu|374","鄄城":"juancheng|5635",
|
||||||
"临朐":"linqu|374","鄄城":"juancheng|5635",
|
// "运城":"yuncheng|5653","晋中":"jz|8854",
|
||||||
"运城":"yuncheng|5653","晋中":"jz|8854",
|
// "长治":"changzhi|6921","晋城":"jincheng|3350","阳泉":"yq|8760","吕梁":"lvliang|3222","忻州":"xinzhou|3453",
|
||||||
"长治":"changzhi|6921","晋城":"jincheng|3350","阳泉":"yq|8760","吕梁":"lvliang|3222","忻州":"xinzhou|3453",
|
// "朔州":"shuozhou|9871","临猗":"linyixian|9193","清徐":"qingxu|10908","柳林":"liulin|3225","高平":"gaoping|3354",
|
||||||
"朔州":"shuozhou|9871","临猗":"linyixian|9193","清徐":"qingxu|10908","柳林":"liulin|3225","高平":"gaoping|3354",
|
// "泽州":"zezhou|3353","襄垣":"xiangyuanxian|6928","孝义":"xiaoyi|3227",
|
||||||
"泽州":"zezhou|3353","襄垣":"xiangyuanxian|6928","孝义":"xiaoyi|3227",
|
// "宝鸡":"baoji|2044","渭南":"wn|5733","汉中":"hanzhong|3163",
|
||||||
"宝鸡":"baoji|2044","渭南":"wn|5733","汉中":"hanzhong|3163",
|
// "榆林":"yl|5942","延安":"yanan|8973","安康":"ankang|3157","商洛":"sl|9854","铜川":"tc|9832",
|
||||||
"榆林":"yl|5942","延安":"yanan|8973","安康":"ankang|3157","商洛":"sl|9854","铜川":"tc|9832",
|
// "神木":"shenmu|5944","韩城":"hancheng|5735","府谷":"fugu|5945","靖边":"jingbian|5947","定边":"dingbian|5948",
|
||||||
"神木":"shenmu|5944","韩城":"hancheng|5735","府谷":"fugu|5945","靖边":"jingbian|5947","定边":"dingbian|5948",
|
// "德阳":"deyang|2373","宜宾":"yb|2380",
|
||||||
"德阳":"deyang|2373","宜宾":"yb|2380",
|
// "自贡":"zg|6745","乐山":"ls|3237","泸州":"luzhou|2372","达州":"dazhou|9799","内江":"scnj|5928",
|
||||||
"自贡":"zg|6745","乐山":"ls|3237","泸州":"luzhou|2372","达州":"dazhou|9799","内江":"scnj|5928",
|
// "遂宁":"suining|9688","攀枝花":"panzhihua|2371","眉山":"ms|9704","广安":"ga|2381","资阳":"zy|6803",
|
||||||
"遂宁":"suining|9688","攀枝花":"panzhihua|2371","眉山":"ms|9704","广安":"ga|2381","资阳":"zy|6803",
|
// "凉山":"liangshan|9717","广元":"guangyuan|9749","雅安":"ya|9687","巴中":"bazhong|9811","阿坝":"ab|9817",
|
||||||
"凉山":"liangshan|9717","广元":"guangyuan|9749","雅安":"ya|9687","巴中":"bazhong|9811","阿坝":"ab|9817",
|
// "甘孜":"ganzi|9764","安岳":"anyuexian|6806","广汉":"guanghanshi|8719","简阳":"jianyangshi|6805","仁寿":"renshouxian|9706",
|
||||||
"甘孜":"ganzi|9764","安岳":"anyuexian|6806","广汉":"guanghanshi|8719","简阳":"jianyangshi|6805","仁寿":"renshouxian|9706",
|
// "射洪":"shehongxian|9694","大竹":"dazu|9806","宣汉":"xuanhan|9804","渠县":"qux|9807","长宁":"changningx|7148",
|
||||||
"射洪":"shehongxian|9694","大竹":"dazu|9806","宣汉":"xuanhan|9804","渠县":"qux|9807","长宁":"changningx|7148",
|
// "昌吉":"changji|8582","巴音郭楞":"bygl|9530","伊犁":"yili|9472","阿克苏":"aks|9499",
|
||||||
"昌吉":"changji|8582","巴音郭楞":"bygl|9530","伊犁":"yili|9472","阿克苏":"aks|9499",
|
// "喀什":"ks|9326","哈密":"hami|7452","克拉玛依":"klmy|2042","博尔塔拉":"betl|9529","吐鲁番":"tlf|9475",
|
||||||
"喀什":"ks|9326","哈密":"hami|7452","克拉玛依":"klmy|2042","博尔塔拉":"betl|9529","吐鲁番":"tlf|9475",
|
// "和田":"ht|9489","石河子":"shz|9551","克孜勒苏":"kzls|9519","阿拉尔":"ale|9539","五家渠":"wjq|9562",
|
||||||
"和田":"ht|9489","石河子":"shz|9551","克孜勒苏":"kzls|9519","阿拉尔":"ale|9539","五家渠":"wjq|9562",
|
// "图木舒克":"tmsk|9559","库尔勒":"kel|7168","阿勒泰":"alt|18837","塔城":"tac|18845",
|
||||||
"图木舒克":"tmsk|9559","库尔勒":"kel|7168","阿勒泰":"alt|18837","塔城":"tac|18845",
|
// "拉萨":"lasa|2055","日喀则":"rkz|9615","山南":"sn|9576","林芝":"linzhi|9646","昌都":"changdu|9648",
|
||||||
"拉萨":"lasa|2055","日喀则":"rkz|9615","山南":"sn|9576","林芝":"linzhi|9646","昌都":"changdu|9648",
|
// "那曲":"nq|9618","阿里":"al|9678","日土":"rituxian|9682","改则":"gaizexian|9684",
|
||||||
"那曲":"nq|9618","阿里":"al|9678","日土":"rituxian|9682","改则":"gaizexian|9684",
|
// "曲靖":"qj|2389","大理":"dali|2398","红河":"honghe|2394","玉溪":"yx|2040",
|
||||||
"曲靖":"qj|2389","大理":"dali|2398","红河":"honghe|2394","玉溪":"yx|2040",
|
// "丽江":"lj|2392","文山":"ws|2395","楚雄":"cx|2393","西双版纳":"bn|2397","昭通":"zt|9409",
|
||||||
"丽江":"lj|2392","文山":"ws|2395","楚雄":"cx|2393","西双版纳":"bn|2397","昭通":"zt|9409",
|
// "德宏":"dh|9437","普洱":"pe|9444","保山":"bs|2390","临沧":"lincang|9422","迪庆":"diqing|9432",
|
||||||
"德宏":"dh|9437","普洱":"pe|9444","保山":"bs|2390","临沧":"lincang|9422","迪庆":"diqing|9432",
|
// "怒江":"nujiang|9462","弥勒":"milexian|8892","安宁":"anningshi|547","宣威":"xuanwushi|7533",
|
||||||
"怒江":"nujiang|9462","弥勒":"milexian|8892","安宁":"anningshi|547","宣威":"xuanwushi|7533",
|
// "丽水":"lishui|7921","衢州":"quzhou|6793",
|
||||||
"丽水":"lishui|7921","衢州":"quzhou|6793",
|
// "舟山":"zhoushan|8481","乐清":"yueqingcity|13950","瑞安":"ruiancity|13951","义乌":"yiwu|12291","余姚":"yuyao|5333",
|
||||||
"舟山":"zhoushan|8481","乐清":"yueqingcity|13950","瑞安":"ruiancity|13951","义乌":"yiwu|12291","余姚":"yuyao|5333",
|
// "诸暨":"zhuji|357","象山":"xiangshanxian|6738","温岭":"wenling|408","桐乡":"tongxiang|502","慈溪":"cixi|5334",
|
||||||
"诸暨":"zhuji|357","象山":"xiangshanxian|6738","温岭":"wenling|408","桐乡":"tongxiang|502","慈溪":"cixi|5334",
|
// "长兴":"changxing|834","嘉善":"jiashanx|14357","海宁":"haining|500","德清":"deqing|835","东阳":"dongyang|536",
|
||||||
"长兴":"changxing|834","嘉善":"jiashanx|14357","海宁":"haining|500","德清":"deqing|835","东阳":"dongyang|536",
|
// "安吉":"anji|836","苍南":"cangnanxian|7579","临海":"linhai|407","永康":"yongkang|537","玉环":"yuhuan|409",
|
||||||
"安吉":"anji|836","苍南":"cangnanxian|7579","临海":"linhai|407","永康":"yongkang|537","玉环":"yuhuan|409",
|
// "平湖":"pinghushi|501","海盐":"haiyan|504","武义县":"wuyix|14528","嵊州":"shengzhou|359","新昌":"xinchang|361",
|
||||||
"平湖":"pinghushi|501","海盐":"haiyan|504","武义县":"wuyix|14528","嵊州":"shengzhou|359","新昌":"xinchang|361",
|
// "江山":"jiangshanshi|6796","平阳":"pingyangxian|7575"
|
||||||
"江山":"jiangshanshi|6796","平阳":"pingyangxian|7575"
|
def cityList = [
|
||||||
|
"重庆":"cq|37","保定":"bd|424","信阳":"xy|8694","南京":"nj|172","南宁":"nn|845","厦门":"xm|606","青岛":"qd|122","哈尔滨":"hrb|202","天津":"tj|18","太原":"ty|740","宁德":"nd|7951","宜昌":"yc|858","成都":"cd|102","惠州":"huizhou|722","扬州":"yz|637","昆明":"km|541","杭州":"hz|79","武汉":"wh|158","泰州":"taizhou|693","洛阳":"luoyang|556","深圳":"sz|4","石家庄":"sjz|241","贵阳":"gy|2015","连云港":"lyg|2049","邯郸":"hd|572",
|
||||||
]
|
]
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
|
|||||||
+9
-1
@@ -315,11 +315,11 @@ class AddMetadataBatchQfang{
|
|||||||
private static void saveThirdPartyPrice(def saveDate){
|
private static void saveThirdPartyPrice(def saveDate){
|
||||||
|
|
||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
q.put("url", saveDate.get("xqUrl"))
|
|
||||||
q.put("s_date", SHORT_DATE);
|
q.put("s_date", SHORT_DATE);
|
||||||
q.put("city", saveDate.get("city"));
|
q.put("city", saveDate.get("city"));
|
||||||
q.put("region", saveDate.get("region"));
|
q.put("region", saveDate.get("region"));
|
||||||
q.put("name", saveDate.get("xqName"));
|
q.put("name", saveDate.get("xqName"));
|
||||||
|
q.put("source", saveDate.get("source"));
|
||||||
|
|
||||||
def udata = THIRD_PARTY_PRICE_COLL.findOne(q)
|
def udata = THIRD_PARTY_PRICE_COLL.findOne(q)
|
||||||
if(!udata){
|
if(!udata){
|
||||||
@@ -336,6 +336,14 @@ class AddMetadataBatchQfang{
|
|||||||
obj.put("source", saveDate.get("source"));
|
obj.put("source", saveDate.get("source"));
|
||||||
obj.put("c_date", new Date());
|
obj.put("c_date", new Date());
|
||||||
THIRD_PARTY_PRICE_COLL.save(obj);
|
THIRD_PARTY_PRICE_COLL.save(obj);
|
||||||
|
println "[save] "+saveDate.toString()
|
||||||
|
}else{
|
||||||
|
def updata = new BasicDBObject()
|
||||||
|
updata.put("avg_price", saveDate.get("price"))
|
||||||
|
updata.put("url", saveDate.get("xqUrl"));
|
||||||
|
updata.put("m_date", new Date());
|
||||||
|
THIRD_PARTY_PRICE_COLL.update(q,new BasicDBObject('$set',updata))
|
||||||
|
println "[update] "+saveDate.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -18,7 +18,7 @@ class SynchDistrictPrice {
|
|||||||
// def sourceMap = ["jiwu.com":"吉屋","58.com":"58同城","lianjia.com":"链家","ke.com":"贝壳找房","fang.com":"搜房","fangdd.com":"房多多","house365.com":"365淘房",
|
// def sourceMap = ["jiwu.com":"吉屋","58.com":"58同城","lianjia.com":"链家","ke.com":"贝壳找房","fang.com":"搜房","fangdd.com":"房多多","house365.com":"365淘房",
|
||||||
// "anjuke.com":"安居客","cityhouse.cn":"城市房产","zhuge.com":"诸葛找房","5i5j.com":"我爱我家"]
|
// "anjuke.com":"安居客","cityhouse.cn":"城市房产","zhuge.com":"诸葛找房","5i5j.com":"我爱我家"]
|
||||||
//"fang.com":"搜房",
|
//"fang.com":"搜房",
|
||||||
def sourceMap = ["fang.com":"搜房"]
|
def sourceMap = ["ke.com":"贝壳找房","cityhouse.cn":"城市房产"]
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new SynchDistrictPrice()
|
def task = new SynchDistrictPrice()
|
||||||
task.run()
|
task.run()
|
||||||
@@ -94,11 +94,16 @@ class SynchDistrictPrice {
|
|||||||
for(def r : rets){
|
for(def r : rets){
|
||||||
def obj= findIsExists(r.city, r.region, r.name, SHORT_DATE, source)
|
def obj= findIsExists(r.city, r.region, r.name, SHORT_DATE, source)
|
||||||
if(obj){
|
if(obj){
|
||||||
|
updateIndex++
|
||||||
thirdPartyColl.remove(new BasicDBObject('_id',obj._id))
|
thirdPartyColl.remove(new BasicDBObject('_id',obj._id))
|
||||||
addIndex++
|
|
||||||
thirdPartyColl.save(r)
|
thirdPartyColl.save(r)
|
||||||
}else{
|
}else{
|
||||||
|
try{
|
||||||
|
addIndex++
|
||||||
thirdPartyColl.save(r)
|
thirdPartyColl.save(r)
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// if(!obj){
|
// if(!obj){
|
||||||
// addIndex++
|
// addIndex++
|
||||||
@@ -112,7 +117,7 @@ class SynchDistrictPrice {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
println "["+source +"-"+city + "] add:"+ addIndex+" 原抓取:"+count +" 修改:"+updateIndex
|
println "["+source +"-"+city + "] add:"+ addIndex+" 原抓取:"+count +" 已存在:"+updateIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@ class TestCrawlTotalCount {
|
|||||||
def run(){
|
def run(){
|
||||||
def sources = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集","链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","乐有家","乐有家(新)","房探","房多多","小资家","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋"]
|
def sources = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集","链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","乐有家","乐有家(新)","房探","房多多","小资家","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋"]
|
||||||
for(def source :sources){
|
for(def source :sources){
|
||||||
def count1 = findTotalCount(source, 202111);
|
def count1 = findTotalCount(source, 202112);
|
||||||
def count2 = findTotalCount(source, 202112);
|
def count2 = findTotalCount(source, 202201);
|
||||||
println source +" "+count1 +" "+count2
|
println source +" "+count1 +" "+count2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ import org.bson.Document
|
|||||||
import static com.mongodb.client.model.Filters.*
|
import static com.mongodb.client.model.Filters.*
|
||||||
|
|
||||||
MongoCollection<Document> OPEN_URI_LOG = Mongo3Utils.getDbCollection(Constants.SEAWATER_MONGO_URI, "business", "open_uri_log")
|
MongoCollection<Document> OPEN_URI_LOG = Mongo3Utils.getDbCollection(Constants.SEAWATER_MONGO_URI, "business", "open_uri_log")
|
||||||
def startDate = DateUtil.parseDate("20211201", "yyyyMMdd")
|
def startDate = DateUtil.parseDate("20220101", "yyyyMMdd")
|
||||||
def endDate = DateUtil.parseDate("20220101", "yyyyMMdd")
|
def endDate = DateUtil.parseDate("20220201", "yyyyMMdd")
|
||||||
Calendar calendar = Calendar.getInstance()
|
Calendar calendar = Calendar.getInstance()
|
||||||
calendar.setTime(startDate)
|
calendar.setTime(startDate)
|
||||||
def count = 0
|
def count = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user