Browse Source

Merge remote-tracking branch 'origin/dev_tool' into dev_tool

master
VIVIMAN 3 years ago
parent
commit
96819b6e4b
  1. 440
      src/main/java/com/insigma/entry/IndexObj.java
  2. 195
      src/main/java/com/insigma/entry/TabColObj.java
  3. 75
      src/test/java/com/insigma/service/impl/LinuxTongWebKingBaseTest.java
  4. 67
      src/test/java/com/insigma/service/impl/WindowsTomcatMysqlTest.java
  5. 23
      src/test/java/com/insigma/utils/LinuxCommandUtilTest.java

440
src/main/java/com/insigma/entry/IndexObj.java

@ -1,7 +1,11 @@
package com.insigma.entry; package com.insigma.entry;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.util.Arrays;
import java.util.List;
/** /**
* (IndexObj ) * (IndexObj )
* *
@ -9,9 +13,445 @@ import lombok.Data;
* @since 21:29 2022/4/17 * @since 21:29 2022/4/17
*/ */
@Data @Data
@AllArgsConstructor
public class IndexObj { public class IndexObj {
private String tab; private String tab;
private String col; private String col;
private String idx; private String idx;
/**
* 获取 预置 数据
* @return
*/
public static List<IndexObj> getData(){
return Arrays.asList(
new IndexObj("a01", "A01_IDX_001", "A0000,STATUS"),
new IndexObj("a01", "A01_IDX_002", "A0107"),
new IndexObj("a01", "A01_IDX_003", "A0134"),
new IndexObj("a01", "A01_IDX_004", "A0184"),
new IndexObj("a01", "A01_IDX_005", "A0192F"),
new IndexObj("a01", "A01_IDX_006", "A0221"),
new IndexObj("a01", "A01_IDX_007", "STATUS"),
new IndexObj("a01", "A01_IDX_008", "TORDER"),
new IndexObj("a02", "A02_IDX_001", "A0000"),
new IndexObj("a02", "A02_IDX_002", "A0000"),
new IndexObj("a02", "A02_IDX_003", "A0000"),
new IndexObj("a02", "A02_IDX_004", "A0000,A0281"),
new IndexObj("a02", "A02_IDX_005", "A0000"),
new IndexObj("a05", "A05_IDX_001", "A0524"),
new IndexObj("a05", "A05_IDX_002", "A0531"),
new IndexObj("a05", "A05_IDX_003", "A0000"),
new IndexObj("a05", "A05_IDX_004", "A0000"),
new IndexObj("a06", "A06_IDX_001", "A0000"),
new IndexObj("a06", "A06_IDX_002", "A0000"),
new IndexObj("a06", "A06_IDX_003", "A0000"),
new IndexObj("a08", "A08_IDX_001", "A0000"),
new IndexObj("a08", "A08_IDX_002", "A0000"),
new IndexObj("a08", "A08_IDX_003", "A0000"),
new IndexObj("a08", "A08_IDX_004", "A0000"),
new IndexObj("a08", "A08_IDX_005", "A0000"),
new IndexObj("a08", "A08_IDX_006", "A0000"),
new IndexObj("a14", "A14_IDX_001", "A0000"),
new IndexObj("a14", "A14_IDX_002", "A0000"),
new IndexObj("a14", "A14_IDX_003", "A0000"),
new IndexObj("a15", "A15_IDX_001", "A0000"),
new IndexObj("a15", "A15_IDX_002", "A0000"),
new IndexObj("a30", "A30_IDX_001", "A0000"),
new IndexObj("a30", "A30_IDX_002", "A0000"),
new IndexObj("a30", "A30_IDX_003", "A0000"),
new IndexObj("a33", "A33_IDX_001", "A0000"),
new IndexObj("a33", "A33_IDX_002", "A0000"),
new IndexObj("a33", "A33_IDX_003", "A0000"),
new IndexObj("a33", "A33_IDX_004", "A0000"),
new IndexObj("a33", "A33_IDX_005", "A0000"),
new IndexObj("a36", "A36_IDX_001", "A0000"),
new IndexObj("a36", "A36_IDX_002", "A0000"),
new IndexObj("a36", "A36_IDX_003", "A0000"),
new IndexObj("a36", "A36_IDX_004", "A0000"),
new IndexObj("a65", "A65_IDX_001", "A0000"),
new IndexObj("A99Z1", "A99Z1_IDX_001", "A0000"),
new IndexObj("A99Z1", "A99Z1_IDX_002", "A0000"),
new IndexObj("A99Z1", "A99Z1_IDX_003", "A0000"),
new IndexObj("A99Z1", "A99Z1_IDX_004", "A0000"),
new IndexObj("b01", "B01_IDX_001", "B0121"),
new IndexObj("b01", "B01_IDX_002", "B0131"),
new IndexObj("M_M01", "M_M01_IDX_001", "M0105"),
new IndexObj("M_M01", "M_M01_IDX_002", "M0101"),
new IndexObj("M_M01", "M_M01_IDX_003", "M0103"),
new IndexObj("M_M01", "M_M01_IDX_004", "M0104"),
new IndexObj("M_M01", "M_M01_IDX_005", "M0109"),
new IndexObj("M_M01", "M_M01_IDX_006", "M0110"),
new IndexObj("M_M01", "M_M01_IDX_007", "M0111"),
new IndexObj("M_M01", "M_M01_IDX_008", "UNID"),
new IndexObj("M_M01", "M_M01_IDX_009", "RPT"),
new IndexObj("M_M01", "M_M01_IDX_010", "RPT"),
new IndexObj("M_M02", "M_M02_IDX_001", "OUUID"),
new IndexObj("M_M02", "M_M02_IDX_002", "RPT"),
new IndexObj("M_M02", "M_M02_IDX_003", "M0203"),
new IndexObj("M_M02", "M_M02_IDX_004", "RPT"),
new IndexObj("M_M02", "M_M02_IDX_005", "UNID"),
new IndexObj("M_M02", "M_M02_IDX_006", "M0201"),
new IndexObj("M_M02", "M_M02_IDX_007", "M0202"),
new IndexObj("M_M02", "M_M02_IDX_008", "M0204"),
new IndexObj("M_M02", "M_M02_IDX_009", "M0205"),
new IndexObj("M_M02", "M_M02_IDX_010", "M0206"),
new IndexObj("M_M02", "M_M02_IDX_011", "M0208"),
new IndexObj("M_M02", "M_M02_IDX_012", "M0212"),
new IndexObj("M_M02", "M_M02_IDX_013", "M0213"),
new IndexObj("M_M02", "M_M02_IDX_014", "M0216"),
new IndexObj("M_M02", "M_M02_IDX_015", "M0233_1"),
new IndexObj("M_M02", "M_M02_IDX_016", "M0234"),
new IndexObj("M_M02", "M_M02_IDX_017", "ORDERBY"),
new IndexObj("M_M03", "M_M03_IDX_001", "M0309"),
new IndexObj("M_M03", "M_M03_IDX_002", "OUUID"),
new IndexObj("M_M03", "M_M03_IDX_003", "UNID"),
new IndexObj("M_M03", "M_M03_IDX_004", "ORDERBY"),
new IndexObj("M_M03", "M_M03_IDX_005", "RPT"),
new IndexObj("M_M03", "M_M03_IDX_006", "RPT"),
new IndexObj("M_M04", "M_M04_IDX_001", "M0403"),
new IndexObj("M_M04", "M_M04_IDX_002", "OUUID"),
new IndexObj("M_M04", "M_M04_IDX_003", "UNID"),
new IndexObj("M_M04", "M_M04_IDX_004", "ORDERBY"),
new IndexObj("M_M04", "M_M04_IDX_005", "RPT"),
new IndexObj("M_M04", "M_M04_IDX_006", "RPT"),
new IndexObj("M_M05", "M_M05_IDX_001", "M0503"),
new IndexObj("M_M05", "M_M05_IDX_002", "OUUID"),
new IndexObj("M_M05", "M_M05_IDX_003", "UNID"),
new IndexObj("M_M05", "M_M05_IDX_004", "M0501"),
new IndexObj("M_M05", "M_M05_IDX_005", "M0502"),
new IndexObj("M_M05", "M_M05_IDX_006", "M0503"),
new IndexObj("M_M05", "M_M05_IDX_007", "M0504"),
new IndexObj("M_M05", "M_M05_IDX_008", "M0505"),
new IndexObj("M_M05", "M_M05_IDX_009", "M0506"),
new IndexObj("M_M05", "M_M05_IDX_010", "M0507"),
new IndexObj("M_M05", "M_M05_IDX_011", "M0508"),
new IndexObj("M_M05", "M_M05_IDX_012", "ORDERBY"),
new IndexObj("M_M05", "M_M05_IDX_013", "RPT"),
new IndexObj("M_M05", "M_M05_IDX_014", "RPT"),
new IndexObj("M_M06", "M_M06_IDX_001", "M0602"),
new IndexObj("M_M06", "M_M06_IDX_002", "OUUID"),
new IndexObj("M_M06", "M_M06_IDX_003", "UNID"),
new IndexObj("M_M06", "M_M06_IDX_004", "ORDERBY"),
new IndexObj("M_M06", "M_M06_IDX_005", "RPT"),
new IndexObj("M_M06", "M_M06_IDX_006", "RPT"),
new IndexObj("M_M07", "M_M07_IDX_001", "M0702"),
new IndexObj("M_M07", "M_M07_IDX_002", "OUUID"),
new IndexObj("M_M07", "M_M07_IDX_003", "UNID"),
new IndexObj("M_M07", "M_M07_IDX_004", "ORDERBY"),
new IndexObj("M_M07", "M_M07_IDX_005", "RPT"),
new IndexObj("M_M07", "M_M07_IDX_006", "RPT"),
new IndexObj("M_M09", "M_M09_IDX_001", "M0903"),
new IndexObj("M_M09", "M_M09_IDX_002", "OUUID"),
new IndexObj("M_M09", "M_M09_IDX_003", "UNID"),
new IndexObj("M_M09", "M_M09_IDX_004", "ORDERBY"),
new IndexObj("M_M09", "M_M09_IDX_005", "RPT"),
new IndexObj("M_M09", "M_M09_IDX_006", "RPT"),
new IndexObj("M_M09", "M_M09_IDX_007", "ORDERBY"),
new IndexObj("M_N01", "M_N01_IDX_001", "UNID"),
new IndexObj("M_N01", "M_N01_IDX_002", "RPT"),
new IndexObj("M_N01", "M_N01_IDX_003", "RPT"),
new IndexObj("M_N02", "M_N02_IDX_001", "N0202"),
new IndexObj("M_N02", "M_N02_IDX_002", "OUUID"),
new IndexObj("M_N02", "M_N02_IDX_003", "UNID"),
new IndexObj("M_N02", "M_N02_IDX_004", "ORDERBY"),
new IndexObj("M_N02", "M_N02_IDX_005", "RPT"),
new IndexObj("M_N02", "M_N02_IDX_006", "RPT"),
new IndexObj("M_N03", "M_N03_IDX_001", "N0302"),
new IndexObj("M_N03", "M_N03_IDX_002", "OUUID"),
new IndexObj("M_N03", "M_N03_IDX_003", "UNID"),
new IndexObj("M_N03", "M_N03_IDX_004", "ORDERBY"),
new IndexObj("M_N03", "M_N03_IDX_005", "RPT"),
new IndexObj("M_N03", "M_N03_IDX_006", "RPT"),
new IndexObj("M_N04", "M_N04_IDX_001", "N0402"),
new IndexObj("M_N04", "M_N04_IDX_002", "OUUID"),
new IndexObj("M_N04", "M_N04_IDX_003", "UNID"),
new IndexObj("M_N04", "M_N04_IDX_004", "ORDERBY"),
new IndexObj("M_N04", "M_N04_IDX_005", "RPT"),
new IndexObj("M_N04", "M_N04_IDX_006", "RPT"),
new IndexObj("M_N05", "M_N05_IDX_001", "N0502"),
new IndexObj("M_N05", "M_N05_IDX_002", "OUUID"),
new IndexObj("M_N05", "M_N05_IDX_003", "UNID"),
new IndexObj("M_N05", "M_N05_IDX_004", "ORDERBY"),
new IndexObj("M_N05", "M_N05_IDX_005", "RPT"),
new IndexObj("M_N05", "M_N05_IDX_006", "RPT"),
new IndexObj("M_P01", "M_P01_IDX_001", "UNID"),
new IndexObj("M_P01", "M_P01_IDX_002", "RPT"),
new IndexObj("M_P01", "M_P01_IDX_003", "RPT"),
new IndexObj("M_P02", "M_P02_IDX_001", "OUUID"),
new IndexObj("M_P02", "M_P02_IDX_002", "P0204"),
new IndexObj("M_P02", "M_P02_IDX_003", "UNID"),
new IndexObj("M_P02", "M_P02_IDX_004", "ORDERBY"),
new IndexObj("M_P02", "M_P02_IDX_005", "RPT"),
new IndexObj("M_P02", "M_P02_IDX_006", "RPT"),
new IndexObj("M_P03", "M_P03_IDX_001", "OUUID"),
new IndexObj("M_P03", "M_P03_IDX_002", "P0304"),
new IndexObj("M_P03", "M_P03_IDX_003", "UNID"),
new IndexObj("M_P03", "M_P03_IDX_004", "ORDERBY"),
new IndexObj("M_P03", "M_P03_IDX_005", "RPT"),
new IndexObj("M_P03", "M_P03_IDX_006", "RPT"),
new IndexObj("M_Q01", "M_Q01_IDX_001", "UNID"),
new IndexObj("M_Q01", "M_Q01_IDX_002", "RPT"),
new IndexObj("M_Q01", "M_Q01_IDX_003", "RPT"),
new IndexObj("M_Q02", "M_Q02_IDX_001", "OUUID"),
new IndexObj("M_Q02", "M_Q02_IDX_002", "Q0203"),
new IndexObj("M_Q02", "M_Q02_IDX_003", "UNID"),
new IndexObj("M_Q02", "M_Q02_IDX_004", "ORDERBY"),
new IndexObj("M_Q02", "M_Q02_IDX_005", "RPT"),
new IndexObj("M_Q02", "M_Q02_IDX_006", "RPT"),
new IndexObj("M_Q03", "M_Q03_IDX_001", "OUUID"),
new IndexObj("M_Q03", "M_Q03_IDX_002", "Q0303"),
new IndexObj("M_Q03", "M_Q03_IDX_003", "UNID"),
new IndexObj("M_Q03", "M_Q03_IDX_004", "ORDERBY"),
new IndexObj("M_Q03", "M_Q03_IDX_005", "RPT"),
new IndexObj("M_Q03", "M_Q03_IDX_006", "RPT"),
new IndexObj("M_Q04", "M_Q04_IDX_001", "OUUID"),
new IndexObj("M_Q04", "M_Q04_IDX_002", "Q0403"),
new IndexObj("M_Q04", "M_Q04_IDX_003", "UNID"),
new IndexObj("M_Q04", "M_Q04_IDX_004", "ORDERBY"),
new IndexObj("M_Q04", "M_Q04_IDX_005", "RPT"),
new IndexObj("M_Q04", "M_Q04_IDX_006", "RPT"),
new IndexObj("M_Q05", "M_Q05_IDX_001", "OUUID"),
new IndexObj("M_Q05", "M_Q05_IDX_002", "Q0503"),
new IndexObj("M_Q05", "M_Q05_IDX_003", "UNID"),
new IndexObj("M_Q05", "M_Q05_IDX_004", "ORDERBY"),
new IndexObj("M_Q05", "M_Q05_IDX_005", "RPT"),
new IndexObj("M_Q05", "M_Q05_IDX_006", "RPT"),
new IndexObj("M_Q06", "M_Q06_IDX_001", "OUUID"),
new IndexObj("M_Q06", "M_Q06_IDX_002", "Q0603"),
new IndexObj("M_Q06", "M_Q06_IDX_003", "UNID"),
new IndexObj("M_Q06", "M_Q06_IDX_004", "ORDERBY"),
new IndexObj("M_Q06", "M_Q06_IDX_005", "RPT"),
new IndexObj("M_Q06", "M_Q06_IDX_006", "RPT"),
new IndexObj("M_Q07", "M_Q07_IDX_001", "OUUID"),
new IndexObj("M_Q07", "M_Q07_IDX_002", "Q0703"),
new IndexObj("M_Q07", "M_Q07_IDX_003", "UNID"),
new IndexObj("M_Q07", "M_Q07_IDX_004", "ORDERBY"),
new IndexObj("M_Q07", "M_Q07_IDX_005", "RPT"),
new IndexObj("M_Q07", "M_Q07_IDX_006", "RPT"),
new IndexObj("M_Q08", "M_Q08_IDX_001", "OUUID"),
new IndexObj("M_Q08", "M_Q08_IDX_002", "Q0803"),
new IndexObj("M_Q08", "M_Q08_IDX_003", "UNID"),
new IndexObj("M_Q08", "M_Q08_IDX_004", "ORDERBY"),
new IndexObj("M_Q08", "M_Q08_IDX_005", "RPT"),
new IndexObj("M_Q08", "M_Q08_IDX_006", "RPT"),
new IndexObj("M_Q09", "M_Q09_IDX_001", "OUUID"),
new IndexObj("M_Q09", "M_Q09_IDX_002", "Q0903"),
new IndexObj("M_Q09", "M_Q09_IDX_003", "UNID"),
new IndexObj("M_Q09", "M_Q09_IDX_004", "ORDERBY"),
new IndexObj("M_Q09", "M_Q09_IDX_005", "RPT"),
new IndexObj("M_Q09", "M_Q09_IDX_006", "RPT"),
new IndexObj("M_Q10", "M_Q10_IDX_001", "OUUID"),
new IndexObj("M_Q10", "M_Q10_IDX_002", "Q1003"),
new IndexObj("M_Q10", "M_Q10_IDX_003", "UNID"),
new IndexObj("M_Q10", "M_Q10_IDX_004", "ORDERBY"),
new IndexObj("M_Q10", "M_Q10_IDX_005", "RPT"),
new IndexObj("M_Q10", "M_Q10_IDX_006", "RPT"),
new IndexObj("M_Q11", "M_Q11_IDX_001", "OUUID"),
new IndexObj("M_Q11", "M_Q11_IDX_002", "Q1103"),
new IndexObj("M_Q11", "M_Q11_IDX_003", "UNID"),
new IndexObj("M_Q11", "M_Q11_IDX_004", "ORDERBY"),
new IndexObj("M_Q11", "M_Q11_IDX_005", "RPT"),
new IndexObj("M_Q11", "M_Q11_IDX_006", "RPT"),
new IndexObj("M_Q12", "M_Q12_IDX_001", "OUUID"),
new IndexObj("M_Q12", "M_Q12_IDX_002", "RPT"),
new IndexObj("M_Q12", "M_Q12_IDX_003", "Q1203"),
new IndexObj("M_Q12", "M_Q12_IDX_004", "RPT"),
new IndexObj("M_Q12", "M_Q12_IDX_005", "UNID"),
new IndexObj("M_Q12", "M_Q12_IDX_006", "ORDERBY"),
new IndexObj("M_Q13", "M_Q13_IDX_001", "OUUID"),
new IndexObj("M_Q13", "M_Q13_IDX_002", "RPT"),
new IndexObj("M_Q13", "M_Q13_IDX_003", "Q1303"),
new IndexObj("M_Q13", "M_Q13_IDX_004", "RPT"),
new IndexObj("M_Q13", "M_Q13_IDX_005", "UNID"),
new IndexObj("M_Q13", "M_Q13_IDX_006", "ORDERBY"),
new IndexObj("M_RPT_NODE", "M_RPT_NODE_IDX_001", "RPCODE"),
new IndexObj("M_S01", "M_S01_IDX_004", "S0103"),
new IndexObj("M_S01", "M_S01_IDX_001", "UNID"),
new IndexObj("M_S01", "M_S01_IDX_003", "S0102"),
new IndexObj("M_S01", "M_S01_IDX_005", "RPT"),
new IndexObj("M_S01", "M_S01_IDX_002", "S0101"),
new IndexObj("M_S02", "M_S02_IDX_001", "OUUID"),
new IndexObj("M_S02", "M_S02_IDX_002", "S0202"),
new IndexObj("M_S02", "M_S02_IDX_003", "UNID"),
new IndexObj("M_S02", "M_S02_IDX_004", "ORDERBY"),
new IndexObj("M_S02", "M_S02_IDX_005", "RPT"),
new IndexObj("M_S02", "M_S02_IDX_006", "S0201"),
new IndexObj("M_S02", "M_S02_IDX_007", "S0205"),
new IndexObj("M_S02", "M_S02_IDX_008", "S0204"),
new IndexObj("M_S02", "M_S02_IDX_009", "S0206"),
new IndexObj("M_S03", "M_S03_IDX_001", "OUUID"),
new IndexObj("M_S03", "M_S03_IDX_002", "S0303"),
new IndexObj("M_S03", "M_S03_IDX_003", "UNID"),
new IndexObj("M_S03", "M_S03_IDX_004", "ORDERBY"),
new IndexObj("M_S03", "M_S03_IDX_005", "RPT"),
new IndexObj("M_S03", "M_S03_IDX_006", "RPT"),
new IndexObj("M_S03", "M_S03_IDX_007", "S0301"),
new IndexObj("M_S03", "M_S03_IDX_008", "S0305"),
new IndexObj("M_S03", "M_S03_IDX_009", "S0304"),
new IndexObj("M_S03", "M_S03_IDX_010", "S0306"),
new IndexObj("M_S04", "M_S04_IDX_001", "OUUID"),
new IndexObj("M_S04", "M_S04_IDX_002", "S0403"),
new IndexObj("M_S04", "M_S04_IDX_003", "UNID"),
new IndexObj("M_S04", "M_S04_IDX_004", "ORDERBY"),
new IndexObj("M_S04", "M_S04_IDX_005", "RPT"),
new IndexObj("M_S04", "M_S04_IDX_006", "RPT"),
new IndexObj("M_S04", "M_S04_IDX_007", "S0401"),
new IndexObj("M_S04", "M_S04_IDX_008", "S0405"),
new IndexObj("M_S04", "M_S04_IDX_009", "S0404"),
new IndexObj("M_S04", "M_S04_IDX_010", "S0406"),
new IndexObj("M_S05", "M_S05_IDX_001", "OUUID"),
new IndexObj("M_S05", "M_S05_IDX_002", "S0503"),
new IndexObj("M_S05", "M_S05_IDX_003", "UNID"),
new IndexObj("M_S05", "M_S05_IDX_004", "ORDERBY"),
new IndexObj("M_S05", "M_S05_IDX_005", "RPT"),
new IndexObj("M_S05", "M_S05_IDX_006", "RPT"),
new IndexObj("M_S05", "M_S05_IDX_007", "S0501"),
new IndexObj("M_S05", "M_S05_IDX_008", "S0505"),
new IndexObj("M_S05", "M_S05_IDX_009", "S0504"),
new IndexObj("M_S05", "M_S05_IDX_010", "S0506"),
new IndexObj("M_S06", "M_S06_IDX_001", "OUUID"),
new IndexObj("M_S06", "M_S06_IDX_002", "S0603"),
new IndexObj("M_S06", "M_S06_IDX_003", "UNID"),
new IndexObj("M_S06", "M_S06_IDX_004", "ORDERBY"),
new IndexObj("M_S06", "M_S06_IDX_005", "RPT"),
new IndexObj("M_S06", "M_S06_IDX_006", "RPT"),
new IndexObj("M_S06", "M_S06_IDX_007", "S0601"),
new IndexObj("M_S06", "M_S06_IDX_008", "S0605"),
new IndexObj("M_S06", "M_S06_IDX_009", "S0604"),
new IndexObj("M_S06", "M_S06_IDX_010", "S0606"),
new IndexObj("M_S07", "M_S07_IDX_001", "OUUID"),
new IndexObj("M_S07", "M_S07_IDX_002", "S0703"),
new IndexObj("M_S07", "M_S07_IDX_003", "UNID"),
new IndexObj("M_S07", "M_S07_IDX_004", "ORDERBY"),
new IndexObj("M_S07", "M_S07_IDX_005", "RPT"),
new IndexObj("M_S07", "M_S07_IDX_006", "RPT"),
new IndexObj("M_S07", "M_S07_IDX_007", "S0701"),
new IndexObj("M_S07", "M_S07_IDX_008", "S0705"),
new IndexObj("M_S07", "M_S07_IDX_009", "S0704"),
new IndexObj("M_S07", "M_S07_IDX_010", "S0706"),
new IndexObj("TJ_UN", "TJ_UN_IDX_001", "RPTYEAR"),
new IndexObj("TJ_UN", "TJ_UN_IDX_002", "SID"),
new IndexObj("TJ_UN", "TJ_UN_IDX_003", "SID"),
new IndexObj("TJ_UN", "TJ_UN_IDX_004", "UORDER"),
new IndexObj("J0801", "J0801_IDX_001", "UNITID"),
new IndexObj("J0802", "J0802_IDX_001", "UNITID"),
new IndexObj("J0803", "J0803_IDX_001", "UNITID"),
new IndexObj("J0804", "J0804_IDX_001", "UNITID"),
new IndexObj("J0805", "J0805_IDX_001", "UNITID"),
new IndexObj("J0806", "J0806_IDX_001", "UNITID"),
new IndexObj("J0901", "J0901_IDX_001", "UNITID"),
new IndexObj("J0902", "J0902_IDX_001", "UNITID"),
new IndexObj("J0903", "J0903_IDX_001", "UNITID"),
new IndexObj("J0904", "J0904_IDX_001", "UNITID"),
new IndexObj("J0905", "J0905_IDX_001", "UNITID"),
new IndexObj("J0906", "J0906_IDX_001", "UNITID"),
new IndexObj("J1001", "J1001_IDX_001", "UNITID"),
new IndexObj("J1002", "J1002_IDX_001", "UNITID"),
new IndexObj("J1003", "J1003_IDX_001", "UNITID"),
new IndexObj("J1004", "J1004_IDX_001", "UNITID"),
new IndexObj("J1005", "J1005_IDX_001", "UNITID"),
new IndexObj("J1006", "J1006_IDX_001", "UNITID"),
new IndexObj("J1101", "J1101_IDX_001", "UNITID"),
new IndexObj("J1102", "J1102_IDX_001", "UNITID"),
new IndexObj("J1103", "J1103_IDX_001", "UNITID"),
new IndexObj("J1104", "J1104_IDX_001", "UNITID"),
new IndexObj("J1105", "J1105_IDX_001", "UNITID"),
new IndexObj("J1106", "J1106_IDX_001", "UNITID"),
new IndexObj("J1201", "J1201_IDX_001", "UNITID"),
new IndexObj("J1202", "J1202_IDX_001", "UNITID"),
new IndexObj("J1203", "J1203_IDX_001", "UNITID"),
new IndexObj("J1204", "J1204_IDX_001", "UNITID"),
new IndexObj("J1205", "J1205_IDX_001", "UNITID"),
new IndexObj("J1206", "J1206_IDX_001", "UNITID"),
new IndexObj("J1301", "J1301_IDX_001", "UNITID"),
new IndexObj("J1302", "J1302_IDX_001", "UNITID"),
new IndexObj("J1303", "J1303_IDX_001", "UNITID"),
new IndexObj("J1304", "J1304_IDX_001", "UNITID"),
new IndexObj("J1305", "J1305_IDX_001", "UNITID"),
new IndexObj("J1306", "J1306_IDX_001", "UNITID"),
new IndexObj("J1401", "J1401_IDX_001", "UNITID"),
new IndexObj("J1402", "J1402_IDX_001", "UNITID"),
new IndexObj("J1403", "J1403_IDX_001", "UNITID"),
new IndexObj("J1404", "J1404_IDX_001", "UNITID"),
new IndexObj("J1405", "J1405_IDX_001", "UNITID"),
new IndexObj("J1406", "J1406_IDX_001", "UNITID"),
new IndexObj("J1501", "J1501_IDX_001", "UNITID"),
new IndexObj("J1502", "J1502_IDX_001", "UNITID"),
new IndexObj("J1503", "J1503_IDX_001", "UNITID"),
new IndexObj("J1504", "J1504_IDX_001", "UNITID"),
new IndexObj("J1505", "J1505_IDX_001", "UNITID"),
new IndexObj("J1506", "J1506_IDX_001", "UNITID"),
new IndexObj("J1507", "J1507_IDX_001", "UNITID"),
new IndexObj("J1601", "J1601_IDX_001", "UNITID"),
new IndexObj("J1602", "J1602_IDX_001", "UNITID"),
new IndexObj("J1603", "J1603_IDX_001", "UNITID"),
new IndexObj("J1604", "J1604_IDX_001", "UNITID"),
new IndexObj("J1605", "J1605_IDX_001", "UNITID"),
new IndexObj("J1606", "J1606_IDX_001", "UNITID"),
new IndexObj("J1607", "J1607_IDX_001", "UNITID"),
new IndexObj("J1701", "J1701_IDX_001", "UNITID"),
new IndexObj("J1702", "J1702_IDX_001", "UNITID"),
new IndexObj("J1703", "J1703_IDX_001", "UNITID"),
new IndexObj("J1704", "J1704_IDX_001", "UNITID"),
new IndexObj("J1705", "J1705_IDX_001", "UNITID"),
new IndexObj("J1706", "J1706_IDX_001", "UNITID"),
new IndexObj("J1707", "J1707_IDX_001", "UNITID"),
new IndexObj("J1801", "J1801_IDX_001", "UNITID"),
new IndexObj("J1802", "J1802_IDX_001", "UNITID"),
new IndexObj("J1803", "J1803_IDX_001", "UNITID"),
new IndexObj("J1804", "J1804_IDX_001", "UNITID"),
new IndexObj("J1805", "J1805_IDX_001", "UNITID"),
new IndexObj("J1806", "J1806_IDX_001", "UNITID"),
new IndexObj("J1807", "J1807_IDX_001", "UNITID"),
new IndexObj("J1901", "J1901_IDX_001", "UNITID"),
new IndexObj("J1901", "J1901_IDX_002", "TABLEID"),
new IndexObj("J1902", "J1902_IDX_001", "UNITID"),
new IndexObj("J1902", "J1902_IDX_002", "TABLEID"),
new IndexObj("J1903", "J1903_IDX_001", "UNITID"),
new IndexObj("J1903", "J1903_IDX_002", "TABLEID"),
new IndexObj("J1904", "J1904_IDX_001", "UNITID"),
new IndexObj("J1904", "J1904_IDX_002", "TABLEID"),
new IndexObj("J1905", "J1905_IDX_001", "UNITID"),
new IndexObj("J1905", "J1905_IDX_002", "TABLEID"),
new IndexObj("J1906", "J1906_IDX_001", "UNITID"),
new IndexObj("J1906", "J1906_IDX_002", "TABLEID"),
new IndexObj("J1907", "J1907_IDX_001", "UNITID"),
new IndexObj("J1907", "J1907_IDX_002", "TABLEID"),
new IndexObj("J1908", "J1908_IDX_001", "UNITID"),
new IndexObj("J1908", "J1908_IDX_002", "TABLEID"),
new IndexObj("J2001", "J2001_IDX_001", "UNITID"),
new IndexObj("J2001", "J2001_IDX_002", "TABLEID"),
new IndexObj("J2002", "J2002_IDX_001", "UNITID"),
new IndexObj("J2002", "J2002_IDX_002", "TABLEID"),
new IndexObj("J2003", "J2003_IDX_001", "UNITID"),
new IndexObj("J2003", "J2003_IDX_002", "TABLEID"),
new IndexObj("J2004", "J2004_IDX_001", "UNITID"),
new IndexObj("J2004", "J2004_IDX_002", "TABLEID"),
new IndexObj("J2005", "J2005_IDX_001", "UNITID"),
new IndexObj("J2005", "J2005_IDX_002", "TABLEID"),
new IndexObj("J2006", "J2006_IDX_001", "UNITID"),
new IndexObj("J2006", "J2006_IDX_002", "TABLEID"),
new IndexObj("J2007", "J2007_IDX_001", "UNITID"),
new IndexObj("J2007", "J2007_IDX_002", "TABLEID"),
new IndexObj("J2008", "J2008_IDX_001", "UNITID"),
new IndexObj("J2008", "J2008_IDX_002", "TABLEID"),
new IndexObj("J2101", "J2101_IDX_001", "UNITID"),
new IndexObj("J2101", "J2101_IDX_002", "TABLEID"),
new IndexObj("J2102", "J2102_IDX_001", "UNITID"),
new IndexObj("J2102", "J2102_IDX_002", "TABLEID"),
new IndexObj("J2103", "J2103_IDX_001", "UNITID"),
new IndexObj("J2103", "J2103_IDX_002", "TABLEID"),
new IndexObj("J2104", "J2104_IDX_001", "UNITID"),
new IndexObj("J2104", "J2104_IDX_002", "TABLEID"),
new IndexObj("J2105", "J2105_IDX_001", "UNITID"),
new IndexObj("J2105", "J2105_IDX_002", "TABLEID"),
new IndexObj("J2106", "J2106_IDX_001", "UNITID"),
new IndexObj("J2106", "J2106_IDX_002", "TABLEID"),
new IndexObj("J2107", "J2107_IDX_001", "UNITID"),
new IndexObj("J2107", "J2107_IDX_002", "TABLEID"),
new IndexObj("J2108", "J2108_IDX_001", "UNITID"),
new IndexObj("J2108", "J2108_IDX_002", "TABLEID")
);
}
} }

195
src/main/java/com/insigma/entry/TabColObj.java

@ -1,7 +1,12 @@
package com.insigma.entry; package com.insigma.entry;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/** /**
* (IndexObj ) * (IndexObj )
* *
@ -9,8 +14,196 @@ import lombok.Data;
* @since 21:29 2022/4/17 * @since 21:29 2022/4/17
*/ */
@Data @Data
@AllArgsConstructor
public class TabColObj { public class TabColObj {
private String tab; private String tab;
private String col; private String col;
}
public static List<String> getSQL(){
return new ArrayList<>();
}
public static List<TabColObj> getData(){
return Arrays.asList(
new TabColObj("A01","A0101"),
new TabColObj("A01","A0102"),
new TabColObj("A01","A0104"),
new TabColObj("A01","A0107"),
new TabColObj("A01","A0111A"),
new TabColObj("A01","A0114A"),
new TabColObj("A01","A0115A"),
new TabColObj("A01","A0117"),
new TabColObj("A01","A0128"),
new TabColObj("A01","A0134"),
new TabColObj("A01","A0140"),
new TabColObj("A01","A0141"),
new TabColObj("A01","A0144"),
new TabColObj("A01","A3921"),
new TabColObj("A01","A3927"),
new TabColObj("A01","A0160"),
new TabColObj("A01","A0163"),
new TabColObj("A01","A0165"),
new TabColObj("A01","A0184"),
new TabColObj("A01","A0187A"),
new TabColObj("A01","A0192"),
new TabColObj("A01","A0192A"),
new TabColObj("A01","A0221"),
new TabColObj("A01","A0288"),
new TabColObj("A01","A0192E"),
new TabColObj("A01","A0192C"),
new TabColObj("A01","A0196"),
new TabColObj("A01","A0197"),
new TabColObj("A01","A0195"),
new TabColObj("A01","A1701"),
new TabColObj("A01","A14Z101"),
new TabColObj("A01","A15Z101"),
new TabColObj("A01","A0120"),
new TabColObj("A01","A0121"),
new TabColObj("A01","A0122"),
new TabColObj("A01","A2949"),
new TabColObj("A01","A0180"),
new TabColObj("A01","QRZXL"),
new TabColObj("A01","QRZXLXX"),
new TabColObj("A01","QRZXW"),
new TabColObj("A01","QRZXWXX"),
new TabColObj("A01","ZZXL"),
new TabColObj("A01","ZZXLXX"),
new TabColObj("A01","ZZXW"),
new TabColObj("A01","ZZXWXX"),
new TabColObj("A01","ZGXL"),
new TabColObj("A01","ZGXLXX"),
new TabColObj("A01","ZGXW"),
new TabColObj("A01","ZGXWXX"),
new TabColObj("A01","TCSJSHOW"),
new TabColObj("A01","TCFSSHOW"),
new TabColObj("A02","A0201A"),
new TabColObj("A02","A0201B"),
new TabColObj("A02","A0201D"),
new TabColObj("A02","A0201E"),
new TabColObj("A02","A0215A"),
new TabColObj("A02","A0219"),
new TabColObj("A02","A0223"),
new TabColObj("A02","A0225"),
new TabColObj("A02","A0243"),
new TabColObj("A02","A0245"),
new TabColObj("A02","A0247"),
new TabColObj("A02","A0251B"),
new TabColObj("A02","A0255"),
new TabColObj("A02","A0265"),
new TabColObj("A02","A0267"),
new TabColObj("A02","A0272"),
new TabColObj("A02","A0281"),
new TabColObj("A05","A0531"),
new TabColObj("A05","A0501B"),
new TabColObj("A05","A0504"),
new TabColObj("A05","A0511"),
new TabColObj("A05","A0517"),
new TabColObj("A05","A0524"),
new TabColObj("A05","A0526"),
new TabColObj("A05","A0528B"),
new TabColObj("A05","A0530"),
new TabColObj("A05","A0532"),
new TabColObj("A06","A0601"),
new TabColObj("A06","A0602"),
new TabColObj("A06","A0604"),
new TabColObj("A06","A0607"),
new TabColObj("A06","A0611"),
new TabColObj("A06","A0699"),
new TabColObj("A08","A0801A"),
new TabColObj("A08","A0801B"),
new TabColObj("A08","A0901A"),
new TabColObj("A08","A0901B"),
new TabColObj("A08","A0804"),
new TabColObj("A08","A0807"),
new TabColObj("A08","A0904"),
new TabColObj("A08","A0814"),
new TabColObj("A08","A0824"),
new TabColObj("A08","A0827"),
new TabColObj("A08","A0837"),
new TabColObj("A08","A0811"),
new TabColObj("A08","A0831"),
new TabColObj("A08","A0832"),
new TabColObj("A08","A0834"),
new TabColObj("A08","A0835"),
new TabColObj("A08","A0838"),
new TabColObj("A08","A0839"),
new TabColObj("A08","A0899"),
new TabColObj("A14","A1404A"),
new TabColObj("A14","A1404B"),
new TabColObj("A14","A1407"),
new TabColObj("A14","A1411A"),
new TabColObj("A14","A1414"),
new TabColObj("A14","A1415"),
new TabColObj("A14","A1416"),
new TabColObj("A14","A1424"),
new TabColObj("A14","A1428"),
new TabColObj("A15","A1517"),
new TabColObj("A15","A1521"),
new TabColObj("A30","A3001"),
new TabColObj("A30","A3004"),
new TabColObj("A30","A3007A"),
new TabColObj("A30","A3038"),
new TabColObj("A33","A3310"),
new TabColObj("A33","A3321"),
new TabColObj("A33","A3321C"),
new TabColObj("A33","A3321D"),
new TabColObj("A33","A3322"),
new TabColObj("A33","A3323"),
new TabColObj("A33","A3331"),
new TabColObj("A33","A3332"),
new TabColObj("A33","A3333"),
new TabColObj("A33","A3350"),
new TabColObj("A33","A3360"),
new TabColObj("A33","A3361"),
new TabColObj("A33","A3362"),
new TabColObj("A33","A3371"),
new TabColObj("A33","A3372"),
new TabColObj("A33","A3381"),
new TabColObj("A33","A3382"),
new TabColObj("A33","A3385"),
new TabColObj("A33","A3321A"),
new TabColObj("A33","A3321B"),
new TabColObj("A33","A3321E"),
new TabColObj("A33","A3321F"),
new TabColObj("A33","A3333A"),
new TabColObj("A33","A3333B"),
new TabColObj("A36","A3601"),
new TabColObj("A36","A3604A"),
new TabColObj("A36","A3607"),
new TabColObj("A36","A3627"),
new TabColObj("A36","A3611"),
new TabColObj("A36","SORTID"),
new TabColObj("A57","A5714"),
new TabColObj("A99Z1","A99Z101"),
new TabColObj("A99Z1","A99Z102"),
new TabColObj("A99Z1","A99Z103"),
new TabColObj("A99Z1","A99Z104"),
new TabColObj("A99Z1","A99Z191"),
new TabColObj("A99Z1","A99Z195"),
new TabColObj("B01","B0101"),
new TabColObj("B01","B0104"),
new TabColObj("B01","B0114"),
new TabColObj("B01","B0117"),
new TabColObj("B01","B0124"),
new TabColObj("B01","B0127"),
new TabColObj("B01","B0131"),
new TabColObj("B01","B0194"),
new TabColObj("B01","B0227"),
new TabColObj("B01","B0232"),
new TabColObj("B01","B0233"),
new TabColObj("B01","B0236"),
new TabColObj("B01","B0234"),
new TabColObj("B01","B0150"),
new TabColObj("B01","B0183"),
new TabColObj("B01","B0185"),
new TabColObj("B01","B0164"),
new TabColObj("B01","B0167"),
new TabColObj("B01","B0268"),
new TabColObj("B01","B0269"),
new TabColObj("B01","B0238"),
new TabColObj("B01","B0239"),
new TabColObj("B01","B0180"),
new TabColObj("B01","SORTID")
);
}
}

