+40
@@ -0,0 +1,40 @@
|
|||||||
|
package com.fangjia.script.ccbevaluation
|
||||||
|
|
||||||
|
import com.fangjia.script.commData.CommonDatautils
|
||||||
|
import com.fangjia.script.util.ExcelUtils
|
||||||
|
import com.fangjia.script.util.MongoUtils
|
||||||
|
import com.mongodb.BasicDBObject
|
||||||
|
import com.mongodb.DBCollection
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将国信达及成交对标数据加入到第三方均价表,做为均价参考
|
||||||
|
*/
|
||||||
|
class AddThirdPriceSample {
|
||||||
|
|
||||||
|
static final DBCollection AVERAGE_STATISTICS = MongoUtils.getCollectionByName("fangjia", "average_statistics", "192.168.0.43")
|
||||||
|
|
||||||
|
static main(args) {
|
||||||
|
def task = new AddThirdPriceSample()
|
||||||
|
task.run()
|
||||||
|
}
|
||||||
|
def run(){
|
||||||
|
for(def i=1;i<19;i++){
|
||||||
|
ExcelUtils.multiThreadingModify("D:\\数据\\建行\\房产估值\\级联待优化小区集合_7月.xlsx",{d->
|
||||||
|
if(d['A'] && d['C']){
|
||||||
|
def dist = CommonDatautils.findDistrictById(d['A'].toString().trim())
|
||||||
|
if(dist){
|
||||||
|
def q = new BasicDBObject("city", dist.city).append("region", dist.region).append("name", dist.name).append("s_date", 202407)
|
||||||
|
def udata = new BasicDBObject("zhongyuan_esf_price", d['C'].toString().toDouble().toInteger())
|
||||||
|
|
||||||
|
AVERAGE_STATISTICS.update(q,new BasicDBObject('$set', udata),false, false)
|
||||||
|
}else{
|
||||||
|
println d['A'] +" 没查到"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, i)
|
||||||
|
|
||||||
|
println(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+58
-26
@@ -612,9 +612,9 @@ def findAllData(sqlInstance236, citycode){
|
|||||||
////},0)
|
////},0)
|
||||||
//
|
//
|
||||||
|
|
||||||
//ExcelUtils.multiThreadingModify("D:\\数据\\建行\\二期\\252个城市删除小区.xlsx",{d->
|
//ExcelUtils.multiThreadingModify("D:\\数据\\建行\\房产估值\\删除小区.xlsx",{d->
|
||||||
// if(d['A']){
|
// if(d['A']){
|
||||||
// def dbo = CommonDatautils.findDistrictById(d['D'])
|
// def dbo = CommonDatautils.findDistrictById(d['A'])
|
||||||
// if(dbo){
|
// if(dbo){
|
||||||
// def udata = new BasicDBObject()
|
// def udata = new BasicDBObject()
|
||||||
//// udata.put("name_cat", 11)
|
//// udata.put("name_cat", 11)
|
||||||
@@ -630,6 +630,38 @@ def findAllData(sqlInstance236, citycode){
|
|||||||
// }
|
// }
|
||||||
//},0)
|
//},0)
|
||||||
|
|
||||||
|
|
||||||
|
ExcelUtils.modify("D:\\数据\\建行\\房产估值\\添加别名.xlsx",{d->
|
||||||
|
if(d['A'] && d['B']){
|
||||||
|
def dbo = CommonDatautils.findDistrictById(d['A'])
|
||||||
|
if(dbo){
|
||||||
|
def alias = null
|
||||||
|
if(!dbo.alias){
|
||||||
|
alias = []
|
||||||
|
}else{
|
||||||
|
alias = dbo.alias
|
||||||
|
}
|
||||||
|
if(!alias.contains(d['B'])){
|
||||||
|
alias << d['B']
|
||||||
|
}
|
||||||
|
if(alias){
|
||||||
|
def udata = new BasicDBObject()
|
||||||
|
udata.put("alias", alias)
|
||||||
|
udata.put("m_date",new Date())
|
||||||
|
|
||||||
|
def q = new BasicDBObject()
|
||||||
|
q.put("_id", dbo._id)
|
||||||
|
DbUtils.seaweed.update(q, new BasicDBObject('$set', udata))
|
||||||
|
}else{
|
||||||
|
println d['A']+" "+"别名已存在"
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
println dbo._id.toString() +" 没找到"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
//def citys = ["海口","三亚","三沙","五指山","琼海","儋州","文昌","万宁","东方","定安","屯昌","澄迈","临高","白沙","昌江","乐东","陵水","保亭","琼中"]
|
//def citys = ["海口","三亚","三沙","五指山","琼海","儋州","文昌","万宁","东方","定安","屯昌","澄迈","临高","白沙","昌江","乐东","陵水","保亭","琼中"]
|
||||||
//for(def c : citys){
|
//for(def c : citys){
|
||||||
// def districts = CommonDatautils.findAllDistrictByCity(c, "district", ["city","name"])
|
// def districts = CommonDatautils.findAllDistrictByCity(c, "district", ["city","name"])
|
||||||
@@ -1299,34 +1331,34 @@ def findAvgPrice(def commid, def pgsqlInstance, def cityid){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def fileName = "D:\\数据\\建行\\房产估值\\指导价\\20240806--国信达价格录入.xlsx"
|
//def fileName = "D:\\数据\\建行\\房产估值\\指导价\\20240806--国信达价格录入.xlsx"
|
||||||
|
//
|
||||||
ExcelUtils.multiThreadingModify(fileName, {d->
|
//ExcelUtils.multiThreadingModify(fileName, {d->
|
||||||
if(d['J']){
|
// if(d['J']){
|
||||||
// def region = RegionData.formatRegion(d['A'], d['J'])
|
//// def region = RegionData.formatRegion(d['A'], d['J'])
|
||||||
// if(region){
|
//// if(region){
|
||||||
// def dist = CommonDatautils.findDistrict(d['A'], region, d['K'], "district")
|
//// def dist = CommonDatautils.findDistrict(d['A'], region, d['K'], "district")
|
||||||
|
//// if(dist){
|
||||||
|
//// d['B'] = dist.region
|
||||||
|
//// d['C'] = dist.name
|
||||||
|
//// d['L'] = dist.status-dist.name_cat
|
||||||
|
//// }
|
||||||
|
//// }
|
||||||
|
//// if(d['J'] instanceof String){
|
||||||
|
// def dist = CommonDatautils.findDistrictById(d['J'])
|
||||||
// if(dist){
|
// if(dist){
|
||||||
|
// d['A'] = dist.city
|
||||||
// d['B'] = dist.region
|
// d['B'] = dist.region
|
||||||
// d['C'] = dist.name
|
// d['C'] = dist.name
|
||||||
// d['L'] = dist.status-dist.name_cat
|
// d['K'] = dist.estate_type2
|
||||||
|
// d['L'] = dist.status
|
||||||
|
// d['M'] = dist.name_cat
|
||||||
|
//
|
||||||
|
//// d['H'] = dist.name
|
||||||
// }
|
// }
|
||||||
// }
|
//// }
|
||||||
// if(d['J'] instanceof String){
|
// }
|
||||||
def dist = CommonDatautils.findDistrictById(d['J'])
|
//},0)
|
||||||
if(dist){
|
|
||||||
d['A'] = dist.city
|
|
||||||
d['B'] = dist.region
|
|
||||||
d['C'] = dist.name
|
|
||||||
d['K'] = dist.estate_type2
|
|
||||||
d['L'] = dist.status
|
|
||||||
d['M'] = dist.name_cat
|
|
||||||
|
|
||||||
// d['H'] = dist.name
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
},0)
|
|
||||||
|
|
||||||
|
|
||||||
//def file = "D:\\数据\\建行\\房产估值\\指导价\\5城价格翻新6-21.xlsx"
|
//def file = "D:\\数据\\建行\\房产估值\\指导价\\5城价格翻新6-21.xlsx"
|
||||||
|
|||||||
+9
@@ -257,6 +257,9 @@ class ThirdPartyPriceBatch extends BaseBatch {
|
|||||||
if(third.get("5i5j_esf_price")){
|
if(third.get("5i5j_esf_price")){
|
||||||
price_map.wiwj_avg_price = third.get("5i5j_esf_price")
|
price_map.wiwj_avg_price = third.get("5i5j_esf_price")
|
||||||
}
|
}
|
||||||
|
if(third.get("fccs_esf_price")){
|
||||||
|
price_map.fccs_avg_price = third.get("fccs_esf_price")
|
||||||
|
}
|
||||||
dataMap.updatetime = DateUtils.formatDateByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
|
dataMap.updatetime = DateUtils.formatDateByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
|
||||||
allRows << dataMap
|
allRows << dataMap
|
||||||
}
|
}
|
||||||
@@ -303,6 +306,8 @@ class ThirdPartyPriceBatch extends BaseBatch {
|
|||||||
web = "房多多"
|
web = "房多多"
|
||||||
}else if(k=="wiwj_avg_price"){
|
}else if(k=="wiwj_avg_price"){
|
||||||
web = "我爱我家"
|
web = "我爱我家"
|
||||||
|
}else if(k=="fccs_avg_price"){
|
||||||
|
web = "房产超市"
|
||||||
}
|
}
|
||||||
|
|
||||||
ret << sourceMap.get(web)
|
ret << sourceMap.get(web)
|
||||||
@@ -584,6 +589,10 @@ class ThirdPartyPriceBatch extends BaseBatch {
|
|||||||
if(!dataMap.get("5i5j_esf_price") && db.get("5i5j_esf_price") && db.get("5i5j_esf_price")>3000){
|
if(!dataMap.get("5i5j_esf_price") && db.get("5i5j_esf_price") && db.get("5i5j_esf_price")>3000){
|
||||||
dataMap.put("5i5j_esf_price", db.get("5i5j_esf_price"))
|
dataMap.put("5i5j_esf_price", db.get("5i5j_esf_price"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!dataMap.get("fccs_esf_price") && db.get("fccs_esf_price") && db.get("fccs_esf_price")>3000){
|
||||||
|
dataMap.put("fccs_esf_price", db.get("fccs_esf_price"))
|
||||||
|
}
|
||||||
// if(db.zhugezhaofang_esf_price || db.anjuke_esf_price ||db.soufang_esf_price || db.lianjia_esf_price || db.cityhouse_esf_price || db.maitian_esf_price || db.beike_esf_price || db.get("365house_esf_price") || db.zhongyuan_esf_price || db.tuboshi_esf_price || db.qfang_esf_price || db.fangtan_esf_price || db.fangduoduo_esf_price || db.get("5i5j_esf_price")){
|
// if(db.zhugezhaofang_esf_price || db.anjuke_esf_price ||db.soufang_esf_price || db.lianjia_esf_price || db.cityhouse_esf_price || db.maitian_esf_price || db.beike_esf_price || db.get("365house_esf_price") || db.zhongyuan_esf_price || db.tuboshi_esf_price || db.qfang_esf_price || db.fangtan_esf_price || db.fangduoduo_esf_price || db.get("5i5j_esf_price")){
|
||||||
// map.put(key, db)
|
// map.put(key, db)
|
||||||
// }
|
// }
|
||||||
|
|||||||
+22
-13
@@ -35,7 +35,7 @@ class MinglujiData {
|
|||||||
}
|
}
|
||||||
def matchDev(prov, city){
|
def matchDev(prov, city){
|
||||||
def devs = loadAllDevs(prov)
|
def devs = loadAllDevs(prov)
|
||||||
ExcelUtils.modify("D:\\数据\\数据建设\\名录集\\${city}.xlsx",{d->
|
ExcelUtils.multiThreadingModify("D:\\数据\\数据建设\\名录集\\${city}.xlsx",{d->
|
||||||
if(d['E'] && !d['N'] ){
|
if(d['E'] && !d['N'] ){
|
||||||
def obj = findDevByName(d['E'])
|
def obj = findDevByName(d['E'])
|
||||||
if(!obj){
|
if(!obj){
|
||||||
@@ -67,8 +67,8 @@ class MinglujiData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def matchCommunity(city){
|
def matchCommunity(city){
|
||||||
ExcelUtils.modify("D:\\数据\\数据建设\\名录集\\${city}.xlsx",{d->
|
ExcelUtils.multiThreadingModify("D:\\数据\\数据建设\\名录集\\${city}-5.xlsx",{d->
|
||||||
if(d['A'] && d['B'] && d['L'] && !d['Q'] && d['L']=="东村委会"){
|
if(d['A'] && d['B'] && d['L'] && !d['Q']){
|
||||||
def list = findCommunityByName(d['A'], d['B'], d['L'])
|
def list = findCommunityByName(d['A'], d['B'], d['L'])
|
||||||
if(!list){
|
if(!list){
|
||||||
list = findCommunityBySimlar(d['A'], d['B'], d['L'])
|
list = findCommunityBySimlar(d['A'], d['B'], d['L'])
|
||||||
@@ -97,7 +97,7 @@ class MinglujiData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
def loadAllDevs(prov){
|
def loadAllDevs(prov){
|
||||||
@@ -110,19 +110,28 @@ class MinglujiData {
|
|||||||
name = name.replace("经济开发区", "经济技术开发区").replace("工业园区", "工业园")
|
name = name.replace("经济开发区", "经济技术开发区").replace("工业园区", "工业园")
|
||||||
def last = null
|
def last = null
|
||||||
for(def d : devs){
|
for(def d : devs){
|
||||||
def alias = null
|
def alias1 = null
|
||||||
if(!d.alias){
|
if(!d.alias){
|
||||||
alias = []
|
alias1 = []
|
||||||
}else{
|
}else{
|
||||||
alias = d.alias
|
alias1 = d.alias
|
||||||
}
|
}
|
||||||
alias << d.name
|
if(!alias1.contains(d.name)){
|
||||||
for(def n : alias){
|
alias1 << d.name
|
||||||
n = n.replace("经济开发区", "经济技术开发区").replace("工业园区", "工业园")
|
}
|
||||||
if(d.city && d.city.contains(city) && (n.contains(name) || name.contains(n))){
|
if(alias1){
|
||||||
last = d
|
try {
|
||||||
break
|
for(def n : alias1){
|
||||||
|
n = n.replace("经济开发区", "经济技术开发区").replace("工业园区", "工业园")
|
||||||
|
if(d.city && d.city.contains(city) && (n.contains(name) || name.contains(n))){
|
||||||
|
last = d
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch(exception){
|
||||||
|
println alias1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(last){
|
if(last){
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user