From 080d56715bb15d2dfa7525e1faff275db21b3f9f Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 23 May 2023 09:34:52 +0800 Subject: [PATCH] update --- .../pgsql/ExportAllPgData.groovy | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/pgsql/ExportAllPgData.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/pgsql/ExportAllPgData.groovy index b7a80e140..0a01037d3 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/pgsql/ExportAllPgData.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/pgsql/ExportAllPgData.groovy @@ -53,17 +53,17 @@ class ExportAllPgData { //计算结果相关 - exportAvmEvaluationGJNB() - exportAVMEvaluationItemGJNB() - - exportCityPrice() - exportRegionPrice() +// exportAvmEvaluationGJNB() +// exportAVMEvaluationItemGJNB() +// +// exportCityPrice() +// exportRegionPrice() exportCommunityBasePrice() // exportCommunityBasePrice1(curMonth) - exportCommunityPdescribeGj() - exportCommCaseDetailGj() +// exportCommunityPdescribeGj() +// exportCommCaseDetailGj() // exportInOk() // @@ -795,6 +795,13 @@ class ExportAllPgData { def exportCommunityBasePrice(){ + def fileName = linux_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat" + def fileName1 = linux_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJ_ADD_${curDate}_0001.dat" + if(CommonDatautils.isWindow()){ + fileName = win_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat" + fileName1 = win_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJ_ADD_${curDate}_0001.dat" + } + def allRows = [] for(def city : citys) { def cityCode = cityCodeMap.get(city) @@ -821,18 +828,18 @@ class ExportAllPgData { data << r.data_udt_tm data << r.gujia_src_co allRows << data - + if(allRows.size()%200000==0){ + createFileToFtp("COMMUNITY_BASE_PRICE_GJNB",allRows, fileName, curDate, true) + createFileToFtp("COMMUNITY_BASE_PRICE_GJ",allRows, fileName1, curDate, true) + allRows.clear() + } }); } - def fileName = linux_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat" - def fileName1 = linux_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJ_ADD_${curDate}_0001.dat" - if(CommonDatautils.isWindow()){ - fileName = win_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat" - fileName1 = win_prefix + "MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJ_ADD_${curDate}_0001.dat" + if(allRows.size()>0){ + createFileToFtp("COMMUNITY_BASE_PRICE_GJNB",allRows, fileName, curDate, true) + createFileToFtp("COMMUNITY_BASE_PRICE_GJ",allRows, fileName1, curDate, true) } - createFileToFtp("COMMUNITY_BASE_PRICE_GJNB",allRows, fileName, curDate, false) - createFileToFtp("COMMUNITY_BASE_PRICE_GJ",allRows, fileName1, curDate, false) }