| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtState_Table |
| | | + " ADD COLUMN `control_fail_type` int(11) NOT NULL DEFAULT '0' COMMENT '启动失败原因\\r\\n6186-[\\r\\n0x00-成功\\r\\n0x03-内部通信故障\\r\\n0x04-系统存在告警\\r\\n0x05-系统测试中\\r\\n0x06-输入电压过高\\r\\n0x07-输入电压过低\\r\\n0X08-负载功率太小\\r\\n0x09-两段直流母线压差大\\r\\n0x0A-两段电池组压差大\\r\\n0x0B-远程闭锁状态\\r\\n0x0C-急停状态\\r\\n0x0D-切换开关粘连或电源状态异常\\r\\n0x0E-启动频繁\\r\\n0x0F-系统正在内阻测试\\r\\n0xFF-未知\\r\\n]';"); |
| | | } |
| | | //新增字段'last_captest_stop_type' --上一次核容终止原因 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_batt_rtstate'" |
| | | + " AND column_name='last_captest_stop_type'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.BattRtState_Table |
| | | + " ADD COLUMN `last_captest_stop_type` int(11) NOT NULL DEFAULT '0' COMMENT '上一次核容终止原因';"); |
| | | } |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |