蓄电池监控管理平台数据库初始化程序
Administrator
2023-04-01 9445a82b15ee62332e463c608e2a6d948e2500b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
package com.database_util;
 
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
 
public class SqlsUtils {
    
    /**
     * db_app_sys.tb_page_paramµÄĬÈϲÎÊýÖеÄid
     */
    static List<Integer> idsDefault;
    
    /**
     * db_app_sys.tb_page_param2µÄĬÈϲÎÊýÖеÄid
     */
    static List<Integer> idsDefault2;
    
 
    /**
     * db_app_sys.tb_page_paramµÄĬÈÏinsertÓï¾ä
     */
    static ArrayList<String> sqlstb_page_param;
    /**
     * db_app_sys.tb_page_param2µÄĬÈÏinsertÓï¾ä
     */
    static ArrayList<String> sqlstb_page_param2;
 
 
    static {
 
        Integer[] temp= {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};
        idsDefault = Arrays.asList(temp);
 
        Integer[] temp2= {1,2,3,4};
        idsDefault2 = Arrays.asList(temp2);
        
        sqlstb_page_param2 = new ArrayList<>();
        String tb_page_param2 = "INSERT INTO `db_app_sys`.`tb_page_param2` VALUES ('1', 'visit_time_first', 'Óû§µÇ¼·ÃÎÊ¿ØÖÆ-·ÃÎÊʱ¼ä×îÔç', '00:00:01', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param2` VALUES ('2', 'visit_time_last', 'Óû§µÇ¼·ÃÎÊ¿ØÖÆ-·ÃÎÊʱ¼ä×îÍí', '23:59:59', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param2` VALUES ('3', 'visit_ip', 'Óû§µÇ¼·ÃÎÊ¿ØÖÆ-·ÃÎʿͻ§¶Ëip-ÔÊÐí', '*', '1');"+
                "INSERT INTO `db_app_sys`.`tb_page_param2` (`id`, `param`, `label`, `value`, `categoryId`) "+
                "VALUES ('4', 'audit_cap', 'Éó¼ÆÊý¾Ý¼Ç¼ÈÝÁ¿', '5000', '2');";
        String[] strs2 = tb_page_param2.split(";");
        for (int i = 0; i < strs2.length; i++) {
            sqlstb_page_param2.add(strs2[i]);
        }
        
        sqlstb_page_param = new ArrayList<>();
        String tb_page_param = "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('1', 'É豸¹¤×÷״̬', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('2', 'É豸ͨѶ', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('3', 'É豸ζÈ', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('4', '¸É½Óµã', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('5', 'ºËÈÝÖÕÖ¹Ô­Òò', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('6', '²Ù×÷ʧ°ÜÔ­Òò', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('7', 'Ê£ÓàÌìÊý', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('8', '¹¤×÷ģʽ', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('9', '×é¶Ëµçѹ', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('10', '·åÖµµçѹ', '1', '1');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('11', 'Æô¶¯ºËÈݲâÊÔ', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('12', 'Í£Ö¹²âÊÔ', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('13', 'ϵͳ²ÎÊýÉèÖÃ', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('14', 'Çå³ý¸æ¾¯', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('15', 'Æô¶¯Ñø»¤/³ýÁò', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('16', 'Í£Ö¹Ñø»¤/³ýÁò', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('17', 'Æô¶¯ÀëÏßÑø»¤', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('18', 'Í£Ö¹ÀëÏßÑø»¤', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('19', '¶¨ÆÚÆô¶¯É豸', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('20', 'ÖØÆôÉ豸', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('21', '¾ùºâ¿ØÖƲÎÊýÉèÖà', '1', '2');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('31', 'Ðîµç³Øºǫ́¼à¿Ø¹ÜÀíÆ½Ì¨', '1', '5');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('32', 'V1.0.5', '1', '6');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('33', 'ƽ̨logo', '1', '7');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('34', 'uKey', '1', '7');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('35', 'ÈËÁ³Ê¶±ð', '1', '7');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('36', 'Ç©Ãû', '1', '7');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('37', 'Ô¶³ÌÐÞ¸Äip', '1', '7');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('38', 'Æô¶¯·ÅµçÌí¼ÓÈËÁ³Ê¶±ð', '1', '7');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('39', 'Õ˺ÅɨÃè²ßÂÔ', '1', '8');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('40', 'Õ˺ŵǼʧ°ÜÏÞÖÆ´ÎÊý', '10', '9');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('41', 'Õ˺ŵǼʧ°ÜËø¶¨½âËø²ßÂÔ', '2', '9');" +
                
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('42', 'ÃÜÂëÉèÖùæÔò-λÊý', '8', '10');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('43', 'ÃÜÂëÉèÖùæÔò-·ûºÅÀàÐÍ', '4', '10');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('44', 'ÀúÊ·Êý¾ÝµÄÍÕ·å¹øµ×¹¦ÄÜ¿ªÆô', '1', '11');" +
                "INSERT INTO `db_app_sys`.`tb_page_param`(`id`, `param`, `status`, `categoryId`) VALUES ('45', 'ÀúÊ·Êý¾ÝµÄÊý¾ÝÏÔʾÁ£¶È', '5', '11');" +
                "";
        String[] strs = tb_page_param.split(";");
        for (int i = 0; i < strs.length; i++) {
            sqlstb_page_param.add(strs[i]);
        }
    }
    
    
    
