diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommbuildtypeBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommbuildtypeBatch.groovy index 3418defb3..61bd39b7e 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommbuildtypeBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommbuildtypeBatch.groovy @@ -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 = [] diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy index bb750e5ff..31fa93b9d 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy @@ -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++) {