修改
This commit is contained in:
+32
-4
@@ -25,6 +25,10 @@ class AddPriceTest {
|
|||||||
def pgsqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse",
|
def pgsqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse",
|
||||||
"postgres", "postgres", "org.postgresql.Driver")
|
"postgres", "postgres", "org.postgresql.Driver")
|
||||||
|
|
||||||
|
//235为房价网内部计算均价的库
|
||||||
|
def pgsqlInstance235 = Sql.newInstance("jdbc:postgresql://192.168.0.235:5433/fangjia?stringtype=unspecified",
|
||||||
|
"postgres", "Goojia123456", "org.postgresql.Driver")
|
||||||
|
|
||||||
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")
|
||||||
public static final DBCollection confirm_price_date = MongoUtils.getCollectionByName("fangjia", "confirm_price_data", "mongo.db.fangjia.com")
|
public static final DBCollection confirm_price_date = MongoUtils.getCollectionByName("fangjia", "confirm_price_data", "mongo.db.fangjia.com")
|
||||||
|
|
||||||
@@ -33,7 +37,7 @@ class AddPriceTest {
|
|||||||
task.run();
|
task.run();
|
||||||
}
|
}
|
||||||
def run(){
|
def run(){
|
||||||
def filePath = "D:\\数据\\建行\\房产估值\\20240716-20240815 _业务反馈价格.xlsx"
|
def filePath = "D:\\数据\\建行\\房产估值\\建行业务反馈badcase.xlsx"
|
||||||
// addGXDPrice(filePath)
|
// addGXDPrice(filePath)
|
||||||
addCcbPrice(filePath)
|
addCcbPrice(filePath)
|
||||||
// addThirdPrice(filePath)
|
// addThirdPrice(filePath)
|
||||||
@@ -173,17 +177,22 @@ class AddPriceTest {
|
|||||||
def cityId = cityCodeDataMap.get(d['V'])
|
def cityId = cityCodeDataMap.get(d['V'])
|
||||||
def map = findAvgPrice(d['U'], cityId)
|
def map = findAvgPrice(d['U'], cityId)
|
||||||
if(map){
|
if(map){
|
||||||
d['F'] = map.avg_price
|
d['H'] = map.avg_price
|
||||||
// d['P'] = map.calc_type
|
d['I'] = map.calc_type
|
||||||
// d['AM'] = map.credit_value
|
// d['AM'] = map.credit_value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// def newPriceMap = findNewFjwAvgPrice(d['U'], cityId)
|
||||||
|
// if(newPriceMap){
|
||||||
|
// d['Q'] = newPriceMap.avg_price
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def findAvgPrice(def commid, def cityid){
|
def findAvgPrice(def commid, def cityid){
|
||||||
def sql = "SELECT gujia_bds_clc_avprc,gujia_bds_clmtd,gujiabds_clc_yrmo_val,gujia_bds_cfdc_dgr from t_app_p9pha_plda.avm_community_base_price_gj_h where urbn_id='${cityid}' and gujia_bds_id='${commid}' and gujiabds_clc_yrmo_val=202407 order by gujiabds_clc_yrmo_val desc limit 1"
|
def sql = "SELECT gujia_bds_clc_avprc,gujia_bds_clmtd,gujiabds_clc_yrmo_val,gujia_bds_cfdc_dgr from t_app_p9pha_plda.avm_community_base_price_gj_h where urbn_id='${cityid}' and gujia_bds_id='${commid}' and gujiabds_clc_yrmo_val=202409 order by gujiabds_clc_yrmo_val desc limit 1"
|
||||||
def map = [:]
|
def map = [:]
|
||||||
pgsqlInstance.eachRow(sql, { r ->
|
pgsqlInstance.eachRow(sql, { r ->
|
||||||
map.avg_price = r.gujia_bds_clc_avprc
|
map.avg_price = r.gujia_bds_clc_avprc
|
||||||
@@ -202,6 +211,25 @@ class AddPriceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def findNewFjwAvgPrice(def commid, def cityid){
|
||||||
|
def sql = "SELECT gujia_bds_clc_avprc,gujia_bds_clmtd,gujiabds_clc_yrmo_val,gujia_bds_cfdc_dgr from price_stat.avm_community_base_price where urbn_id='${cityid}' and gujia_bds_id='${commid}' and gujiabds_clc_yrmo_val=202409 order by gujiabds_clc_yrmo_val desc limit 1"
|
||||||
|
def map = [:]
|
||||||
|
pgsqlInstance235.eachRow(sql, { r ->
|
||||||
|
map.avg_price = r.gujia_bds_clc_avprc
|
||||||
|
map.type = r.gujia_bds_clmtd
|
||||||
|
map.month = r.gujiabds_clc_yrmo_val
|
||||||
|
map.credit_value = r.gujia_bds_cfdc_dgr
|
||||||
|
if(r.gujia_bds_clmtd == 1){
|
||||||
|
map.calc_type = "人工估值"
|
||||||
|
}else if(r.gujia_bds_clmtd == 2){
|
||||||
|
map.calc_type = "样本计算"
|
||||||
|
}else if(r.gujia_bds_clmtd == 3){
|
||||||
|
map.calc_type = "神经网络"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return map
|
||||||
|
}
|
||||||
|
|
||||||
def addThirdPrice(filepath){
|
def addThirdPrice(filepath){
|
||||||
ExcelUtils.multiThreadingModify(filepath, { d ->
|
ExcelUtils.multiThreadingModify(filepath, { d ->
|
||||||
if (!d['X']) {
|
if (!d['X']) {
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ class DataStandardBatch extends BaseBatch{
|
|||||||
private static def districtMap = [:];
|
private static def districtMap = [:];
|
||||||
private static def limit = 5000;
|
private static def limit = 5000;
|
||||||
|
|
||||||
def static final SHORT_DATE = Integer.parseInt(com.fangjia.script.util.DateUtils.addMonth(com.fangjia.script.util.DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -2, "yyyyMM"));
|
def static final SHORT_DATE = Integer.parseInt(com.fangjia.script.util.DateUtils.addMonth(com.fangjia.script.util.DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||||
def static final statusMap = ["城市未匹配":1,"区域未匹配":2,"小区匹配失败":3,"小区匹配成功":4,"异常错误":5, "无价格":6, "无名称":7]
|
def static final statusMap = ["城市未匹配":1,"区域未匹配":2,"小区匹配失败":3,"小区匹配成功":4,"异常错误":5, "无价格":6, "无名称":7]
|
||||||
|
|
||||||
def static final websites = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集", "链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋","幸福里","中国房价行情","常州住房"]
|
def static final websites = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集", "链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋","幸福里","中国房价行情","常州住房"]
|
||||||
|
|||||||
+4
@@ -76,6 +76,10 @@ class SynchDistrictPrice extends BaseBatch{
|
|||||||
data.put("build_type",d.build_type)
|
data.put("build_type",d.build_type)
|
||||||
data.put("c_date", new Date())
|
data.put("c_date", new Date())
|
||||||
data.put("m_date", new Date())
|
data.put("m_date", new Date())
|
||||||
|
// if(d.location){
|
||||||
|
// data.put("lng", d.location.x)
|
||||||
|
// data.put("lat", d.location.y)
|
||||||
|
// }
|
||||||
rets << data
|
rets << data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user