update
This commit is contained in:
+1
-1
@@ -255,7 +255,7 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
println "start: "+new Date()
|
println "start: "+new Date()
|
||||||
def sql = "insert into base.t0831_bigdata_community_gj_h values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
|
def sql = "insert into base.t0831_bigdata_community_gj_h values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
|
||||||
|
|
||||||
sqlInstance.withBatch(10, sql){ ps->
|
sqlInstance.withBatch(20000, sql){ ps->
|
||||||
for(def r : rows) {
|
for(def r : rows) {
|
||||||
ps.addBatch(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15], r[16], r[17], r[18], r[19], r[20],
|
ps.addBatch(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15], r[16], r[17], r[18], r[19], r[20],
|
||||||
r[21], r[22], r[23], r[24], r[25], r[26], r[27], r[28], r[29], r[30], r[31], r[32], r[33], r[34], r[35], r[36], r[37], r[38])
|
r[21], r[22], r[23], r[24], r[25], r[26], r[27], r[28], r[29], r[30], r[31], r[32], r[33], r[34], r[35], r[36], r[37], r[38])
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ class BigdataForsaleBatch extends BaseBatch{
|
|||||||
//目前查询库中是否已存在,用的是Oracle
|
//目前查询库中是否已存在,用的是Oracle
|
||||||
def index = 0
|
def index = 0
|
||||||
def citys = CcbCommonUtils.getRunningCitys(args)
|
def citys = CcbCommonUtils.getRunningCitys(args)
|
||||||
citys = ["迪庆州"]
|
|
||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -217,10 +217,10 @@ class FjwPricePkCcbPrice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def standRegion(){
|
def standRegion(){
|
||||||
ExcelUtils.multiThreadingModify("C:\\Users\\gaojuan\\Downloads\\写字楼入clickhouse.xlsx",{d->
|
ExcelUtils.multiThreadingModify("D:\\数据\\建行\\房产估值\\指导价\\人工指导价录入3月20日.xlsx",{d->
|
||||||
if(!d['S']){
|
if(!d['J']){
|
||||||
def newRegion = RegionData.formatRegion(d['A'], d['B'].replace("区区","区"))
|
def newRegion = RegionData.formatRegion(d['A'], d['B'])
|
||||||
d['X'] = newRegion
|
d['J'] = newRegion
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-41
@@ -43,49 +43,49 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(Object args) {
|
public void process(Object args) {
|
||||||
def citys = CcbCommonUtils.getRunningCitys(args)
|
// def citys = CcbCommonUtils.getRunningCitys(args)
|
||||||
def rows = []
|
// def rows = []
|
||||||
|
//
|
||||||
CcbCommonUtils.deleteGuidedPrice(curDate)
|
// CcbCommonUtils.deleteGuidedPrice(curDate)
|
||||||
for (def city : citys) {
|
// for (def city : citys) {
|
||||||
def cityCodeDatas = CcbCommonUtils.findCityCodeValue()
|
// def cityCodeDatas = CcbCommonUtils.findCityCodeValue()
|
||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
// def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
|
//
|
||||||
//添加自己库中的人工指导价
|
// //添加自己库中的人工指导价
|
||||||
def prices = CcbCommonUtils.findPersonPrice(city, "2023-01-25", "2023-02-27")
|
// def prices = CcbCommonUtils.findPersonPrice(city, "2023-01-25", "2023-02-27")
|
||||||
// def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22")
|
//// def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22")
|
||||||
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)
|
||||||
rows.addAll(rets)
|
// rows.addAll(rets)
|
||||||
println city + " " + rets.size()
|
// println city + " " + rets.size()
|
||||||
}
|
|
||||||
|
|
||||||
//添加搜房的参考价
|
|
||||||
// def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lng","estate_type2","name_cat", "alias"]);
|
|
||||||
// def datas = findFangDatas(districts)
|
|
||||||
// def fangRets = createDatas(cityCodeDatas, distCodeMap, datas)
|
|
||||||
// rows.addAll(fangRets)
|
|
||||||
|
|
||||||
//添加保亭文昌的指导价
|
|
||||||
// def cityDatas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\文昌-保亭待调查小区价格 - 210902(1).xlsx")
|
|
||||||
// def cityDataMap = [:]
|
|
||||||
// for(def d : cityDatas){
|
|
||||||
// cityDataMap.put(d['A'], d['E'])
|
|
||||||
// }
|
// }
|
||||||
// def personDatas = findPersonDatas(districts, cityDataMap);
|
//
|
||||||
// def personRets = createDatas(cityCodeDatas, distCodeMap, personDatas)
|
// //添加搜房的参考价
|
||||||
// rows.addAll(personRets)
|
//// def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lng","estate_type2","name_cat", "alias"]);
|
||||||
|
//// def datas = findFangDatas(districts)
|
||||||
}
|
//// def fangRets = createDatas(cityCodeDatas, distCodeMap, datas)
|
||||||
|
//// rows.addAll(fangRets)
|
||||||
def headers = []//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","指导日期","指导价格","添加人","备注","创建时间","更新时间","来源公司"]
|
//
|
||||||
FileUtils.batchCreateFile(rows, "d:\\数据\\建行\\房产估值\\数据文件\\txt\\GUIDED_PRICE_GJ.dat", headers, "utf-8", false);
|
// //添加保亭文昌的指导价
|
||||||
|
//// def cityDatas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\文昌-保亭待调查小区价格 - 210902(1).xlsx")
|
||||||
saveToPgSql(rows)
|
//// def cityDataMap = [:]
|
||||||
|
//// for(def d : cityDatas){
|
||||||
|
//// cityDataMap.put(d['A'], d['E'])
|
||||||
|
//// }
|
||||||
|
//// def personDatas = findPersonDatas(districts, cityDataMap);
|
||||||
|
//// def personRets = createDatas(cityCodeDatas, distCodeMap, personDatas)
|
||||||
|
//// rows.addAll(personRets)
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// def headers = []//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","指导日期","指导价格","添加人","备注","创建时间","更新时间","来源公司"]
|
||||||
|
// FileUtils.batchCreateFile(rows, "d:\\数据\\建行\\房产估值\\数据文件\\txt\\GUIDED_PRICE_GJ.dat", headers, "utf-8", false);
|
||||||
|
//
|
||||||
|
// saveToPgSql(rows)
|
||||||
|
|
||||||
//更新静态数据表
|
//更新静态数据表
|
||||||
// updateVersion(DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-28")
|
updateVersion(DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-28")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
}
|
}
|
||||||
|
|
||||||
def updateVersion(def time){
|
def updateVersion(def time){
|
||||||
def tables = ["t0831_website_config_gj_h","t0831_bigdata_district_gj_h","t0831_evaluate_rate_gj_h","t0831_bigdata_poi_gj_h","t0831_guided_price_gj_h","t0831_community_staging_gj_h"]
|
def tables = ["t0831_website_config_gj_h","t0831_bigdata_district_gj_h","t0831_evaluate_rate_gj_h","t0831_bigdata_poi_gj_h","t0831_guided_price_gj_h","t0831_community_staging_gj_h","t0831_community_guide_price_gj_h"]
|
||||||
for(def tableName : tables){
|
for(def tableName : tables){
|
||||||
def sql = "update base."+tableName+" set p9_start_date='"+time+"'"
|
def sql = "update base."+tableName+" set p9_start_date='"+time+"'"
|
||||||
pgsqlInstance.executeUpdate(sql)
|
pgsqlInstance.executeUpdate(sql)
|
||||||
|
|||||||
+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= 202301//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
def sDate= 202302//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||||
def startDate = 202211
|
def startDate = 202212
|
||||||
def endDate = 202301
|
def endDate = 202302
|
||||||
// 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")
|
||||||
|
|||||||
Reference in New Issue
Block a user