蓄电池监控管理平台数据库初始化程序
whycrzg
2021-10-25 1df7215c1e4b1d518964eb8fed8de6ef98a46c0b
V1.86 edit at date 2021-10-25
1:修改`db_ram_db`.`tb_li9130_bms_state`表
env_temp、mos_temp、current、sum_vol 四个字段(原int)类型为float
3个文件已修改
31 ■■■■ 已修改文件
BattMonitor_DB_Builder/src/com/database_util/DB_Ram_db.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BattMonitor_DB_Builder/src/com/version_inf/version_inf.txt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BattMonitor_DB_Builder/src/main/main_BTS_DB_Builder.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BattMonitor_DB_Builder/src/com/database_util/DB_Ram_db.java
@@ -264,10 +264,10 @@
                "  `mon_tmp2` float NOT NULL DEFAULT '0' COMMENT '电芯2温度'," +
                "  `mon_tmp3` float NOT NULL DEFAULT '0' COMMENT '电芯3温度'," +
                "  `mon_tmp4` float NOT NULL DEFAULT '0' COMMENT '电芯4温度'," +
                "  `env_temp` int(11) NOT NULL DEFAULT '0' COMMENT '环境温度'," +
                "  `mos_temp` int(11) NOT NULL DEFAULT '0' COMMENT 'MOS管温度'," +
                "  `current` int(11) NOT NULL DEFAULT '0' COMMENT '电流'," +
                "  `sum_vol` int(11) NOT NULL DEFAULT '0' COMMENT '总压'," +
                "  `env_temp` float(11) NOT NULL DEFAULT '0' COMMENT '环境温度'," +
                "  `mos_temp` float(11) NOT NULL DEFAULT '0' COMMENT 'MOS管温度'," +
                "  `current` float(11) NOT NULL DEFAULT '0' COMMENT '电流'," +
                "  `sum_vol` float(11) NOT NULL DEFAULT '0' COMMENT '总压'," +
                "  `rest_cap` int(11) NOT NULL DEFAULT '0' COMMENT '剩余容量'," +
                "  `sum_cap` int(11) NOT NULL DEFAULT '0' COMMENT '总容量'," +
                "  `cycle_times` int(11) NOT NULL DEFAULT '0' COMMENT '电池循环次数'," +
@@ -281,7 +281,23 @@
            if(true == recreate) {            
                sql.sqlMysqlExecute(sql_str01);
            }
            sql.sqlMysqlExecute(sql_str02);
            sql.sqlMysqlExecute(sql_str02);
            //修改字段env_temp    类型为float
            sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Tb_li9130_bms_state
                    + " CHANGE `env_temp` `env_temp` float NOT NULL DEFAULT '0' COMMENT '环境温度';");
            //修改字段mos_temp    类型为float
            sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Tb_li9130_bms_state
                    + " CHANGE `mos_temp` `mos_temp` float NOT NULL DEFAULT '0' COMMENT 'MOS管温度';");
            //修改字段current    类型为float
            sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Tb_li9130_bms_state
                    + " CHANGE `current` `current` float NOT NULL DEFAULT '0' COMMENT '电流';");
            //修改字段sum_vol    类型为float
            sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Tb_li9130_bms_state
                    + " CHANGE `sum_vol` `sum_vol` float NOT NULL DEFAULT '0' COMMENT '总压';");
            
        } catch (SQLException e) {
            e.printStackTrace();
BattMonitor_DB_Builder/src/com/version_inf/version_inf.txt
@@ -299,4 +299,7 @@
    
V1.85 edit at date 2021-10-21
    1.新增'db_battinf.tb_battscrap'、tb_battspare、tb_battspare_record 表的创建语句
V1.86 edit at date 2021-10-25
    1:修改`db_ram_db`.`tb_li9130_bms_state`表   env_temp、mos_temp、current、sum_vol 四个字段(原int)类型为float
    
BattMonitor_DB_Builder/src/main/main_BTS_DB_Builder.java
@@ -28,7 +28,7 @@
    /**************************************************************************/
    /**************************************************************************/
    public final static boolean app_debug = false;
    public final static float m_VersionNum = (float) 1.85;
    public final static float m_VersionNum = (float) 1.86;
    public final static String m_Version = "Welcome To Use BTS DB BUILDER V" + m_VersionNum + " RC_20180908";
    /**************************************************************************/
    /**************************************************************************/