+2
-1
@@ -235,7 +235,7 @@ class CcbCommonUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static def findAllDistrictsByOracle(def cityid){
|
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 = []
|
def rows = []
|
||||||
try{
|
try{
|
||||||
sqlInstance.eachRow(sql,{r->
|
sqlInstance.eachRow(sql,{r->
|
||||||
@@ -267,6 +267,7 @@ class CcbCommonUtils {
|
|||||||
});
|
});
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
findAllDistrictsByOracle(cityid)
|
findAllDistrictsByOracle(cityid)
|
||||||
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
return rows
|
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",
|
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||||
|
|
||||||
public static def batchsize = 100
|
public static def batchsize = 1000
|
||||||
static main(args) {
|
static main(args) {
|
||||||
runBatch(new BigdataCommunityGJRHBatch(), args);
|
runBatch(new BigdataCommunityGJRHBatch(), args);
|
||||||
}
|
}
|
||||||
@@ -43,9 +43,10 @@ class BigdataCommunityGJRHBatch extends BaseBatch {
|
|||||||
@Override
|
@Override
|
||||||
public void process(Object args) {
|
public void process(Object args) {
|
||||||
|
|
||||||
def citys = ["郑州","长沙","西安","南京"]//CcbCommonUtils.citys;
|
//"郑州","长沙","西安",
|
||||||
citys.remove("厦门")
|
def citys = ["长沙","西安"]//CcbCommonUtils.citys;
|
||||||
citys.remove("杭州")
|
// citys.remove("厦门")
|
||||||
|
// citys.remove("杭州")
|
||||||
def rows = []
|
def rows = []
|
||||||
|
|
||||||
// addBigdataDistrictFJW()
|
// addBigdataDistrictFJW()
|
||||||
|
|||||||
Reference in New Issue
Block a user