| | |
| | | * @param recreate |
| | | */ |
| | | public static void createFBS9100State_Table(MysqlConnPool pool, boolean recreate) { |
| | | String sql_str01 = " DROP TABLE IF EXISTS "+Sql_Mysql.FBS9100State_Table; |
| | | String sql_str02 = "CREATE TABLE IF NOT EXISTS " + Sql_Mysql.FBS9100State_Table + " (" + |
| | | " num bigint(20) NOT NULL AUTO_INCREMENT," + |
| | | " dev_ip varchar(20) NOT NULL DEFAULT '127.0.0.0'," + |
| | | " dev_version varchar(64) NOT NULL DEFAULT ''," + |
| | | " dev_id bigint(20) NOT NULL DEFAULT '0'," + |
| | | " op_cmd int(11) NOT NULL DEFAULT '0'," + |
| | | " record_datetime varchar(20) NOT NULL DEFAULT '2015-12-02 12:10:00'," + |
| | | " dev_datetime varchar(20) NOT NULL DEFAULT '2015-12-02 12:10:00'," + |
| | | " dev_testtype int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_testgroupnum int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_workstate int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_alarmstate int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_onlinevollow tinyint(1) NOT NULL DEFAULT '0'," + |
| | | " dev_eachgroup_battsum int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_captest_onlinevol float NOT NULL DEFAULT '0'," + |
| | | " dev_captest_groupvol float NOT NULL DEFAULT '0'," + |
| | | " dev_captest_curr float NOT NULL DEFAULT '0'," + |
| | | " dev_captest_cap float NOT NULL DEFAULT '0'," + |
| | | " dev_captest_timelong int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_restest_moncount int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_restest_monindex int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_commcount int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_errcommcount int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_rxnullerrcount int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_temp float NOT NULL DEFAULT '0'," + |
| | | " dev_res_test_state int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_restest_count int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_last_captest_stop_type int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_condvoldp float NOT NULL DEFAULT '0'," + |
| | | " dev_conresist float NOT NULL DEFAULT '0'," + |
| | | " dev_conresist1 float NOT NULL DEFAULT '0'," + |
| | | " dev_condcurr float NOT NULL DEFAULT '0'," + |
| | | " dev_61850alarms varchar(64) NOT NULL DEFAULT ''," + |
| | | " dev_batt_xuhang_tlong int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_station_poff_tlong int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_station_poff_cnt int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_data_flowsum bigint(20) NOT NULL DEFAULT '0'," + |
| | | " batt_online_state int(11) NOT NULL DEFAULT '0'," + |
| | | " dev_concurr float NOT NULL DEFAULT '0'," + |
| | | " `a059_group_vol1` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组1组端电压'," + |
| | | " `a059_group_vol2` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组2组端电压'," + |
| | | " `a059_group_curr1` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组1组端电流'," + |
| | | " `a059_group_curr2` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组2组端电流',"+ |
| | | " PRIMARY KEY (num)," + |
| | | " UNIQUE KEY index_dev_id_uniq (dev_id)" + |
| | | ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"; |
| | | String str1 = "DROP TABLE IF EXISTS " + Sql_Mysql.FBS9100State_Table; |
| | | String str2 = "CREATE TABLE IF NOT EXISTS " + Sql_Mysql.FBS9100State_Table |
| | | + " ( `num` BIGINT NOT NULL AUTO_INCREMENT, " |
| | | + "`dev_ip` varchar(20) NOT NULL DEFAULT '127.0.0.0', " |
| | | + "`dev_version` varchar(64) NOT NULL DEFAULT '0', " |
| | | + "`dev_id` BIGINT NOT NULL DEFAULT 0, " |
| | | + "`op_cmd` INT NOT NULL DEFAULT 0, " |
| | | + "`record_datetime` varchar(20) NOT NULL DEFAULT '2015-12-02 12:10:00', " |
| | | + "`dev_datetime` varchar(20) NOT NULL DEFAULT '2015-12-02 12:10:00', " |
| | | + "`dev_testtype` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_testgroupnum` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_workstate` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_alarmstate` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_temp` float NOT NULL DEFAULT 0, " //设备温度 |
| | | + "`dev_res_test_state` INT NOT NULL DEFAULT 0, " //内阻测试状态 |
| | | + "`dev_onlinevollow` BOOLEAN NOT NULL DEFAULT false, " |
| | | + "`dev_eachgroup_battsum` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_captest_onlinevol` float NOT NULL DEFAULT 0, " |
| | | + "`dev_captest_groupvol` float NOT NULL DEFAULT 0, " |
| | | + "`dev_captest_curr` float NOT NULL DEFAULT 0, " |
| | | + "`dev_captest_cap` float NOT NULL DEFAULT 0, " |
| | | + "`dev_captest_timelong` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_restest_count` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_restest_moncount` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_restest_monindex` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_commcount` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_errcommcount` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_rxnullerrcount` INT NOT NULL DEFAULT 0, " |
| | | |
| | | + "`dev_last_captest_stop_type` INT NOT NULL DEFAULT 0, " |
| | | + "`dev_concurr` float NOT NULL DEFAULT 0, " |
| | | + "`dev_condvoldp` float NOT NULL DEFAULT 0, " |
| | | + "`dev_conresist` float NOT NULL DEFAULT 0, " |
| | | + "`dev_condcurr` float NOT NULL DEFAULT 0, " |
| | | + "`dev_61850alarms` varchar(64) NOT NULL DEFAULT '', " |
| | | |
| | | + "`dev_batt_xuhang_tlong` INT NOT NULL DEFAULT 0, " //续航时长 |
| | | + "`dev_station_poff_tlong` INT NOT NULL DEFAULT 0, " //停电时长 |
| | | + "`dev_station_poff_cnt` INT NOT NULL DEFAULT 0, " //停电次数 |
| | | + "`dev_data_flowsum` BIGINT NOT NULL DEFAULT 0, " //机房流量 |
| | | + "`batt_online_state` INT NOT NULL DEFAULT 0, " //电池状态(0:闭合,1:断开) |
| | | |
| | | + "`dev_condvoldp1` float NOT NULL DEFAULT '0'," |
| | | + "`a059_group_vol1` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组1组端电压'," |
| | | + "`a059_group_vol2` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组2组端电压'," |
| | | + "`a059_group_curr1` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组1组端电流'," |
| | | + "`a059_group_curr2` float NOT NULL DEFAULT '0' COMMENT '充放电一体机组2组端电流'," |
| | | + "`dev_pos_states` varchar(30) NOT NULL DEFAULT '0,0,0,0' COMMENT '切换箱接触器正极开关状态[0没通信上;1;正常;2;异常]'," |
| | | + "`dev_neg_states` varchar(30) NOT NULL DEFAULT '0,0,0,0' COMMENT '切换箱接触器负极开关状态[0没通信上;1;正常;2;异常]'," |
| | | + "`a059_onlineSaveVol` float NOT NULL DEFAULT '0' COMMENT '充放电一体机切换电池组保护电压'," |
| | | + "`a059_acvolLowFlag` int(11) NOT NULL DEFAULT '0' COMMENT '市电中断状态(0:正常;1:市电中断)'," |
| | | + "`a059_switchVolMin` float NOT NULL DEFAULT '0' COMMENT '回切组端电压范围低'," |
| | | + "`a059_switchVolMax` float NOT NULL DEFAULT '0' COMMENT '回切组端电压范围高'," |
| | | + " UNIQUE INDEX index_dev_id_uniq (`dev_id`), " |
| | | + " PRIMARY KEY (`num`) ) " |
| | | + " ENGINE=InnoDB DEFAULT CHARSET=utf8"; |
| | | /* |
| | | String str3 = "INSERT INTO " + Sql_Mysql.FBS9100State_Table + " (dev_ip, dev_id) "; |
| | | str3 += " SELECT dev_ip, dev_id FROM " + Sql_Mysql.BattInf_Table; |
| | | */ |
| | | Sql_Mysql sql = new Sql_Mysql(pool.getConn()); |
| | | ResultSet res = null; |
| | | try { |
| | | if(true == recreate) { |
| | | sql.sqlMysqlExecute(sql_str01); |
| | | if(recreate) { |
| | | sql.sqlMysqlExecute(str1); |
| | | } |
| | | sql.sqlMysqlExecute(sql_str02); |
| | | sql.sqlMysqlExecute(str2); |
| | | //修复设备设备版本号过长bug |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_version'"); |
| | | if(true == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " +Sql_Mysql.FBS9100State_Table + " MODIFY COLUMN dev_version varchar(64) NOT NULL DEFAULT '';"); |
| | | } |
| | | |
| | | //添加设备温度列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_temp'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_temp` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加内阻测试状态列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_res_test_state'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_res_test_state` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加dev_restest_count |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_restest_count'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_restest_count` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加dev_last_captest_stop_type |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_last_captest_stop_type'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_last_captest_stop_type` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加dev_concurr |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_concurr'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_concurr` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加dev_condvoldp 组1导通压降 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_condvoldp'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_condvoldp` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加dev_condvoldp1 组2导通压降 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_condvoldp1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_condvoldp1` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加dev_conresist 组1接触器导通阻抗 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_conresist'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_conresist` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加dev_conresist 组2接触器导通阻抗 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_conresist1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_conresist1` float NOT NULL DEFAULT 0 after dev_conresist;"); |
| | | } |
| | | //添加dev_condcurr |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_condcurr'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_condcurr` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加dev_61850alarms |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_61850alarms'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_61850alarms` varchar(64) NOT NULL DEFAULT '';"); |
| | | } |
| | | //添加dev_batt_xuhang_tlong |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_batt_xuhang_tlong'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_batt_xuhang_tlong` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加dev_station_poff_tlong |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_station_poff_tlong'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_station_poff_tlong` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加dev_station_poff_cnt(停电次数) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_station_poff_cnt'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_station_poff_cnt` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | |
| | | //添加dev_data_flowsum(流量统计) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='dev_data_flowsum'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `dev_data_flowsum` BIGINT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加batt_online_state(电池开关状态) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_state'" |
| | | + " AND column_name='batt_online_state'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100State_Table |
| | | + " ADD COLUMN `batt_online_state` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | res = null; |
| | | //添加字段a059_group_vol1 |
| | |
| | | * @param recreate |
| | | */ |
| | | public static void createFBS9100SetParam_Table(MysqlConnPool pool, boolean recreate) { |
| | | String sql_str01 = " DROP TABLE IF EXISTS "+Sql_Mysql.FBS9100SetParam_Table; |
| | | String sql_str02 = "CREATE TABLE IF NOT EXISTS " + Sql_Mysql.FBS9100SetParam_Table + " (" + |
| | | " num bigint(20) NOT NULL AUTO_INCREMENT," + |
| | | " dev_ip varchar(20) NOT NULL DEFAULT '127.0.0.0'," + |
| | | " dev_id bigint(20) NOT NULL DEFAULT '0'," + |
| | | " op_cmd int(11) NOT NULL DEFAULT '0'," + |
| | | " TestCmd int(11) NOT NULL DEFAULT '0'," + |
| | | " HourRate int(11) NOT NULL DEFAULT '0'," + |
| | | " DisCurr float NOT NULL DEFAULT '0'," + |
| | | " DisCap float NOT NULL DEFAULT '0'," + |
| | | " DisTime int(11) NOT NULL DEFAULT '0'," + |
| | | " GroupVol_LOW float NOT NULL DEFAULT '0'," + |
| | | " MonomerVol_LOW float NOT NULL DEFAULT '0'," + |
| | | " MonomerLowCount int(11) NOT NULL DEFAULT '0'," + |
| | | " BattGroupNum int(11) NOT NULL DEFAULT '0'," + |
| | | " OnlineVolLowAction int(11) NOT NULL DEFAULT '0'," + |
| | | " DCVolHighLimit float NOT NULL DEFAULT '0'," + |
| | | " ChargeCurrSet float NOT NULL DEFAULT '0'," + |
| | | " MonomerTmp_High float NOT NULL DEFAULT '0'," + |
| | | " AutoTestStartVol float NOT NULL DEFAULT '0'," + |
| | | " OnLineVol_Low float NOT NULL DEFAULT '0'," + |
| | | " OffLineYH_Cycle int(11) NOT NULL DEFAULT '0'," + |
| | | " OffLineYHstarttime datetime NOT NULL DEFAULT '2000-01-01 00:00:00'," + |
| | | " OffLineYHTimes int(11) NOT NULL DEFAULT '1'," + |
| | | " OffLineYHOnceCycle int(11) NOT NULL DEFAULT '1'," + |
| | | " PRIMARY KEY (num)," + |
| | | " UNIQUE KEY index_dev_id_uniq (dev_id)" + |
| | | ") ENGINE=MEMORY DEFAULT CHARSET=utf8;"; |
| | | String str1 = "DROP TABLE IF EXISTS " + Sql_Mysql.FBS9100SetParam_Table; |
| | | String str2 = "CREATE TABLE IF NOT EXISTS " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ( `num` bigint(20) NOT NULL AUTO_INCREMENT," + |
| | | " `dev_ip` varchar(20) NOT NULL DEFAULT '127.0.0.0'," + |
| | | " `dev_id` bigint(20) NOT NULL DEFAULT '0'," + |
| | | " `op_cmd` int(11) NOT NULL DEFAULT '0'," + |
| | | " `TestCmd` int(11) NOT NULL DEFAULT '0'," + |
| | | " `HourRate` int(11) NOT NULL DEFAULT '0'," + |
| | | " `DisCurr` float NOT NULL DEFAULT '0'," + |
| | | " `DisCap` float NOT NULL DEFAULT '0'," + |
| | | " `DisTime` int(11) NOT NULL DEFAULT '0'," + |
| | | " `GroupVol_LOW` float NOT NULL DEFAULT '0'," + |
| | | " `MonomerVol_LOW` float NOT NULL DEFAULT '0'," + |
| | | " `MonomerLowCount` int(11) NOT NULL DEFAULT '0'," + |
| | | " `BattGroupNum` int(11) NOT NULL DEFAULT '0'," + |
| | | " `OnlineVolLowAction` int(11) NOT NULL DEFAULT '0'," + |
| | | " `DCVolHighLimit` float NOT NULL DEFAULT '0'," + |
| | | " `ChargeCurrSet` float NOT NULL DEFAULT '0'," + |
| | | " `MonomerTmp_High` float NOT NULL DEFAULT '0'," + |
| | | " `AutoTestStartVol` float NOT NULL DEFAULT '0'," + |
| | | " `MonCount` int(11) NOT NULL DEFAULT '0' COMMENT '每组单体数'," + |
| | | " `MonVol` float NOT NULL DEFAULT '0' COMMENT '单体电压'," + |
| | | " `DisPower` float NOT NULL DEFAULT '0' COMMENT '预放功率(0.1kw)'," + |
| | | " `DisPreRes` float(11,0) NOT NULL DEFAULT '0' COMMENT '放电阻值(mΩ) '," + |
| | | " `CharCap` int(11) NOT NULL DEFAULT '0' COMMENT '充电容量(AH)'," + |
| | | " `CharTimeLong` int(11) NOT NULL DEFAULT '0' COMMENT '充电时长(min)'," + |
| | | " `FloatCharTimeLong` int(11) NOT NULL DEFAULT '0' COMMENT '浮充时长'," + |
| | | " `CharSotpCurr` float NOT NULL DEFAULT '0' COMMENT '截止电流(0.1A) '," + |
| | | " `MonVolHightLimit` float NOT NULL DEFAULT '0' COMMENT '单体上限(0.01V)'," + |
| | | " `MonVolHightLimitCount` int(11) NOT NULL DEFAULT '0' COMMENT '单体上限数量'," + |
| | | " `CharHighTmp` float(11,0) NOT NULL DEFAULT '45' COMMENT '充电过温'," + |
| | | " `DisWaitTime` int(11) NOT NULL DEFAULT '0' COMMENT '放完静置(0-500分钟)'," + |
| | | " `CharWaitTime` int(11) NOT NULL DEFAULT '0' COMMENT '充完静置(0-500分钟)'," + |
| | | " `FlowOver_Count` int(11) NOT NULL DEFAULT '1' COMMENT '恒流总阶段数[1-3]'," + |
| | | " `FlowOver_CharCurr_1` float NOT NULL DEFAULT '0' COMMENT '恒流1阶段充电电流'," + |
| | | " `FlowOver_CharCurr_2` float NOT NULL DEFAULT '0' COMMENT '恒流2阶段充电电流'," + |
| | | " `FlowOver_CharCurr_3` float NOT NULL DEFAULT '0' COMMENT '恒流3阶段充电电流'," + |
| | | " `FlowOver_CharTime_1` int(11) NOT NULL DEFAULT '0' COMMENT '恒流1阶段充电时长'," + |
| | | " `FlowOver_CharTime_2` int(11) NOT NULL DEFAULT '0' COMMENT '恒流2阶段充电时长'," + |
| | | " `FlowOver_CharTime_3` int(11) NOT NULL DEFAULT '0' COMMENT '恒流3阶段充电时长'," + |
| | | " `OnLineVol_Low` float NOT NULL DEFAULT '0'," + |
| | | " `OffLineYH_Cycle` int(11) NOT NULL DEFAULT '0'," + |
| | | " `OffLineYHstarttime` datetime NOT NULL DEFAULT '2000-01-01 00:00:00'," + |
| | | " `OffLineYHTimes` int(11) NOT NULL DEFAULT '1'," + |
| | | " `OffLineYHOnceCycle` int(11) NOT NULL DEFAULT '1'," + |
| | | " `ChargeVolt` float NOT NULL DEFAULT '0' COMMENT '充电电压(V)'," + |
| | | " `C_ProtectVol1` float NOT NULL DEFAULT '0' COMMENT '保护电压1'," + |
| | | " `C_ProtectVol2` float NOT NULL DEFAULT '0' COMMENT '保护电压2'," + |
| | | " `C_ProtectVol3` float NOT NULL DEFAULT '0' COMMENT '保护电压3'," + |
| | | " `C_mon_uppervol1` float NOT NULL DEFAULT '0' COMMENT '单体上限1'," + |
| | | " `C_mon_uppervol2` float NOT NULL DEFAULT '0' COMMENT '单体上限2'," + |
| | | " `C_mon_uppervol3` float NOT NULL DEFAULT '0' COMMENT '单体上限3'," + |
| | | " `C_mon_uppernum1` int(11) NOT NULL DEFAULT '0' COMMENT '上限个数1'," + |
| | | " `C_mon_uppernum2` int(11) NOT NULL DEFAULT '0' COMMENT '上限个数2'," + |
| | | " `C_mon_uppernum3` int(11) NOT NULL DEFAULT '0' COMMENT '上限个数3'," + |
| | | " `HV_charge_num` int(11) NOT NULL DEFAULT '0' COMMENT '恒压总阶段数[1~3]'," + |
| | | " `HV_charge_Vol1` float NOT NULL DEFAULT '0' COMMENT '恒压阶段1充电电压'," + |
| | | " `HV_charge_Vol2` float NOT NULL DEFAULT '0' COMMENT '恒压阶段2充电电压'," + |
| | | " `HV_charge_Vol3` float NOT NULL DEFAULT '0' COMMENT '恒压阶段3充电电压'," + |
| | | " `HV_time1` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段1充电时间'," + |
| | | " `HV_time2` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段2充电时间'," + |
| | | " `HV_time3` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段3充电时间'," + |
| | | " `HV_ProtectCurr1` float NOT NULL DEFAULT '0' COMMENT '保护电流1'," + |
| | | " `HV_ProtectCurr2` float NOT NULL DEFAULT '0' COMMENT '保护电流2'," + |
| | | " `HV_ProtectCurr3` float NOT NULL DEFAULT '0' COMMENT '保护电流3'," + |
| | | " `HV_mon_uppervol1` float NOT NULL DEFAULT '0' COMMENT '单体上限1'," + |
| | | " `HV_mon_uppervol2` float NOT NULL DEFAULT '0' COMMENT '单体上限2'," + |
| | | " `HV_mon_uppervol3` float NOT NULL DEFAULT '0' COMMENT '单体上限3'," + |
| | | " `HV_mon_uppernum1` int(11) NOT NULL DEFAULT '0' COMMENT '上限个数1'," + |
| | | " `HV_mon_uppernum2` int(11) NOT NULL DEFAULT '0' COMMENT '上限个数2'," + |
| | | " `HV_mon_uppernum3` int(11) NOT NULL DEFAULT '0' COMMENT '上限个数3'," + |
| | | " `MonCapStd` int(11) NOT NULL DEFAULT '0' COMMENT '标称容量'," + |
| | | " `OnlineTestFlag` int(11) NOT NULL DEFAULT '0' COMMENT '测试类型:0:离线 1:在线'," + |
| | | " `BattGroupCount` int(11) NOT NULL DEFAULT '1' COMMENT '电池组组数'," + |
| | | " `SOCLow` float NOT NULL DEFAULT '0' COMMENT '电池soc[剩余容量]下限(%)'," + |
| | | " `SOCHigh` float NOT NULL DEFAULT '0' COMMENT '电池soc[剩余容量]上限(%)'," + |
| | | " `CellDiffVolHigh` float NOT NULL DEFAULT '0' COMMENT '压差上限(mV)'," + |
| | | " PRIMARY KEY (`num`)," + |
| | | " UNIQUE KEY `index_dev_id_uniq` (`dev_id`)" + |
| | | ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"; |
| | | |
| | | Sql_Mysql sql = new Sql_Mysql(pool.getConn()); |
| | | ResultSet res = null; |
| | | try { |
| | | if(true == recreate) { |
| | | sql.sqlMysqlExecute(sql_str01); |
| | | if(true == recreate) { |
| | | sql.sqlMysqlExecute(str1); //重建表 |
| | | } |
| | | sql.sqlMysqlExecute(sql_str02); |
| | | sql.sqlMysqlExecute(str2); |
| | | //添加指定的BattGroupNum列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='BattGroupNum'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `BattGroupNum` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加指定的OnlineVolLowAction列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OnlineVolLowAction'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OnlineVolLowAction` INT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加指定的 DCVolHighLimit 列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='DCVolHighLimit'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `DCVolHighLimit` FLOAT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加指定的 ChargeCurrSet 列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='ChargeCurrSet'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `ChargeCurrSet` FLOAT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加指定的 MonomerTmp_High 列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='MonomerTmp_High'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `MonomerTmp_High` FLOAT NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加指定的 AutoTestStartVol 列 |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='AutoTestStartVol'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `AutoTestStartVol` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加指定的 OnLineVol_Low 列(在线电压低阀值) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OnLineVol_Low'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OnLineVol_Low` float NOT NULL DEFAULT 0;"); |
| | | } |
| | | |
| | | //添加指定的 OffLineYH_Cycle 列(离线养护周期) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OffLineYH_Cycle'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OffLineYH_Cycle` int NOT NULL DEFAULT 0;"); |
| | | } |
| | | //添加指定的OffLineYHstarttime列(养护计划开始时间) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OffLineYHstarttime'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OffLineYHstarttime` datetime NOT NULL DEFAULT '2000-01-01 00:00:00';"); |
| | | } |
| | | //添加指定的OffLineYHTimes列(离线养护执行次数) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OffLineYHTimes'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OffLineYHTimes` int(11) NOT NULL DEFAULT '1';"); |
| | | } |
| | | //添加指定的OffLineYHOnceCycle列(离线养护每次执行周期) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OffLineYHOnceCycle'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OffLineYHOnceCycle` int(11) NOT NULL DEFAULT '1';"); |
| | | } |
| | | |
| | | /* 2021-07-19 edit by lijun |
| | | * FGCD_A059设备新增参数 |
| | | */ |
| | | //添加指定的MonCount列(每组单体数) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='MonCount'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `MonCount` int(11) NOT NULL DEFAULT '0' COMMENT '每组单体数';"); |
| | | } |
| | | |
| | | //添加指定的MonVol列(单体电压) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='MonVol'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `MonVol` float NOT NULL DEFAULT '0' COMMENT '单体电压';"); |
| | | } |
| | | |
| | | //添加指定的DisPower列(预放功率(0.1kw)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='DisPower'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `DisPower` float(11,0) NOT NULL DEFAULT '0' COMMENT '预放功率(0.1kw)';"); |
| | | } |
| | | |
| | | //添加指定的DisPreRes列(放电阻值(mΩ)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='DisPreRes'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `DisPreRes` float(11,0) NOT NULL DEFAULT '0' COMMENT '放电阻值(mΩ)';"); |
| | | } |
| | | |
| | | //添加指定的CharCap列(充电容量(AH)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CharCap'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `CharCap` int(11) NOT NULL DEFAULT '0' COMMENT '充电容量(AH)';"); |
| | | } |
| | | |
| | | //添加指定的CharTimeLong列(充电时长(min)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CharTimeLong'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `CharTimeLong` int(11) NOT NULL DEFAULT '0' COMMENT '充电时长(min)';"); |
| | | } |
| | | |
| | | //添加指定的FloatCharTimeLong列(浮充时长) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FloatCharTimeLong'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FloatCharTimeLong` int(11) NOT NULL DEFAULT '0' COMMENT '浮充时长';"); |
| | | } |
| | | |
| | | //添加指定的CharSotpCurr列(截止电流(0.1A)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CharSotpCurr'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `CharSotpCurr` float(11,0) NOT NULL DEFAULT '0' COMMENT '截止电流(0.1A)';"); |
| | | } |
| | | |
| | | //添加指定的MonVolHightLimit列(单体上限(0.01V)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='MonVolHightLimit'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `MonVolHightLimit` float(11,0) NOT NULL DEFAULT '0' COMMENT '单体上限(0.01V)';"); |
| | | } |
| | | |
| | | //添加指定的MonVolHightLimitCount列(单体上限数量) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='MonVolHightLimitCount'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `MonVolHightLimitCount` int(11) NOT NULL DEFAULT '0' COMMENT '单体上限数量';"); |
| | | } |
| | | |
| | | //添加指定的CharHighTmp列(充电过温) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CharHighTmp'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `CharHighTmp` int(11) NOT NULL DEFAULT '0' COMMENT '充电过温';"); |
| | | } |
| | | //修改指定的CharHighTmp列(充电过温)字段int ->double |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CharHighTmp'"); |
| | | if(res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " modify column `CharHighTmp` float(11,0) NOT NULL DEFAULT '45' COMMENT '充电过温';"); |
| | | } |
| | | |
| | | //添加指定的DisWaitTime列(放完静置(0-500分钟)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='DisWaitTime'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `DisWaitTime` int(11) NOT NULL DEFAULT '0' COMMENT '放完静置(0-500分钟)';"); |
| | | } |
| | | |
| | | //添加指定的CharWaitTime列(充完静置(0-500分钟)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CharWaitTime'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `CharWaitTime` int(11) NOT NULL DEFAULT '0' COMMENT '充完静置(0-500分钟)';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_Count列(恒流总阶段数[1-3]) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_Count'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_Count` int(11) NOT NULL DEFAULT '1' COMMENT '恒流总阶段数[1-3]';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_CharCurr_1列(恒流1阶段充电电流) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_CharCurr_1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_CharCurr_1` float(11,0) NOT NULL DEFAULT '0' COMMENT '恒流1阶段充电电流';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_CharCurr_2列(恒流2阶段充电电流) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_CharCurr_2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_CharCurr_2` float(11,0) NOT NULL DEFAULT '0' COMMENT '恒流2阶段充电电流';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_CharCurr_3列(恒流3阶段充电电流) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_CharCurr_3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_CharCurr_3` float(11,0) NOT NULL DEFAULT '0' COMMENT '恒流3阶段充电电流';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_CharTime_1列(恒流1阶段充电时长) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_CharTime_1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_CharTime_1` int(11) NOT NULL DEFAULT '0' COMMENT '恒流1阶段充电时长';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_CharTime_2列(恒流2阶段充电时长) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_CharTime_2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_CharTime_2` int(11) NOT NULL DEFAULT '0' COMMENT '恒流2阶段充电时长';"); |
| | | } |
| | | |
| | | //添加指定的FlowOver_CharTime_3列(恒流3阶段充电时长) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='FlowOver_CharTime_3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `FlowOver_CharTime_3` int(11) NOT NULL DEFAULT '0' COMMENT '恒流3阶段充电时长';"); |
| | | } |
| | | |
| | | |
| | | //2022-06-09添加指定的ChargeVolt列(充电电压(V)) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='ChargeVolt'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `ChargeVolt` float NOT NULL DEFAULT '0' COMMENT '充电电压(V)';"); |
| | | } |
| | | |
| | | |
| | | //2022-06-17添加指定的C_ProtectVol1列(恒流保护电压1) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_ProtectVol1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_ProtectVol1` float NOT NULL DEFAULT '0' COMMENT '恒流保护电压1'"); |
| | | } |
| | | |
| | | //2022-06-17添加指定的C_ProtectVol2列(恒流保护电压2) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_ProtectVol2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_ProtectVol2` float NOT NULL DEFAULT '0' COMMENT '恒流保护电压2'"); |
| | | } |
| | | //2022-06-17添加指定的C_ProtectVol3列(恒流保护电压3) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_ProtectVol3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_ProtectVol3` float NOT NULL DEFAULT '0' COMMENT '恒流保护电压3'"); |
| | | } |
| | | //2022-06-17添加指定的C_mon_uppervol1列(恒流单体上限1) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_mon_uppervol1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_mon_uppervol1` float NOT NULL DEFAULT '0' COMMENT '恒流单体上限1'"); |
| | | } |
| | | //2022-06-17添加指定的C_mon_uppervol2列(恒流单体上限2) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_mon_uppervol2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_mon_uppervol2` float NOT NULL DEFAULT '0' COMMENT '恒流单体上限2'"); |
| | | } |
| | | //2022-06-17添加指定的C_mon_uppervol3列(恒流单体上限3) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_mon_uppervol3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_mon_uppervol3` float NOT NULL DEFAULT '0' COMMENT '恒流单体上限3'"); |
| | | } |
| | | //2022-06-17添加指定的C_mon_uppernum1列(恒流上限个数1) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_mon_uppernum1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_mon_uppernum1` int(11) NOT NULL DEFAULT '0' COMMENT '恒流上限个数1'"); |
| | | } |
| | | //2022-06-17添加指定的C_mon_uppernum2列(恒流上限个数2) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_mon_uppernum2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_mon_uppernum2` int(11) NOT NULL DEFAULT '0' COMMENT '恒流上限个数2'"); |
| | | } |
| | | //2022-06-17添加指定的C_mon_uppernum3列(恒流上限个数3) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='C_mon_uppernum3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `C_mon_uppernum3` int(11) NOT NULL DEFAULT '0' COMMENT '恒流上限个数3'"); |
| | | } |
| | | |
| | | //2022-06-17添加指定的HV_charge_num列(恒压总阶段数[1~3]) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_charge_num'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_charge_num` int(11) NOT NULL DEFAULT '0' COMMENT '恒压总阶段数[1~3]'"); |
| | | } |
| | | //2022-06-17添加指定的HV_charge_Vol1列(恒压阶段1充电电压) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_charge_Vol1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_charge_Vol1` float NOT NULL DEFAULT '0' COMMENT '恒压阶段1充电电压'"); |
| | | } |
| | | //2022-06-17添加指定的HV_charge_Vol2列(恒压阶段2充电电压) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_charge_Vol2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_charge_Vol2` float NOT NULL DEFAULT '0' COMMENT '恒压阶段2充电电压'"); |
| | | } |
| | | //2022-06-17添加指定的HV_charge_Vol3列(恒压阶段3充电电压) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_charge_Vol3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_charge_Vol3` float NOT NULL DEFAULT '0' COMMENT '恒压阶段3充电电压'"); |
| | | } |
| | | //2022-06-17添加指定的HV_time1列(恒压阶段1充电时间) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_time1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_time1` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段1充电时间'"); |
| | | } |
| | | //2022-06-17添加指定的HV_time2列(恒压阶段2充电时间) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_time2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_time2` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段2充电时间'"); |
| | | } |
| | | //2022-06-17添加指定的HV_time3列(恒压阶段3充电时间) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_time3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_time3` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段3充电时间'"); |
| | | } |
| | | //2022-06-17添加指定的HV_ProtectCurr1列(恒压阶段1保护电流) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_ProtectCurr1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_ProtectCurr1` float NOT NULL DEFAULT '0' COMMENT '恒压阶段1保护电流'"); |
| | | } |
| | | //2022-06-17添加指定的HV_ProtectCurr2列(恒压阶段2保护电流) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_ProtectCurr2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_ProtectCurr2` float NOT NULL DEFAULT '0' COMMENT '恒压阶段2保护电流'"); |
| | | } |
| | | //2022-06-17添加指定的HV_ProtectCurr3列(恒压阶段3保护电流) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_ProtectCurr3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_ProtectCurr3` float NOT NULL DEFAULT '0' COMMENT '恒压阶段3保护电流'"); |
| | | } |
| | | //2022-06-17添加指定的HV_mon_uppervol1列(恒压阶段1单体上限) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_mon_uppervol1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_mon_uppervol1` float NOT NULL DEFAULT '0' COMMENT '恒压阶段1单体上限'"); |
| | | } |
| | | //2022-06-17添加指定的HV_mon_uppervol2列(恒压阶段2单体上限) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_mon_uppervol2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_mon_uppervol2` float NOT NULL DEFAULT '0' COMMENT '恒压阶段2单体上限'"); |
| | | } |
| | | //2022-06-17添加指定的HV_mon_uppervol3列(恒压阶段1单体上限) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_mon_uppervol3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_mon_uppervol3` float NOT NULL DEFAULT '0' COMMENT '恒压阶段3单体上限'"); |
| | | } |
| | | //2022-06-17添加指定的HV_mon_uppernum1列(恒压阶段1上限个数) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_mon_uppernum1'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_mon_uppernum1` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段1上限个数'"); |
| | | } |
| | | //2022-06-17添加指定的HV_mon_uppernum2列(恒压阶段2上限个数) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_mon_uppernum2'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_mon_uppernum2` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段2上限个数'"); |
| | | } |
| | | //2022-06-17添加指定的HV_mon_uppernum3列(恒压阶段3上限个数) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='HV_mon_uppernum3'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `HV_mon_uppernum3` int(11) NOT NULL DEFAULT '0' COMMENT '恒压阶段3上限个数'"); |
| | | } |
| | | //2022-11-04添加指定的MonCapStd列(标称容量) |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='MonCapStd'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `MonCapStd` int(11) NOT NULL DEFAULT '0' COMMENT '标称容量';"); |
| | | } |
| | | /************* 2022-12-06 新增FBO-4830NT 参数字段 **************************************/ |
| | | res = null; |
| | | //添加 OnlineTestFlag [测试类型字段] |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='OnlineTestFlag'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `OnlineTestFlag` int(11) NOT NULL DEFAULT '0' COMMENT '测试类型:0:离线 1:在线';"); |
| | | } |
| | | res = null; |
| | | //添加 BattGroupCount [电池组组数] |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='BattGroupCount'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `BattGroupCount` int(11) NOT NULL DEFAULT '1' COMMENT '电池组组数';"); |
| | | } |
| | | res = null; |
| | | //添加 SOCLow [电池soc[剩余容量]下限] |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='SOCLow'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `SOCLow` float NOT NULL DEFAULT '0' COMMENT '电池soc[剩余容量]下限(%)';"); |
| | | } |
| | | res = null; |
| | | //添加 SOCHigh [电池soc[剩余容量]上限] |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='SOCHigh'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `SOCHigh` float NOT NULL DEFAULT '0' COMMENT '电池soc[剩余容量]上限(%)';"); |
| | | } |
| | | res = null; |
| | | //添加 CellDiffVolHigh [压差上限] |
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns" |
| | | + " WHERE table_schema='db_ram_db'" |
| | | + " AND table_name='tb_fbs9100_setparam'" |
| | | + " AND column_name='CellDiffVolHigh'"); |
| | | if(false == res.next()) { |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.FBS9100SetParam_Table |
| | | + " ADD COLUMN `CellDiffVolHigh` float NOT NULL DEFAULT '0' COMMENT '压差上限(mV)';"); |
| | | } |
| | | /****************************************************************/ |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |