| | |
| | | " POF_BG_Boost_Cnt int(11) NOT NULL DEFAULT '0'," +
|
| | | " POF_BG_Boost_VolStop float NOT NULL DEFAULT '0'," +
|
| | | " POF_BG_Boost_VolStart float NOT NULL DEFAULT '0'," +
|
| | | |
| | | " `JunHeng_Enabled` int(11) NOT NULL DEFAULT '0' COMMENT '均衡功能启用状态(1:启用;0:禁用)'," + |
| | | " `JunHeng_StVol` float NOT NULL DEFAULT '0' COMMENT '均衡停止电压阀值'," + |
| | | " `JunHeng_StCurr` float NOT NULL DEFAULT '0' COMMENT '均衡停止电流阀值'," + |
| | | " PRIMARY KEY (num)," +
|
| | | " UNIQUE KEY index_dev_id_uniq (dev_id)" +
|
| | | ") ENGINE=InnoDB 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);
|
| | | |
| | | //添加字段JunHeng_Enabled 均衡功能启用状态
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_ram_db'"
|
| | | + " AND table_name='tb_fbs9100_sysparam'"
|
| | | + " AND column_name='JunHeng_Enabled'");
|
| | | if(false == res.next()) {
|
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SysParam_Table |
| | | + " ADD COLUMN `JunHeng_Enabled` int(11) NOT NULL DEFAULT '0' COMMENT '均衡功能启用状态(1:启用;0:禁用)';");
|
| | | }
|
| | | |
| | | //添加字段JunHeng_StVol 均衡停止电压阀值
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_ram_db'"
|
| | | + " AND table_name='tb_fbs9100_sysparam'"
|
| | | + " AND column_name='JunHeng_StVol'");
|
| | | if(false == res.next()) {
|
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SysParam_Table |
| | | + " ADD COLUMN `JunHeng_StVol` float NOT NULL DEFAULT '0' COMMENT '均衡停止电压阀值';");
|
| | | }
|
| | | |
| | | //添加字段JunHeng_StCurr 均衡停止电流阀值
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_ram_db'"
|
| | | + " AND table_name='tb_fbs9100_sysparam'"
|
| | | + " AND column_name='JunHeng_StCurr'");
|
| | | if(false == res.next()) {
|
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SysParam_Table |
| | | + " ADD COLUMN `JunHeng_StCurr` float NOT NULL DEFAULT '0' COMMENT '均衡停止电流阀值';");
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | e.printStackTrace();
|
| | | } finally {
|
| | | if(null != res) {
|
| | | try {
|
| | | res.close();
|
| | | } catch (SQLException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | sql.close_con();
|
| | | }
|
| | | }
|