Commit 2ba2b5d2 by liuzz

更新导入数据的时间默认值

parent 2e545a80
...@@ -287,7 +287,9 @@ public class DataImportController { ...@@ -287,7 +287,9 @@ public class DataImportController {
DataSourceService.switchDb(template.getDataSourceId()); DataSourceService.switchDb(template.getDataSourceId());
String insertSql = "INSERT INTO {} SELECT * FROM {} WHERE YEAROOFDATARECORD = '{}年'"; String insertSql = "INSERT INTO {} SELECT * FROM {} WHERE YEAROOFDATARECORD = '{}年'";
String deleteSql = "DELETE FROM {} WHERE YEAROOFDATARECORD='{}年'"; String deleteSql = "DELETE FROM {} WHERE YEAROOFDATARECORD='{}年'";
String updateEnterDate = "UPDATE {} SET ENTERDATA = SYSDATE WHERE YEAROOFDATARECORD='{}年'";
jdbcTemplate.execute(StrFormatter.format(deleteSql, template.getTableName(), template.getYear())); jdbcTemplate.execute(StrFormatter.format(deleteSql, template.getTableName(), template.getYear()));
jdbcTemplate.execute(StrFormatter.format(updateEnterDate, template.getTableName() + "_TEMP", template.getYear()));
jdbcTemplate.execute(StrFormatter.format(insertSql, jdbcTemplate.execute(StrFormatter.format(insertSql,
template.getTableName(), template.getTableName() + "_TEMP", template.getYear())); template.getTableName(), template.getTableName() + "_TEMP", template.getYear()));
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment