@@ -178,10 +178,6 @@ public class DataImportController {
dataImportService.updateById(updateTemplate);*/
}else{
// oracle
finalIntegercount=jdbcTemplate.queryForObject(StrFormatter.format("select count(*) from user_tables where table_name =upper('{}')",tableName),Integer.class);
if(count>0){
returnAjaxResult.error("此表已存在");
}
List<String>prodSqlList=newArrayList<>();
List<String>tempSqlList=newArrayList<>();
finalStringtempTableName=tableName+"_TEMP";
...
...
@@ -210,8 +206,14 @@ public class DataImportController {
String[]temp=newString[tempSqlList.size()];
prodSqlList.toArray(prod);
tempSqlList.toArray(temp);
jdbcTemplate.batchUpdate(prod);
jdbcTemplate.batchUpdate(temp);
finalIntegerprodCount=jdbcTemplate.queryForObject(StrFormatter.format("select count(*) from user_tables where table_name =upper('{}')",tableName),Integer.class);
if(prodCount==0){
jdbcTemplate.batchUpdate(prod);
}
finalIntegertempCount=jdbcTemplate.queryForObject(StrFormatter.format("select count(*) from user_tables where table_name =upper('{}')",tempTableName),Integer.class);