+32
-32
@@ -32,37 +32,37 @@ class ExportOracleDataTest {
|
|||||||
def lastMonthStr = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -1, "yyyy-MM")
|
def lastMonthStr = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -1, "yyyy-MM")
|
||||||
def new_dists = []
|
def new_dists = []
|
||||||
//不会变 10.25
|
//不会变 10.25
|
||||||
exportEvaluationRateData()
|
// exportEvaluationRateData()
|
||||||
exportBigdataPoiData()//
|
// exportBigdataPoiData()//
|
||||||
exportBigdataDistrictData()//
|
// exportBigdataDistrictData()//
|
||||||
|
//
|
||||||
exportGuidedPrice()//随人工改变//
|
// exportGuidedPrice()//随人工改变//
|
||||||
exportCommunityGuidedPrice(lastMonth.toString()+"28")//随政策//
|
// exportCommunityGuidedPrice(lastMonth.toString()+"28")//随政策//
|
||||||
|
//
|
||||||
//处理小区情况
|
// //处理小区情况
|
||||||
exportBigdataCommunity()//
|
// exportBigdataCommunity()//
|
||||||
exportCommunityStaging()//没cityid
|
// exportCommunityStaging()//没cityid
|
||||||
exportCommunityBuileType()//
|
// exportCommunityBuileType()//
|
||||||
|
//
|
||||||
exportThirdPartyPrice2(lastMonth, new_dists)//
|
// exportThirdPartyPrice2(lastMonth, new_dists)//
|
||||||
exportBigdataForsale(lastMonthStr +"-19", new_dists) //2022-07-19
|
// exportBigdataForsale(lastMonthStr +"-19", new_dists) //2022-07-19
|
||||||
exportBigdataDeal(lastMonthStr + "-01", new_dists) //2022-07-01
|
// exportBigdataDeal(lastMonthStr + "-01", new_dists) //2022-07-01
|
||||||
|
//
|
||||||
//第三方网站权重表
|
// //第三方网站权重表
|
||||||
exportWebsiteRate();
|
// exportWebsiteRate();
|
||||||
|
//
|
||||||
//计算结果相关
|
// //计算结果相关
|
||||||
exportAvmEvaluationGJNB(curMonth)//无城市区分
|
// exportAvmEvaluationGJNB(curMonth)//无城市区分
|
||||||
exportAVMEvaluationItemGJNB(curMonth)//无城市区分
|
// exportAVMEvaluationItemGJNB(curMonth)//无城市区分
|
||||||
|
//
|
||||||
exportCityPrice(curMonth)//无城市区分
|
// exportCityPrice(curMonth)//无城市区分
|
||||||
exportRegionPrice(curMonth)//无城市区分
|
// exportRegionPrice(curMonth)//无城市区分
|
||||||
|
//
|
||||||
exportCommunityBasePriceGj(curMonth)//已合下面的合并 //无城市区分
|
// exportCommunityBasePriceGj(curMonth)//已合下面的合并 //无城市区分
|
||||||
exportCommunityBasePrice(curMonth)//无城市区分
|
// exportCommunityBasePrice(curMonth)//无城市区分
|
||||||
|
//
|
||||||
exportCommunityPdescribeGj(curMonth)//无城市区分
|
// exportCommunityPdescribeGj(curMonth)//无城市区分
|
||||||
exportCommCaseDetailGj(curMonth)//无城市区分
|
// exportCommCaseDetailGj(curMonth)//无城市区分
|
||||||
|
|
||||||
def curDate = curMonth.toString()+"28"
|
def curDate = curMonth.toString()+"28"
|
||||||
// ok文件
|
// ok文件
|
||||||
@@ -1149,7 +1149,7 @@ class ExportOracleDataTest {
|
|||||||
|
|
||||||
def exportInOk(){
|
def exportInOk(){
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||||
Vector files = CcbFtpTestUtils.listFileNames(curDate)
|
Vector files = CcbFtpTestUtils.listFileNames(null, curDate)
|
||||||
Iterator fileVec = files.iterator()
|
Iterator fileVec = files.iterator()
|
||||||
def fileRows = []
|
def fileRows = []
|
||||||
while(fileVec.hasNext()){
|
while(fileVec.hasNext()){
|
||||||
|
|||||||
+49
-26
@@ -13,6 +13,8 @@ class ExportOracleEvaluationData {
|
|||||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||||
|
|
||||||
def citys = null
|
def citys = null
|
||||||
|
def cityCodeMap = CcbCommonUtils.findCityCodeValue()
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new ExportOracleEvaluationData()
|
def task = new ExportOracleEvaluationData()
|
||||||
task.run(args)
|
task.run(args)
|
||||||
@@ -45,12 +47,15 @@ class ExportOracleEvaluationData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def exportAvmEvaluationGJNB(yearMonth){
|
def exportAvmEvaluationGJNB(yearMonth){
|
||||||
|
|
||||||
|
def allRows = []
|
||||||
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
def sql = "select ID,CITYID,CITYNAME, YEAR_MONTH, COMMUNITY_NUM, HAS_PRICE_COMMUNITY_NUM, PRICE_COVERAGE, ARTIFICIAL_CALC_NUM, ARTIFICIAL_CALC_COVERAGE, SAMPLE_CALC_NUM, SAMPLE_CALC_COVERAGE, \n" +
|
def sql = "select ID,CITYID,CITYNAME, YEAR_MONTH, COMMUNITY_NUM, HAS_PRICE_COMMUNITY_NUM, PRICE_COVERAGE, ARTIFICIAL_CALC_NUM, ARTIFICIAL_CALC_COVERAGE, SAMPLE_CALC_NUM, SAMPLE_CALC_COVERAGE, \n" +
|
||||||
"ANN_CALC_NUM, ANN_CALC_COVERAGE, TEST_NUM, TEST_COMM_NUM, TEST_COMM_COVERAGE, PPE15_COVERAGE, RATE_MEDIAN, COEFFICIENT,DEAL_TEST_CASE_NUM, DEAL_TEST_COMM_NUM, DEAL_TEST_COMM_COVERAGE, DEAL_PPE15_COVERAGE, \n" +
|
"ANN_CALC_NUM, ANN_CALC_COVERAGE, TEST_NUM, TEST_COMM_NUM, TEST_COMM_COVERAGE, PPE15_COVERAGE, RATE_MEDIAN, COEFFICIENT,DEAL_TEST_CASE_NUM, DEAL_TEST_COMM_NUM, DEAL_TEST_COMM_COVERAGE, DEAL_PPE15_COVERAGE, \n" +
|
||||||
"DEAL_COEFFICIENT, DEAL_RATE_MEDIAN, THIRD_TEST_CASE_NUM, THIRD_TEST_COMM_NUM, THIRD_TEST_COMM_COVERAGE, THIRD_PPE15_COVERAGE, THIRD_COEFFICIENT, THIRD_RATE_MEDIAN, \n" +
|
"DEAL_COEFFICIENT, DEAL_RATE_MEDIAN, THIRD_TEST_CASE_NUM, THIRD_TEST_COMM_NUM, THIRD_TEST_COMM_COVERAGE, THIRD_PPE15_COVERAGE, THIRD_COEFFICIENT, THIRD_RATE_MEDIAN, \n" +
|
||||||
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from avm_evaluation_gj where YEAR_MONTH = ${yearMonth}";
|
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from avm_evaluation_gj where YEAR_MONTH = ${yearMonth} and CITYID='${cityCode}'";
|
||||||
def allRows = []
|
sqlInstance.eachRow(sql, { r ->
|
||||||
sqlInstance.eachRow(sql,{r->
|
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
data << r.CITYID
|
data << r.CITYID
|
||||||
@@ -88,6 +93,7 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.SOURCECODE
|
data << r.SOURCECODE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||||
def fileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.dat"
|
||||||
@@ -108,11 +114,15 @@ class ExportOracleEvaluationData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def exportAVMEvaluationItemGJNB(yearMonth){
|
def exportAVMEvaluationItemGJNB(yearMonth){
|
||||||
|
|
||||||
|
def allRows = []
|
||||||
|
|
||||||
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, CONFIDENCE,TARGET_AVG_PRICE, \n" +
|
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, CONFIDENCE,TARGET_AVG_PRICE, \n" +
|
||||||
"to_char(DEALDATE,'yyyy-mm-dd hh24:mi:ss') as DEALDATE, UNIT_PRICE, BUILDAREA, FITMENT, HOUSEASPECT, FLOORNUM, FLOORCNT, DATA_TYPE, RATE, PE, \n" +
|
"to_char(DEALDATE,'yyyy-mm-dd hh24:mi:ss') as DEALDATE, UNIT_PRICE, BUILDAREA, FITMENT, HOUSEASPECT, FLOORNUM, FLOORCNT, DATA_TYPE, RATE, PE, \n" +
|
||||||
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME from avm_evaluation_item_gj where YEAR_MONTH = ${yearMonth}";
|
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME from avm_evaluation_item_gj where YEAR_MONTH = ${yearMonth} AND CITYID='${cityCode}'";
|
||||||
def allRows = []
|
sqlInstance.eachRow(sql, { r ->
|
||||||
sqlInstance.eachRow(sql,{r->
|
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
data << r.CITYID
|
data << r.CITYID
|
||||||
@@ -140,6 +150,7 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.CREATETIME
|
data << r.CREATETIME
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||||
def fileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.dat"
|
||||||
@@ -158,9 +169,12 @@ class ExportOracleEvaluationData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def exportCommunityBasePrice(yearMonth){
|
def exportCommunityBasePrice(yearMonth){
|
||||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, FAKE_RATE, DIFF_RATE, CONFI_RATE, CORR_RATE, CONFIDENCE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_base_price_gj where year_month=${yearMonth}";
|
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql,{r->
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
|
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, FAKE_RATE, DIFF_RATE, CONFI_RATE, CORR_RATE, CONFIDENCE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_base_price_gj where year_month=${yearMonth} AND CITYID='${cityCode}'";
|
||||||
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
data << r.CITYID
|
data << r.CITYID
|
||||||
@@ -183,6 +197,7 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.SOURCECODE
|
data << r.SOURCECODE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||||
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat"
|
||||||
@@ -201,9 +216,12 @@ class ExportOracleEvaluationData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def exportCommunityBasePriceGj(yearMonth){
|
def exportCommunityBasePriceGj(yearMonth){
|
||||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, FAKE_RATE, DIFF_RATE, CONFI_RATE, CORR_RATE, CONFIDENCE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_base_price_gj where year_month=${yearMonth}";
|
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql,{r->
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
|
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, FAKE_RATE, DIFF_RATE, CONFI_RATE, CORR_RATE, CONFIDENCE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_base_price_gj where year_month=${yearMonth} AND CITYID='${cityCode}'";
|
||||||
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
data << r.CITYID
|
data << r.CITYID
|
||||||
@@ -226,6 +244,7 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.SOURCECODE
|
data << r.SOURCECODE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||||
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJ_ADD_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||||
@@ -240,9 +259,11 @@ class ExportOracleEvaluationData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def exportCityPrice(month){
|
def exportCityPrice(month){
|
||||||
def sql = "select ID, CITYID, CITYNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from city_price_gj where year_month=${month}";
|
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql,{r->
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
|
def sql = "select ID, CITYID, CITYNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from city_price_gj where year_month=${month} AND CITYID='${cityCode}'";
|
||||||
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
data << r.CITYID
|
data << r.CITYID
|
||||||
@@ -255,6 +276,7 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.SOURCECODE
|
data << r.SOURCECODE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||||
def fileName = "/ccb/MODEL_000000_000000_CITY_PRICE_GJ_ALL_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_CITY_PRICE_GJ_ALL_${curDate}_0001.dat"
|
||||||
@@ -269,9 +291,12 @@ class ExportOracleEvaluationData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def exportRegionPrice(month){
|
def exportRegionPrice(month){
|
||||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from DISTRICT_PRICE_GJ where year_month=${month}";
|
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql,{r->
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
|
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from DISTRICT_PRICE_GJ where year_month=${month} AND CITYID='${cityCode}'";
|
||||||
|
|
||||||
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
data << r.CITYID
|
data << r.CITYID
|
||||||
@@ -286,6 +311,7 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.SOURCECODE
|
data << r.SOURCECODE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||||
def fileName = "/ccb/MODEL_000000_000000_DISTRICT_PRICE_GJ_ALL_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_DISTRICT_PRICE_GJ_ALL_${curDate}_0001.dat"
|
||||||
@@ -301,20 +327,18 @@ class ExportOracleEvaluationData {
|
|||||||
|
|
||||||
def exportCommunityPdescribeGj(month){
|
def exportCommunityPdescribeGj(month){
|
||||||
|
|
||||||
// def citys = CcbCommonUtils.citys;
|
|
||||||
// def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||||
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_P_DESCRIBE_GJ_ADD_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_P_DESCRIBE_GJ_ADD_${curDate}_0001.dat"
|
||||||
if(CommonDatautils.isWindow()){
|
if(CommonDatautils.isWindow()){
|
||||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_COMMUNITY_P_DESCRIBE_GJ_ADD_${curDate}_0001.dat"
|
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_COMMUNITY_P_DESCRIBE_GJ_ADD_${curDate}_0001.dat"
|
||||||
}
|
}
|
||||||
def headers = []
|
def headers = []
|
||||||
//
|
|
||||||
// for(def city : citys) {
|
|
||||||
// def cityCode = cityCodeDataMap.get(city)
|
|
||||||
def sql = "select ID,COMMUNITY_ID,CITYID ,CITY_NAME,DISTRICT_CODE ,DISTRICT_NAME,COMMUNITY_NAME,PQ_NAME,BASE_PRICE,CONFIDENCE_LEVEL,CNT,MIN_PRICE,MEDIANPRICE,MEANPRICE,MAX_PRICE,TIME,FIRSTDATAT,THIRDDATA,RELATIVEERROR,SKEWNESS,PQ_PRICE_RANGE,DISTRICT_PRICE_RANGE ,DESCRIPTION,PRIV_BASE_PRICE,IS_ARTTFICIAL,PRIV_FINAL_PRICE,to_char(CREATE_DATE,'yyyy-mm-dd') as CREATE_DATE,PRICE,PRICE_SOURCE,CASE_MD_PRICE,CASE_AVG_PRICE,INDEX_LABEL,MAIN_PROPERTY,COMMTYPE,NEW_DEAL_PRICE,to_char(NEW_DEAL_DATE,'yyyy-mm-dd') as NEW_DEAL_DATE,PRICE_MOM_RATIO,MAX_MOM_RATIO,PRICE_YOY_RATIO ,SATUR_RATIO,NEIGHBOR_PRICE from community_p_describe_gj where time=${month}";
|
|
||||||
// def sql = "select ID,COMMUNITY_ID,CITYID ,CITY_NAME,DISTRICT_CODE ,DISTRICT_NAME,COMMUNITY_NAME,PQ_NAME,BASE_PRICE,CONFIDENCE_LEVEL,CNT,MIN_PRICE,MEDIANPRICE,MEANPRICE,MAX_PRICE,TIME,FIRSTDATAT,THIRDDATA,RELATIVEERROR,SKEWNESS,PQ_PRICE_RANGE,DISTRICT_PRICE_RANGE ,DESCRIPTION,PRIV_BASE_PRICE,IS_ARTTFICIAL,PRIV_FINAL_PRICE,to_char(CREATE_DATE,'yyyy-mm-dd') as CREATE_DATE,PRICE,PRICE_SOURCE,CASE_MD_PRICE,CASE_AVG_PRICE,INDEX_LABEL,MAIN_PROPERTY,COMMTYPE,NEW_DEAL_PRICE,to_char(NEW_DEAL_DATE,'yyyy-mm-dd') as NEW_DEAL_DATE,PRICE_MOM_RATIO,MAX_MOM_RATIO,PRICE_YOY_RATIO ,SATUR_RATIO,NEIGHBOR_PRICE from community_p_describe_gj where time in (202110,202111,202112,202201)";
|
|
||||||
def allRows = []
|
def allRows = []
|
||||||
|
|
||||||
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
|
def sql = "select ID,COMMUNITY_ID,CITYID ,CITY_NAME,DISTRICT_CODE ,DISTRICT_NAME,COMMUNITY_NAME,PQ_NAME,BASE_PRICE,CONFIDENCE_LEVEL,CNT,MIN_PRICE,MEDIANPRICE,MEANPRICE,MAX_PRICE,TIME,FIRSTDATAT,THIRDDATA,RELATIVEERROR,SKEWNESS,PQ_PRICE_RANGE,DISTRICT_PRICE_RANGE ,DESCRIPTION,PRIV_BASE_PRICE,IS_ARTTFICIAL,PRIV_FINAL_PRICE,to_char(CREATE_DATE,'yyyy-mm-dd') as CREATE_DATE,PRICE,PRICE_SOURCE,CASE_MD_PRICE,CASE_AVG_PRICE,INDEX_LABEL,MAIN_PROPERTY,COMMTYPE,NEW_DEAL_PRICE,to_char(NEW_DEAL_DATE,'yyyy-mm-dd') as NEW_DEAL_DATE,PRICE_MOM_RATIO,MAX_MOM_RATIO,PRICE_YOY_RATIO ,SATUR_RATIO,NEIGHBOR_PRICE from community_p_describe_gj where time=${month} AND CITYID='${cityCode}'";
|
||||||
|
|
||||||
sqlInstance.eachRow(sql, { r ->
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
data << r.ID
|
data << r.ID
|
||||||
@@ -360,9 +384,10 @@ class ExportOracleEvaluationData {
|
|||||||
data << r.NEIGHBOR_PRICE
|
data << r.NEIGHBOR_PRICE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
|
}
|
||||||
println allRows.size()
|
println allRows.size()
|
||||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||||
// }
|
|
||||||
println "community_p_describe_gj 数据文件输出完成......"
|
println "community_p_describe_gj 数据文件输出完成......"
|
||||||
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
||||||
println "community_p_describe_gj 上传Ftp完成......"
|
println "community_p_describe_gj 上传Ftp完成......"
|
||||||
@@ -370,8 +395,6 @@ class ExportOracleEvaluationData {
|
|||||||
|
|
||||||
def exportCommCaseDetailGj(month){
|
def exportCommCaseDetailGj(month){
|
||||||
|
|
||||||
// def citys = CcbCommonUtils.citys;
|
|
||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
|
||||||
|
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||||
def fileName = "/ccb/MODEL_000000_000000_COMM_CASE_DETAIL_GJ_ADD_${curDate}_0001.dat"
|
def fileName = "/ccb/MODEL_000000_000000_COMM_CASE_DETAIL_GJ_ADD_${curDate}_0001.dat"
|
||||||
@@ -381,8 +404,8 @@ class ExportOracleEvaluationData {
|
|||||||
def headers = []
|
def headers = []
|
||||||
|
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def cityCode = cityCodeDataMap.get(city)
|
def cityCode = cityCodeMap.get(city)
|
||||||
def sql = "select ID, CITYID, COMMUNITY_ID, NETLISTING_ID, PRICE_DATE, to_char(CREATE_DATE,'yyyy-mm-dd') as CREATE_DATE from comm_case_detail_gj where cityid='${cityCode}' and price_date=${month}";
|
def sql = "select ID, CITYID, COMMUNITY_ID, NETLISTING_ID, PRICE_DATE, to_char(CREATE_DATE,'yyyy-mm-dd') as CREATE_DATE from comm_case_detail_gj where cityid='${cityCode}' and price_date=${month} AND CITYID='${cityCode}'";
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql,{r->
|
sqlInstance.eachRow(sql,{r->
|
||||||
def data = []
|
def data = []
|
||||||
|
|||||||
Reference in New Issue
Block a user