    /**
     *     É½Î÷µçÔ´²¿·ÖµçÔ´¸æ¾¯id
     */
    public final static int ALM_TYPE_ACDC_AcIn1_A_OverV_ID          = 110001;            //½»Á÷AÏà¹ýѹ    
    public final static int ALM_TYPE_ACDC_AcIn1_A_UnderV_ID      = 110002;            //½»Á÷AÏàǷѹ
    public final static int ALM_TYPE_ACDC_AcIn1_A_Less_ID          = 110003;            //½»Á÷AÏàȱÏà
    public final static int ALM_TYPE_ACDC_AcIn1_B_OverV_ID          = 110004;            //½»Á÷BÏà¹ýѹ
    public final static int ALM_TYPE_ACDC_AcIn1_B_UnderV_ID      = 110005;            //½»Á÷BÏàǷѹ
    public final static int ALM_TYPE_ACDC_AcIn1_B_Less_ID          = 110006;            //½»Á÷BÏàȱÏà
    public final static int ALM_TYPE_ACDC_AcIn1_C_OverV_ID          = 110007;            //½»Á÷CÏà¹ýѹ
    public final static int ALM_TYPE_ACDC_AcIn1_C_UnderV_ID      = 110008;            //½»Á÷CÏàǷѹ
    public final static int ALM_TYPE_ACDC_AcIn1_C_Less_ID          = 110009;            //½»Á÷CÏàȱÏà
    
    public final static int ALM_TYPE_ACDC_Acb1_OverCurrA_ID     = 110035;            //½»Á÷AÏà¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Acb1_OverCurrB_ID     = 110036;            //½»Á÷BÏà¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Acb1_OverCurrC_ID     = 110037;            //½»Á÷CÏà¹ýÁ÷
 
    public final static int ALM_TYPE_ACDC_Mod1_OverVol_ID         = 110047;            //ÕûÁ÷Æ÷1¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod2_OverVol_ID         = 110048;            //ÕûÁ÷Æ÷2¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod3_OverVol_ID         = 110049;            //ÕûÁ÷Æ÷3¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod4_OverVol_ID         = 110050;            //ÕûÁ÷Æ÷4¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod5_OverVol_ID         = 110051;            //ÕûÁ÷Æ÷5¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod6_OverVol_ID         = 110052;            //ÕûÁ÷Æ÷6¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod7_OverVol_ID         = 110053;            //ÕûÁ÷Æ÷7¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod8_OverVol_ID         = 110054;            //ÕûÁ÷Æ÷8¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod9_OverVol_ID         = 110055;            //ÕûÁ÷Æ÷9¹ýѹ    
    public final static int ALM_TYPE_ACDC_Mod10_OverVol_ID         = 110056;            //ÕûÁ÷Æ÷10¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod11_OverVol_ID         = 110057;            //ÕûÁ÷Æ÷11¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod12_OverVol_ID         = 110058;            //ÕûÁ÷Æ÷12¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod13_OverVol_ID         = 110059;            //ÕûÁ÷Æ÷13¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod14_OverVol_ID         = 110060;            //ÕûÁ÷Æ÷14¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod15_OverVol_ID         = 110061;            //ÕûÁ÷Æ÷15¹ýѹ
    public final static int ALM_TYPE_ACDC_Mod16_OverVol_ID         = 110062;            //ÕûÁ÷Æ÷16¹ýѹ
 
