+2
-1
@@ -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
|
||||
|
||||
+5
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user