MysqlToOracleApplication.java 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. package com.yihu.util.mysql2Oracle;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. public class MysqlToOracleApplication {
  5. public static void main(String[] args) throws Exception {
  6. TableInfo[] tables = {
  7. new TableInfo("BaseInfo", "PK_BaseInfo", 0),
  8. new TableInfo("OutPatient", "PK_Outpatient", 0),
  9. // new TableInfo("Outpatient_Diag", "PK_Outpatient_Diag", 0),
  10. // new TableInfo("Outpatient_Drug", "PK_Outpatient_Drug", 0),
  11. // new TableInfo("Outpatient_Fee", "PK_Outpatient_Fee", 0),
  12. new TableInfo("InPatient", "PK_Inpatient", 0),
  13. // new TableInfo("Inpatient_Drug", "PK_Inpatient_Drug", 0),
  14. // new TableInfo("Inpatient_Outdiag", "PK_Inpatient_Outdiag", 0),
  15. // new TableInfo("Inpatient_Longorder", "PK_Inpatient_Longorder", 0),
  16. // new TableInfo("Inpatient_Fee", "PK_Inpatient_Fee", 0),
  17. // new TableInfo("Eds_Disp_Pres_Master", "PK_Eds_Disp_Pres_Master", 0)
  18. };
  19. List<MyThread> threadList = new ArrayList<>();
  20. for (TableInfo table : tables) {
  21. MyThread myThread = new MyThread(table.getTableName(), table.getPk(), table.getOffset(), 10000);
  22. threadList.add(myThread);
  23. myThread.start();
  24. }
  25. }
  26. }