| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtData_Table |
| | | + " ADD COLUMN mon_LY_vol float NOT NULL DEFAULT '0';"); |
| | | } |
| | | |
| | | //添加字段mon_test_cap |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_batt_rtdata'" |
| | | + " AND column_name='mon_test_cap'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtData_Table |
| | | + " ADD COLUMN `mon_test_cap` float NOT NULL DEFAULT '0' COMMENT '单体测试容量';"); |
| | | } |
| | | |
| | | //添加字段mon_dis_timelong |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_batt_rtdata'" |
| | | + " AND column_name='mon_dis_timelong'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtData_Table |
| | | + " ADD COLUMN `mon_dis_timelong` int(11) NOT NULL DEFAULT '0' COMMENT '放电可持续时长';"); |
| | | } |
| | | |
| | | //添加字段mon_rest_cap--单体剩余容量 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_batt_rtdata'" |
| | | + " AND column_name='mon_rest_cap'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtData_Table |
| | | + " ADD COLUMN `mon_rest_cap` float NOT NULL DEFAULT '0' COMMENT '单体剩余容量';"); |
| | | } |
| | | |
| | | //添加字段mon_state--单体状态 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_batt_rtdata'" |
| | | + " AND column_name='mon_state'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtData_Table |
| | | + " ADD COLUMN `mon_state` int(11) NOT NULL DEFAULT '0' COMMENT '单体状态';"); |
| | | } |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |