| | |
| | | Sql_Mysql sql = new Sql_Mysql(pool.getConn()); |
| | | ResultSet res = null; |
| | | try { |
| | | sql.sqlMysqlExecute(sql_str); |
| | | |
| | | //添加记录时间列,方便绘制实时曲线 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_electric2mwsystem'" |
| | |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Tb_electric2MW_state |
| | | + " ADD COLUMN `record_time` datetime NOT NULL DEFAULT '2000-01-01 00:00:00' after electric2KW_id;"); |
| | | } |
| | | |
| | | sql.sqlMysqlExecute(sql_str); |
| | | } |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |