This commit is contained in:
2023-05-19 13:32:58 +08:00
parent baf6f6c5a4
commit b79c5aaede
2 changed files with 7 additions and 0 deletions
@@ -56,6 +56,7 @@ class BigdataCommbuildtypeBatch extends BaseBatch{
FileUtils.batchCreateFile(rets, fileName,headers, "utf-8", false);
println "txt 生成->导Oracle"
delPgData()
saveToPgSql(rets)
}
@@ -110,6 +111,11 @@ class BigdataCommbuildtypeBatch extends BaseBatch{
return rets;
}
def delPgData(){
sqlInstance.execute("delete from base.t0831_bigdata_commbuildtype_gj_h")
println "base.t0831_bigdata_commbuildtype_gj_h 数据已删除"
}
def saveToPgSql(rows){
def sqls = []
@@ -1127,6 +1127,7 @@ class BigdataForsaleBatch extends BaseBatch{
return count;
}
def saveToPgSql(rows){
for(def r : rows) {
for (def i = 0; i < r.size(); i++) {