| | |
| | | } |
| | | sql.sqlMysqlExecute(sql_str02); |
| | | |
| | | res = null; |
| | | //添加字段a059_group_vol1 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `a059_group_vol1` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组1组端电压';"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加字段a059_group_vol2 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `a059_group_vol2` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组2组端电压';"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加字段a059_group_curr1 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `a059_group_curr1` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组1组端电流';"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加字段a059_group_curr2 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `a059_group_curr2` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组2组端电流';"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加字段dev_pos_states |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_pos_states` varchar(30) NOT NULL DEFAULT '0,0,0,0' COMMENT '切换箱接触器正极开关状态[0没通信上;1;正常;2;异常]';"); |
| | | } |
| | | res = null; |
| | | //添加字段dev_neg_states |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_neg_states` varchar(30) NOT NULL DEFAULT '0,0,0,0' COMMENT '切换箱接触器负极开关状态[0没通信上;1;正常;2;异常]';"); |
| | | } |
| | | res = null; |
| | | //添加字段a059_onlineSaveVol |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='a059_onlineSaveVol'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `a059_onlineSaveVol` float NOT NULL DEFAULT '0' COMMENT '充放电一体机切换电池组保护电压';"); |
| | | } |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |