建行15号同步准备
This commit is contained in:
+9
-9
@@ -62,17 +62,17 @@ class ExportOracleAllDataTest {
|
|||||||
exportWebsiteRate();
|
exportWebsiteRate();
|
||||||
//
|
//
|
||||||
// //计算结果相关
|
// //计算结果相关
|
||||||
// exportAvmEvaluationGJNB()//
|
exportAvmEvaluationGJNB()//
|
||||||
// exportAVMEvaluationItemGJNB()//
|
exportAVMEvaluationItemGJNB()//
|
||||||
|
|
||||||
|
exportCityPrice()//
|
||||||
|
exportRegionPrice()//
|
||||||
//
|
//
|
||||||
// exportCityPrice()//
|
exportCommunityBasePriceGj()//
|
||||||
// exportRegionPrice()//
|
exportCommunityBasePrice()//
|
||||||
//
|
//
|
||||||
// exportCommunityBasePriceGj()//
|
exportCommunityPdescribeGj()//
|
||||||
// exportCommunityBasePrice()//
|
exportCommCaseDetailGj()//
|
||||||
//
|
|
||||||
// exportCommunityPdescribeGj()//
|
|
||||||
// exportCommCaseDetailGj()//
|
|
||||||
|
|
||||||
def curDate = curMonth.toString()+"28"
|
def curDate = curMonth.toString()+"28"
|
||||||
// ok文件
|
// ok文件
|
||||||
|
|||||||
+68
@@ -49,6 +49,10 @@ class ExportDistrictRongHe extends BaseBatch{
|
|||||||
exportBigdataBuildprojFjw()
|
exportBigdataBuildprojFjw()
|
||||||
exportBigdataCommlayoutpicFjw()
|
exportBigdataCommlayoutpicFjw()
|
||||||
exportEvaluateRate()
|
exportEvaluateRate()
|
||||||
|
|
||||||
|
//因为融合暂不切库,所以需要加传一张第三方均价表到融合中, 从1月10日开始传输
|
||||||
|
def lastMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||||
|
exportThirdPartyPrice2(lastMonth, new_dists)
|
||||||
}
|
}
|
||||||
SSHHelper jschCommand = new SSHHelper();
|
SSHHelper jschCommand = new SSHHelper();
|
||||||
System.out.println(jschCommand.executeCommand("sh /home/ccb_rh/output/rh_package.sh ${curDate}"));
|
System.out.println(jschCommand.executeCommand("sh /home/ccb_rh/output/rh_package.sh ${curDate}"));
|
||||||
@@ -801,6 +805,70 @@ class ExportDistrictRongHe extends BaseBatch{
|
|||||||
println "EVALUATE_RATE_FJW 上传Ftp完成......"
|
println "EVALUATE_RATE_FJW 上传Ftp完成......"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def exportThirdPartyPrice2(price_date, new_dists) {
|
||||||
|
|
||||||
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||||
|
def fileName = "/ccb_rh/FJW_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
if (CommonDatautils.isWindow()) {
|
||||||
|
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\ccb_rh\\${curDate}\\FJW_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
}
|
||||||
|
def headers = []
|
||||||
|
def index = 0
|
||||||
|
for(def city : citys) {
|
||||||
|
def cityCode = cityCodeMap.get(city)
|
||||||
|
def allRows = []
|
||||||
|
if(new_dists) {
|
||||||
|
def newstr = "('"+new_dists.join("','")+"')"
|
||||||
|
def sql1 = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, " +
|
||||||
|
"COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where " +
|
||||||
|
"CITYID='${cityCode}' and price_date=${price_date} and distid not in ${newstr} ";
|
||||||
|
def rets1 = getThirdPartyDatas(sql1)
|
||||||
|
allRows.addAll(rets1)
|
||||||
|
|
||||||
|
def sql2 = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, " +
|
||||||
|
"COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where " +
|
||||||
|
"CITYID='${cityCode}' and distid in ${newstr} ";
|
||||||
|
def rets2 = getThirdPartyDatas(sql2)
|
||||||
|
allRows.addAll(rets2)
|
||||||
|
}else{
|
||||||
|
def sql = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where CITYID='${cityCode}' and price_date=${price_date} ";
|
||||||
|
allRows = getThirdPartyDatas(sql)
|
||||||
|
}
|
||||||
|
if(allRows && allRows.size()>0){
|
||||||
|
index = index + 1
|
||||||
|
if(index==1){
|
||||||
|
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||||
|
}else{
|
||||||
|
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println "BIGDATA_THIRD_PARTY_PRICE_GJ 数据文件输出完成......"
|
||||||
|
CcbFtpUtils.ftpUpload('rh', fileName, curDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
def getThirdPartyDatas(def sql){
|
||||||
|
def allRows = []
|
||||||
|
sqlInstance.eachRow(sql, { r ->
|
||||||
|
def data = []
|
||||||
|
data << r.ID
|
||||||
|
data << r.CITYID
|
||||||
|
data << r.DISTID
|
||||||
|
data << r.COMMID
|
||||||
|
data << r.COMMNAME
|
||||||
|
data << r.DATA_SOURCE_ID
|
||||||
|
data << r.DATA_SOURCE
|
||||||
|
data << r.PRICE_DATE
|
||||||
|
data << r.COMMUNITY_PRICE
|
||||||
|
data << r.COMMUNITY_MAX_PRICE
|
||||||
|
data << r.COMMUNITY_MIN_PRICE
|
||||||
|
data << r.UPDATETIME
|
||||||
|
allRows << data
|
||||||
|
})
|
||||||
|
return allRows;
|
||||||
|
}
|
||||||
|
|
||||||
def exportBigdataBuildprojFjw(){
|
def exportBigdataBuildprojFjw(){
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"10"
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"10"
|
||||||
def fileName = "/ccb_rh/${curDate}/FJW_000000_000000_BIGDATA_BUILDPROJ_FJW_ALL_${curDate}_0001.dat"
|
def fileName = "/ccb_rh/${curDate}/FJW_000000_000000_BIGDATA_BUILDPROJ_FJW_ALL_${curDate}_0001.dat"
|
||||||
|
|||||||
+9
-4
@@ -90,10 +90,15 @@ class FangjiaClientUtils {
|
|||||||
def jsonObj = null
|
def jsonObj = null
|
||||||
def content = null
|
def content = null
|
||||||
try {
|
try {
|
||||||
address = address.replace("{","")
|
if(address){
|
||||||
def url = "http://192.168.0.19:31080/FangJiaAddressService/structure/v2?address="+URLEncoder.encode(address,"UTF-8")+"&city="+URLEncoder.encode(city,"UTF-8")
|
address = address.replace("{","")
|
||||||
content = new HttpRequest().newGet(url, null, "utf-8")
|
def url = "http://192.168.0.19:31080/FangJiaAddressService/structure/v2?address="+URLEncoder.encode(address,"UTF-8")
|
||||||
jsonObj = JSONObject.fromObject(content)
|
if(city){
|
||||||
|
url = url +"&city="+URLEncoder.encode(city,"UTF-8")
|
||||||
|
}
|
||||||
|
content = new HttpRequest().newGet(url, null, "utf-8")
|
||||||
|
jsonObj = JSONObject.fromObject(content)
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
println address +" "+content
|
println address +" "+content
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user