From 39ea0af0bdc3df6f40752f398e32948c3ce6db7f Mon Sep 17 00:00:00 2001 From: gaojuan Date: Thu, 21 Oct 2021 18:49:41 +0800 Subject: [PATCH] update --- .../fangjia/script/ccbevaluation/CcbCommonUtils.groovy | 3 ++- .../ronghe/BigdataCommunityGJRHBatch.groovy | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbCommonUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbCommonUtils.groovy index 59ffd572d..d7735dfe7 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbCommonUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/CcbCommonUtils.groovy @@ -235,7 +235,7 @@ class CcbCommonUtils { } public static def findAllDistrictsByOracle(def cityid){ - def sql = "select CITYID,COMMID,COMMNAME,COMMALIAS,DISTID,STREET,STREETNO,ADDRESS,LANDAREA,BUILDAREA,COMMTYPE,IFNEW,GREENINGRATE,PLOTRATIO,PARKINGCNT,INTRODUCTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,WORKDATE,ZTS,LONGITUDE,LATITUDE from bigdata_community_gj where cityId=${cityid} and status=0"; + def sql = "select CITYID,COMMID,COMMNAME,COMMALIAS,DISTID,STREET,STREETNO,ADDRESS,LANDAREA,BUILDAREA,COMMTYPE,IFNEW,GREENINGRATE,PLOTRATIO,PARKINGCNT,INTRODUCTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,WORKDATE,ZTS,LONGITUDE,LATITUDE from bigdata_community_gj where cityId='${cityid}' and status=0 "; def rows = [] try{ sqlInstance.eachRow(sql,{r-> @@ -267,6 +267,7 @@ class CcbCommonUtils { }); }catch(Exception e){ findAllDistrictsByOracle(cityid) + e.printStackTrace() } return rows diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCommunityGJRHBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCommunityGJRHBatch.groovy index 2323d31d7..5808a5da4 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCommunityGJRHBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ronghe/BigdataCommunityGJRHBatch.groovy @@ -35,7 +35,7 @@ class BigdataCommunityGJRHBatch extends BaseBatch { def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl", "GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver") - public static def batchsize = 100 + public static def batchsize = 1000 static main(args) { runBatch(new BigdataCommunityGJRHBatch(), args); } @@ -43,9 +43,10 @@ class BigdataCommunityGJRHBatch extends BaseBatch { @Override public void process(Object args) { - def citys = ["郑州","长沙","西安","南京"]//CcbCommonUtils.citys; - citys.remove("厦门") - citys.remove("杭州") + //"郑州","长沙","西安", + def citys = ["长沙","西安"]//CcbCommonUtils.citys; +// citys.remove("厦门") +// citys.remove("杭州") def rows = [] // addBigdataDistrictFJW()