From 5873c62bab26abcc9c744955d22b6c6e65000be7 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Thu, 27 Oct 2022 14:17:13 +0800 Subject: [PATCH] update --- .../BigdataCommunityBatch.groovy | 13 ++++--- .../ccbevaluation/CcbFtpTestUtils.groovy | 16 +++++++++ .../ExportOracleEvaluationData.groovy | 9 ++--- .../ccbevaluation/GuiDingPriceBatch.groovy | 2 +- .../script/gj/chongqingblank/DataMatch.groovy | 36 +++++++++---------- 5 files changed, 46 insertions(+), 30 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy index a96bb9b09..fafe61ba9 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy @@ -36,7 +36,7 @@ class BigdataCommunityBatch extends BaseBatch{ @Override public void process(Object args) { - def citys = CcbCommonUtils.citys_92; + def citys = CcbCommonUtils.getRunningCitys(args) def rows = [] @@ -108,7 +108,6 @@ class BigdataCommunityBatch extends BaseBatch{ if(ret){ rets << ret } - } catch (Exception e) { e.printStackTrace() } finally { @@ -180,15 +179,15 @@ class BigdataCommunityBatch extends BaseBatch{ if(dist.address){ jsonObj = FangjiaClientUtils.addressStructure(dist.city, dist.address) } - if(jsonObj && jsonObj.street){ - if(jsonObj.street){ - ret << jsonObj.street + if(jsonObj && jsonObj.result && jsonObj.result.street){ + if(jsonObj.result.street){ + ret << jsonObj.result.street }else{ ret << "" } - if(jsonObj.streetNumber){ - ret << jsonObj.streetNumber + if(jsonObj.result.streetNumber){ + ret << jsonObj.result.streetNumber }else{ ret << "" } diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbFtpTestUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbFtpTestUtils.groovy index 7083cb615..b9f4572e5 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbFtpTestUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbFtpTestUtils.groovy @@ -70,6 +70,22 @@ class CcbFtpTestUtils { } + static def listFileNames(month){ + //上传到ftp + sftpChannel = reConnect(); + Vector files = sftp.listFiles(ftpPath+ month+"/", sftpChannel); + return files + } + + static def getFileLength(String path, String month){ + sftpChannel = reConnect(); + def size = sftp.getFileSize(ftpPath+ month+"/"+path, sftpChannel) + return size + } + + + + static main(args) { diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ExportOracleEvaluationData.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ExportOracleEvaluationData.groovy index 7258934fa..b37ee5b94 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ExportOracleEvaluationData.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ExportOracleEvaluationData.groovy @@ -12,13 +12,14 @@ class ExportOracleEvaluationData { def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.236:1521:orcl", "GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver") + def citys = null static main(args) { def task = new ExportOracleEvaluationData() - task.run() + task.run(args) } - def run() { - + def run(args) { + citys = CcbCommonUtils.getRunningCitys(args) def curMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), 0, "yyyyMM")); //计算结果相关 @@ -369,7 +370,7 @@ class ExportOracleEvaluationData { def exportCommCaseDetailGj(month){ - def citys = CcbCommonUtils.citys; +// def citys = CcbCommonUtils.citys; def cityCodeDataMap = CcbCommonUtils.findCityCodeValue() def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28" diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy index c390e6c83..6981c7149 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy @@ -44,7 +44,7 @@ class GuiDingPriceBatch extends BaseBatch{ def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city) //添加自己库中的人工指导价 - def prices = CcbCommonUtils.findPersonPrice(city, "2022-10-21", "2022-10-22") + def prices = CcbCommonUtils.findPersonPrice(city, "2022-10-22", "2022-10-27") if(prices){ def distMap = getDistrictMap(city) def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/chongqingblank/DataMatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/chongqingblank/DataMatch.groovy index bba57a816..cb615604a 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/chongqingblank/DataMatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/chongqingblank/DataMatch.groovy @@ -30,28 +30,28 @@ class DataMatch { // println task.findAddress("昌州街道棠香路") // task.run2MatchV2( "D:\\数据\\重庆农商行\\估值1-V2.xlsx") - task.fzWeiyuanshuMatch("D:\\数据\\福州\\商品住房楼盘评估指导参考价情况表_匹配.xlsx") + task.fzWeiyuanshuMatch("D:\\数据\\福州\\连江楼盘.xlsx") } def fzWeiyuanshuMatch(fileName){ - ExcelUtils.modify(fileName,{d-> - if(!d['K'] && d['C']){ - def arr = OpenApiClient.search("福州", d['G'], d['C']) - if(arr){ - d['H'] = arr.city - d['I'] = arr.district - d['J'] = arr.name - } - } + ExcelUtils.multiThreadingModify(fileName,{d-> +// if(!d['G']){ +// def arr = OpenApiClient.search("福州", "连江", d['C']) +// if(arr){ +// d['E'] = arr.city +// d['F'] = arr.district +// d['G'] = arr.name +// } +// } -// def results = null -// if(!d['K'] && d['C']){ -// results = OpenApiClient.addressMatch("福州",d['C'], "property", false, "长乐", null) -// } -// if(results && results.precise>=0){ -// d['L'] = results.district -// d['M'] = results.name -// } + def results = null + if(d['H'] && d['H']=="F" && d['C']){ + results = OpenApiClient.addressMatch("福州",d['C'], "property", false, "连江", null) + } + if(results && results.precise>=0){ + d['J'] = results.district + d['K'] = results.name + } },0) }