BattMonitor_DB_Builder/bin/com/database_util/DB_Alarm.classBinary files differ
BattMonitor_DB_Builder/bin/com/database_util/DB_Param.classBinary files differ
BattMonitor_DB_Builder/bin/com/version_inf/version_inf.txt
@@ -1,11 +1,24 @@ 蓄电池监控平台建表程序 注意:1.新增电源机房时需要重新运行 V1.78 edit at date 2023-06-14 1.db_pwrdev_alarm.tb_pwrdev_alarm_param_forsx 新增字段标识上上限以及下下限使能 1.'db_pwrdev_alarm.tb_pwrdev_alarm_param_forsx' 新增字段标识上上限以及下下限使能 `alarm_limitH_upper_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '上上限使能[0-不启用 1-启用]', `alarm_limitL_lower_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '下下限使能[0-不启用 1-启用]', 2.'db_param.tb_dev_param'新增上上限和上上限阈值相关参数 `alm_high_coe_upper` float NOT NULL DEFAULT '3.2' COMMENT '上上限告警系数值', `alm_high_coe_upper_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '上上限使能[0-不启用 1-启用]', `alm_low_coe_lower` float NOT NULL DEFAULT '0' COMMENT '下下限告警系数值', `alm_low_coe_lower_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '下下限阈值使能[0-不启用 1-启用]', 3.'db_alarm.tb_battalarm_data'新增告警重要等级 `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]' 3.'db_alarm.tb_battalarm_data_history'新增告警重要等级 `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]', V1.77 edit at date 2023-06-09 1.修复创建表'db_alarm.tb_alarm_relation'初始化表中字段错误bug BattMonitor_DB_Builder/src/com/database_util/DB_Alarm.java
@@ -232,6 +232,7 @@ " alm_confirmed_time datetime NOT NULL DEFAULT '1982-01-01 00:00:00'," + " alm_cleared_type int(11) NOT NULL DEFAULT '0'," + " usr_Id int(11) NOT NULL DEFAULT '0'," + " `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]'," + " PRIMARY KEY (num)," + " KEY index_battgroup_id (BattGroupId)," + " KEY index_Record_Id (Record_Id)," + @@ -242,14 +243,32 @@ " KEY index_alm_level (alm_level)" + ") ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;"; Sql_Mysql sql = new Sql_Mysql(pool.getConn()); ResultSet res = null; try { if(true == recreate) { sql.sqlMysqlExecute(sql_str01); } sql.sqlMysqlExecute(sql_str02); sql.sqlMysqlExecute(sql_str02); //添加指定的alm_severity列(告警重要等级) res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_alarm'" + " AND table_name='tb_battalarm_data_history'" + " AND column_name='alm_severity'"); if(false == res.next()) { sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Battalarm_Data_History_Table + " ADD COLUMN `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]';"); } } catch (SQLException e) { e.printStackTrace(); } finally { if(null != res) { try { res.close(); } catch (SQLException e) { e.printStackTrace(); } } sql.close_con(); } } @@ -276,6 +295,9 @@ " alm_confirmed_time datetime NOT NULL DEFAULT '1982-01-01 00:00:00'," + " alm_cleared_type int(11) NOT NULL DEFAULT '0'," + " usr_Id int(11) NOT NULL DEFAULT '0'," + " `work_flag` tinyint(4) NOT NULL DEFAULT '0'," + " `msg_flag` tinyint(4) NOT NULL DEFAULT '0'," + " `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]'," + " PRIMARY KEY (num)," + " KEY index_battgroup_id (BattGroupId)," + " KEY index_Record_Id (Record_Id)," + @@ -302,7 +324,7 @@ sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Battalarm_Data_Table + " ADD COLUMN `work_flag` tinyint NOT NULL DEFAULT 0;"); } res = null; //添加指定的msg_flag列(派单管理) res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_alarm'" @@ -312,9 +334,26 @@ sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Battalarm_Data_Table + " ADD COLUMN `msg_flag` tinyint NOT NULL DEFAULT 0;"); } res = null; //添加指定的alm_severity 列(告警重要等级) res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_alarm'" + " AND table_name='tb_battalarm_data'" + " AND column_name='alm_severity'"); if(false == res.next()) { sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Battalarm_Data_Table + " ADD COLUMN `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]';"); } } catch (SQLException e) { e.printStackTrace(); } finally { if(null != res) { try { res.close(); } catch (SQLException e) { e.printStackTrace(); } } sql.close_con(); } } BattMonitor_DB_Builder/src/com/database_util/DB_Param.java
@@ -58,19 +58,72 @@ " alm_high_en int(11) NOT NULL DEFAULT '0'," + " alm_low_en int(11) NOT NULL DEFAULT '0'," + " note varchar(64) NOT NULL DEFAULT ''," + " `alm_high_coe_upper` float NOT NULL DEFAULT '3.2' COMMENT '上上限告警系数值'," + " `alm_high_coe_upper_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '上上限使能[0-不启用 1-启用]'," + " `alm_low_coe_lower` float NOT NULL DEFAULT '0' COMMENT '下下限告警系数值'," + " `alm_low_coe_lower_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '下下限阈值使能[0-不启用 1-启用]'," + " PRIMARY KEY (num)," + " KEY index_alm_id (alm_id)," + " KEY index_dev_id (dev_Id)" + ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"; Sql_Mysql sql = new Sql_Mysql(pool.getConn()); ResultSet res = null; try { if(true == recreate) { sql.sqlMysqlExecute(sql_str01); } sql.sqlMysqlExecute(sql_str02); sql.sqlMysqlExecute(sql_str02); //添加alm_high_coe_upper res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_param'" + " AND table_name='tb_dev_param'" + " AND column_name='alm_high_coe_upper'"); if(false == res.next()) { sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Dev_Param_Table + " ADD COLUMN `alm_high_coe_upper` float NOT NULL DEFAULT '3.2' COMMENT '上上限告警系数值';"); } res = null; //添加alm_high_coe_upper_en res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_param'" + " AND table_name='tb_dev_param'" + " AND column_name='alm_high_coe_upper_en'"); if(false == res.next()) { sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Dev_Param_Table + " ADD COLUMN `alm_high_coe_upper_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '上上限使能[0-不启用 1-启用]';"); } res = null; //添加alm_low_coe_lower res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_param'" + " AND table_name='tb_dev_param'" + " AND column_name='alm_low_coe_lower'"); if(false == res.next()) { sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Dev_Param_Table + " ADD COLUMN `alm_low_coe_lower` float NOT NULL DEFAULT '0' COMMENT '下下限告警系数值';"); } res = null; //添加alm_low_coe_lower_en res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" + " WHERE table_schema='db_param'" + " AND table_name='tb_dev_param'" + " AND column_name='alm_low_coe_lower_en'"); if(false == res.next()) { sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Dev_Param_Table + " ADD COLUMN `alm_low_coe_lower_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '下下限阈值使能[0-不启用 1-启用]';"); } } catch (SQLException e) { e.printStackTrace(); } finally { if(null != res) { try { res.close(); } catch (SQLException e) { e.printStackTrace(); } } sql.close_con(); } } BattMonitor_DB_Builder/src/com/version_inf/version_inf.txt
@@ -1,11 +1,24 @@ 蓄电池监控平台建表程序 注意:1.新增电源机房时需要重新运行 V1.78 edit at date 2023-06-14 1.db_pwrdev_alarm.tb_pwrdev_alarm_param_forsx 新增字段标识上上限以及下下限使能 1.'db_pwrdev_alarm.tb_pwrdev_alarm_param_forsx' 新增字段标识上上限以及下下限使能 `alarm_limitH_upper_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '上上限使能[0-不启用 1-启用]', `alarm_limitL_lower_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '下下限使能[0-不启用 1-启用]', 2.'db_param.tb_dev_param'新增上上限和上上限阈值相关参数 `alm_high_coe_upper` float NOT NULL DEFAULT '3.2' COMMENT '上上限告警系数值', `alm_high_coe_upper_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '上上限使能[0-不启用 1-启用]', `alm_low_coe_lower` float NOT NULL DEFAULT '0' COMMENT '下下限告警系数值', `alm_low_coe_lower_en` tinyint(4) NOT NULL DEFAULT '1' COMMENT '下下限阈值使能[0-不启用 1-启用]', 3.'db_alarm.tb_battalarm_data'新增告警重要等级 `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]' 3.'db_alarm.tb_battalarm_data_history'新增告警重要等级 `alm_severity` int(11) NOT NULL DEFAULT '0' COMMENT '告警重要等级[0:重要;1:紧急]', V1.77 edit at date 2023-06-09 1.修复创建表'db_alarm.tb_alarm_relation'初始化表中字段错误bug