    public final static int ALM_TYPE_ACDC_Mod1_UnderVol_ID         = 110063;            //ÕûÁ÷Æ÷1Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod2_UnderVol_ID         = 110064;            //ÕûÁ÷Æ÷2Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod3_UnderVol_ID         = 110065;            //ÕûÁ÷Æ÷3Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod4_UnderVol_ID         = 110066;            //ÕûÁ÷Æ÷4Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod5_UnderVol_ID         = 110067;            //ÕûÁ÷Æ÷5Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod6_UnderVol_ID         = 110068;            //ÕûÁ÷Æ÷6Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod7_UnderVol_ID         = 110069;            //ÕûÁ÷Æ÷7Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod8_UnderVol_ID         = 110070;            //ÕûÁ÷Æ÷8Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod9_UnderVol_ID         = 110071;            //ÕûÁ÷Æ÷9Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod10_UnderVol_ID     = 110072;            //ÕûÁ÷Æ÷10Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod11_UnderVol_ID     = 110073;            //ÕûÁ÷Æ÷11Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod12_UnderVol_ID     = 110074;            //ÕûÁ÷Æ÷12Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod13_UnderVol_ID     = 110075;            //ÕûÁ÷Æ÷13Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod14_UnderVol_ID     = 110076;            //ÕûÁ÷Æ÷14Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod15_UnderVol_ID     = 110077;            //ÕûÁ÷Æ÷15Ƿѹ
    public final static int ALM_TYPE_ACDC_Mod16_UnderVol_ID     = 110078;            //ÕûÁ÷Æ÷16Ƿѹ
 
    public final static int ALM_TYPE_ACDC_Mod1_OverCurr_ID         = 110079;            //ÕûÁ÷Æ÷1¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod2_OverCurr_ID         = 110080;            //ÕûÁ÷Æ÷2¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod3_OverCurr_ID         = 110081;            //ÕûÁ÷Æ÷3¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod4_OverCurr_ID         = 110082;            //ÕûÁ÷Æ÷4¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod5_OverCurr_ID         = 110083;            //ÕûÁ÷Æ÷5¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod6_OverCurr_ID         = 110084;            //ÕûÁ÷Æ÷6¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod7_OverCurr_ID         = 110085;            //ÕûÁ÷Æ÷7¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod8_OverCurr_ID         = 110086;            //ÕûÁ÷Æ÷8¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod9_OverCurr_ID         = 110087;            //ÕûÁ÷Æ÷9¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod10_OverCurr_ID     = 110088;            //ÕûÁ÷Æ÷10¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod11_OverCurr_ID     = 110089;            //ÕûÁ÷Æ÷11¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod12_OverCurr_ID     = 110090;            //ÕûÁ÷Æ÷12¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod13_OverCurr_ID     = 110091;            //ÕûÁ÷Æ÷13¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod14_OverCurr_ID     = 110092;            //ÕûÁ÷Æ÷14¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod15_OverCurr_ID     = 110093;            //ÕûÁ÷Æ÷15¹ýÁ÷
    public final static int ALM_TYPE_ACDC_Mod16_OverCurr_ID     = 110094;            //ÕûÁ÷Æ÷16¹ýÁ÷
    
    
    public final static int Alarm_Type_TotalEff                 = 0;                //ÉÏÏÂÏÞÓÐЧ
    public final static int Alarm_Type_TotalHigh                 = 1;                //ÉÏÏÞÓÐЧ
    public final static int Alarm_Type_TotalLow                 = 2;                //ÏÂÏÞÓÐЧ
    
    
    public final static int Alarm_Level_First                     = 1;                //1¼¶¸æ¾¯
    public final static int Alarm_Level_Second                     = 2;                //2¼¶¸æ¾¯
    public final static int Alarm_Level_Third                     = 3;                //3¼¶¸æ¾¯
    public final static int Alarm_Level_Fourth                     = 4;                //4¼¶¸æ¾¯
    
    
    
    
    
    
    
    
 
//    public static void main(String[] args) {
//        System.out.println("SqlsUtils.sqlstb_page_param2 = " + SqlsUtils.sqlstb_page_param2);
//        System.out.println("SqlsUtils.sqlstb_page_param = " + SqlsUtils.sqlstb_page_param);
//        for (int i = 0; i < SqlsUtils.sqlstb_page_param2.size(); i++) {
//            System.out.println("SqlsUtils.sqls.get(i) = " + SqlsUtils.sqlstb_page_param2.get(i));
//        }
//        System.out.println(SqlsUtils.idsDefault.size());
//    }
    
}