75
src/test/java/com/insigma/service/impl/LinuxTongWebKingBaseTest.java

@ -0,0 +1,75 @@
package com.insigma.service.impl;
import com.insigma.config.AppCfg;
import com.insigma.entry.IndexObj;
import com.insigma.entry.TabColObj;
import com.insigma.utils.DbUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import static org.junit.jupiter.api.Assertions.*;
@Slf4j
public class LinuxTongWebKingBaseTest {
static {
DbUtil.url = "jdbc:mysql://127.0.0.1:35017/hy_qggwy";
DbUtil.usr = "root";
DbUtil.pwd = "admin";
AppCfg.DB = "GWY20_Mysql";
AppCfg.MW = "GWY20_Tomcat";
AppCfg.HZB = "D:/hzb2021";
AppCfg.BROWSER = "360se.exe";
}
private LinuxTongWebKingBase linuxTongWebKingBase = new LinuxTongWebKingBase();
@Test
public void rebuildIndex() {
assertTrue(linuxTongWebKingBase.rebuildIndex(IndexObj.getData()));
log.info("测试完成!");
}
@Test
public void setDbSize() {
assertTrue(linuxTongWebKingBase.setDbSize(500));
log.info("测试完成!");
}
@Test
public void cleanDbCache() {
assertTrue(linuxTongWebKingBase.cleanDbCache(TabColObj.getSQL(), TabColObj.getData()));
log.info("测试完成!");
}
@Test
public void registrationDbService() {
assertTrue(linuxTongWebKingBase.registrationDbService());
log.info("测试完成!");
}
@Test
public void cleanMwCache() {
assertTrue(linuxTongWebKingBase.cleanMwCache());
log.info("测试完成!");
}
@Test
public void setMwSize() {
assertTrue(linuxTongWebKingBase.setMwSize(500));
log.info("测试完成!");
}
@Test
public void registrationMwService() {
assertTrue(linuxTongWebKingBase.registrationMwService());
log.info("测试完成!");
}
@Test
public void runShell() {
assertTrue(linuxTongWebKingBase.runShell("vim a.txt"));
log.info("测试完成!");
}
}

67
src/test/java/com/insigma/service/impl/WindowsTomcatMysqlTest.java

@ -1,11 +1,74 @@
package com.insigma.service.impl; package com.insigma.service.impl;
import org.junit.jupiter.api.Test; import com.insigma.config.AppCfg;
import com.insigma.entry.IndexObj;
import com.insigma.entry.TabColObj;
import com.insigma.utils.DbUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
@Slf4j
public class WindowsTomcatMysqlTest { public class WindowsTomcatMysqlTest {
static {
DbUtil.url = "jdbc:mysql://127.0.0.1:35017/hy_qggwy";
DbUtil.usr = "root";
DbUtil.pwd = "admin";
AppCfg.DB = "GWY20_Mysql";
AppCfg.MW = "GWY20_Tomcat";
AppCfg.HZB = "D:/hzb2021";
AppCfg.BROWSER = "360se.exe";
}
WindowsTomcatMysql windowsTomcatMysql = new WindowsTomcatMysql();
@Test
public void rebuildIndex() {
assertTrue(windowsTomcatMysql.rebuildIndex(IndexObj.getData()));
log.info("测试完成!");
}
@Test
public void setDbSize() {
assertTrue(windowsTomcatMysql.setDbSize(500));
log.info("测试完成!");
}
@Test
public void cleanDbCache() {
assertTrue(windowsTomcatMysql.cleanDbCache(TabColObj.getSQL(), TabColObj.getData()));
log.info("测试完成!");
}
@Test
public void registrationDbService() {
assertTrue(windowsTomcatMysql.registrationDbService());
log.info("测试完成!");
}
@Test
public void cleanMwCache() {
assertTrue(windowsTomcatMysql.cleanMwCache());
log.info("测试完成!");
}
@Test
public void setMwSize() {
assertTrue(windowsTomcatMysql.setMwSize(500));
log.info("测试完成!");
}
@Test @Test
public void runShellTest(){ public void registrationMwService() {
assertTrue(windowsTomcatMysql.registrationMwService());
log.info("测试完成!");
}
@Test
public void runShell() {
assertTrue(windowsTomcatMysql.runShell(""));
log.info("测试完成!");
} }
} }

23
src/test/java/com/insigma/utils/LinuxCommandUtilTest.java

@ -0,0 +1,23 @@
package com.insigma.utils;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import java.io.File;
import static org.junit.jupiter.api.Assertions.*;
@Slf4j
public class LinuxCommandUtilTest {
@Test
public void run() {
// 注意:该部分需要注意使用的分割线 下划线-
String dir = "/Users/xxx/Downloads/ccc";
new LinuxCommandUtil("mkdir " + dir).run();
File file = new File(dir);
assertTrue(file.exists());
log.info("测试完成!");
}
}
Loading…
Cancel
Save