V6.106 edit by lijun	@  2024-04-19
1.修复老版本程序只能识别第一个干接点告警,2-10编号干接点告警无法触发
2.新增单体电压,单体内阻,单体温度,单体剩余容量告警,核容终止时剩余容量,核容终止时组端电压,核容终止时间等读取
3.新增历史实时数据通过表 'db_param.tb_app_param'设置保存的时间
11个文件已修改
306 ■■■■■ 已修改文件
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/AppParam$MonitorParam.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/AppParam.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/BattRealDataPro_Thread.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/Sql_Mysql.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/main_BTS_APP_IEC61850.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/version_inf/version_inf.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/AppParam.java 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BattRealDataPro_Thread.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/Sql_Mysql.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/main_BTS_APP_IEC61850.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/version_inf/version_inf.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/AppParam$MonitorParam.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/AppParam.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/BattRealDataPro_Thread.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/Sql_Mysql.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/main_BTS_APP_IEC61850.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/version_inf/version_inf.txt
@@ -6,6 +6,7 @@
V6.106 edit by lijun    @  2024-04-19
    1.修复老版本程序只能识别第一个干接点告警,2-10编号干接点告警无法触发
    2.新增单体电压,单体内阻,单体温度,单体剩余容量告警,核容终止时剩余容量,核容终止时组端电压,核容终止时间等读取
    3.新增历史实时数据通过表 'db_param.tb_app_param'设置保存的时间
V6.105 edit by lijun    @  2024-02-21    
    1.新增sign_type 标识当前设备是标准1托1还是标准1托2设备
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/AppParam.java
@@ -1,15 +1,22 @@
package com.dec.fbs9100;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
 * 软件的各种参数信息
 * @author 军
 *
 */
public class AppParam {
    public final static String AppParamTableName = "tb_app_param";
    public final static String AppLog4jTableName = "tb_batt_61850_dev_x64_log4j";
    public final static String AppLog4j2_TableName = "tb_batt_61850_dev_x64_log4j2";
    public final static String AppLog4jTableName = "tb_batt_ms_x64_fbsdev_log4j";
    public final static int AppParam_Discharge = 0;
    public final static int AppParam_Charge = 1;
    public final static int AppParam_PowerOff = 2;
@@ -17,37 +24,31 @@
    private MysqlConnPool m_Conn_Pool;
    private boolean MysqlDataTable_Exist = false;
    private MonitorParam m_MonitorParam = new MonitorParam();
    private Logger logger = null;
    
    public AppParam()
    {
        logger = LogManager.getLogger(this.getClass());
    }
    
    public AppParam(MysqlConnPool pool)
    {
        logger = LogManager.getLogger(this.getClass());
        m_Conn_Pool = pool;
        getAppParam();
    }
    /***************************************************************************************
    /*
    public void checkAndCreateLog4jTable() {
        Logger logger = LogManager.getLogger(this.getClass());
        Sql_Mysql sql = null;
        try {
            sql = new Sql_Mysql(m_Conn_Pool);
            sql.sqlMysqlUseDB(Sql_Mysql.DB_AppSys);
            if(false == sql.sqlMysqlCheckIfTableExist(AppLog4jTableName)) {
                FBS9100_Task_Thread_SQL.createAppLog4jTable(m_Conn_Pool, 
                                        Sql_Mysql.DB_AppSys + ".`" + AppLog4jTableName + "`");
                logger.warn(Sql_Mysql.DB_AppSys + ".`" + AppLog4jTableName + "`" + " dose not exist, create now..." );
            }
            if(false == sql.sqlMysqlCheckIfTableExist(AppLog4j2_TableName)) {
                FBS9100_Task_Thread_SQL.createAppLog4j2_Table(m_Conn_Pool,
                                        Sql_Mysql.DB_AppSys + ".`" + AppLog4j2_TableName + "`");
                logger.warn(Sql_Mysql.DB_AppSys + ".`" + AppLog4j2_TableName + "`" + " dose not exist, create now..." );
            }
        } catch (Exception e) {
            logger.error(e.toString(), e);
        } finally {
@@ -60,12 +61,11 @@
    }
    
    public void checkAndDeleteLog4jOldData() {
        Logger logger = LogManager.getLogger(this.getClass());
        Sql_Mysql sql = null;
        try {
            sql = new Sql_Mysql(m_Conn_Pool);
            FBS9100_Task_Thread_SQL.deleteAppLog4jTableOldData(m_Conn_Pool, 
                                    Sql_Mysql.DB_AppSys + ".`" + AppLog4j2_TableName + "`");
                                    Sql_Mysql.DB_AppSys + ".`" + AppLog4jTableName + "`");
        } catch (Exception e) {
            logger.error(e.toString(), e);
        } finally {
@@ -76,9 +76,9 @@
            }
        }
    }
    *****************************************************************************************/
    */
    /**
     * ������param���������������������������������������������� �������������������������������m_MonitorParam������������������
     * 将param对象中的属性值复制 到的当前对象的m_MonitorParam属性中
     * @param param
     */
    public void copyAppParam(AppParam param)
@@ -100,33 +100,41 @@
        m_MonitorParam.poweroff_BattTestGroupCountMax = param.m_MonitorParam.poweroff_BattTestGroupCountMax;
        m_MonitorParam.poweroff_MonVolChangeLevel = param.m_MonitorParam.poweroff_MonVolChangeLevel;
        m_MonitorParam.poweroff_TestDataRecordCountMax = param.m_MonitorParam.poweroff_TestDataRecordCountMax;
        m_MonitorParam.BattJunHengFN = param.m_MonitorParam.BattJunHengFN;
        m_MonitorParam.realdata_SaveDataTimeInterval = param.m_MonitorParam.realdata_SaveDataTimeInterval;
        m_MonitorParam.realdata_SaveDataTimeMax = param.m_MonitorParam.realdata_SaveDataTimeMax;
    }
    
    class MonitorParam {
        public int discharge_SaveDataTimeInterval = 10;
        public float discharge_MonVolChangeLevel = (float) 0.05;
        public int discharge_TestTimeLongMinimum = 60;
        public int discharge_TestTimeLongMinimum = 1800;
        public int discharge_TestDataRecordCountMax = 10000;
        public int discharge_BattTestGroupCountMax = 10;
        
        public int charge_SaveDataTimeInterval = 10;
        public float charge_MonVolChangeLevel = (float) 0.05;
        public int charge_TestTimeLongMinimum = 60;
        public int charge_TestTimeLongMinimum = 1800;
        public int charge_TestDataRecordCountMax = 10000;
        public int charge_BattTestGroupCountMax = 10;
        
        public int poweroff_SaveDataTimeInterval = 10;
        public float poweroff_MonVolChangeLevel = (float) 0.05;
        public int poweroff_TestTimeLongMinimum = 60;
        public int poweroff_TestTimeLongMinimum = 1800;
        public int poweroff_TestDataRecordCountMax = 10000;
        public int poweroff_BattTestGroupCountMax = 10;
        
        public boolean BattJunHengFN = false;
        public int realdata_SaveDataTimeInterval = 60;                //历史实时数据存储数据间隔
        public int realdata_SaveDataTimeMax = 90;                    //历史实时数据最大保存周期
    }
    
    
    /**
     * ������������type����������������������������������������������������������������������������������������������������
     * 根据type获取当前是那种类型的测试,获取存储数据的时间间隔
     * @param type
     * @return
     */
@@ -146,7 +154,7 @@
    }
    
    /**
     * ������������type��������MonVolChangeLevel
     * 根据type获取MonVolChangeLevel
     * @param type
     * @return
     */
@@ -166,7 +174,7 @@
    }
    
    /**
     * ������������type��������TestTimeLongMinimum��
     * 根据type获取TestTimeLongMinimum值
     * @param type
     * @return
     */
@@ -186,7 +194,7 @@
    }
    
    /**
     * ������������type ����������������������������TestDataRecordCountMax��
     * 根据type 获取数据中的TestDataRecordCountMax值
     * @param type
     * @return
     */
@@ -206,7 +214,7 @@
    }
    
    /**
     * ������������type��������BattTestGroupCountMax��
     * 根据type获取BattTestGroupCountMax值
     * @param type
     * @return
     */
@@ -226,7 +234,7 @@
    }
    
    /**
     * ���������������������������������������� m_MonitorParam.BattJunHengFN��
     * 获取当前对象属性 m_MonitorParam.BattJunHengFN值
     * @return
     */
    public boolean getBattJunHengFN()
@@ -234,97 +242,121 @@
        return m_MonitorParam.BattJunHengFN;
    }
    
    public int getRealdata_SaveDataTimeInterval() {
        return m_MonitorParam.realdata_SaveDataTimeInterval;
    }
    public int getRealdata_SaveDataTimeMax() {
        return m_MonitorParam.realdata_SaveDataTimeMax;
    }
    /**
     * ����������������������������������������������������������������������������tb_app_param������
     * 从数据库中获取参数的值,并且创建tb_app_param表
     */
    public void getAppParam()
    {
        Logger logger = LogManager.getLogger(this.getClass());
        Sql_Mysql sql = null;
        Sql_Mysql sql = new Sql_Mysql(m_Conn_Pool);
        String sql_str;
        ResultSet res;
        ResultSet res = null;
        sql_str = "INSERT INTO " + Sql_Mysql.App_Param_Table
                + " (param_name, "
                + "param_value, "
                + "param_caption)"
                + " VALUES ";
        try {
            sql = new Sql_Mysql(m_Conn_Pool);
            sql.sqlMysqlUseDB(Sql_Mysql.DB_PARAM);
            if(false == MysqlDataTable_Exist) {
                MysqlDataTable_Exist = sql.sqlMysqlCheckIfTableExist(AppParamTableName);
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_SaveDataTimeInterval'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('discharge_SaveDataTimeInterval', '" + this.m_MonitorParam.discharge_SaveDataTimeInterval + "','discharge_TimeInterval for every data insert into db_batt_testdata by seconds')");
            }
            
            if(false == MysqlDataTable_Exist)
            {
                System.out.println(AppParamTableName + " is not exist, create it now...");
                ArrayList<String> al_sqlstr = new ArrayList<String>();
                sql_str = "CREATE TABLE `" + AppParamTableName + "` "
                        + "( `num` INT NOT NULL AUTO_INCREMENT, "
                        + "`param_name` VARCHAR(50) NULL, "
                        + "`param_value` VARCHAR(50) NULL, "
                        + "`param_caption` VARCHAR(200) NULL, "
                        + "PRIMARY KEY (`num`));";
                al_sqlstr.add(sql_str);
                sql_str = "INSERT INTO " + AppParamTableName
                        + " (param_name, "
                        + "param_value, "
                        + "param_caption)"
                        + " VALUES "
                        //-------------------------------------------------------------------------------//
                        + "('discharge_SaveDataTimeInterval', '10', "
                        + "'discharge_TimeInterval for every data insert into db_batt_testdata by seconds'), "
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_MonVolChangeLevel'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('discharge_MonVolChangeLevel', '" + this.m_MonitorParam.discharge_MonVolChangeLevel+ "', "+ "'discharge_MonVolChangeLevel for batt test data to save');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_TestTimeLongMinimum'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('discharge_TestTimeLongMinimum', '" + this.m_MonitorParam.discharge_TestTimeLongMinimum + "', " + "'discharge_TestTimeLongMinimum for batttest data to store');");
            }
                        
                        + "('discharge_MonVolChangeLevel', '0.05', "
                        + "'discharge_MonVolChangeLevel for batt test data to save'), "
                        + "('discharge_TestTimeLongMinimum', '1800', "
                        + "'discharge_TestTimeLongMinimum for batttest data to store'), "
                        + "('discharge_TestDataRecordCountMax', '10000', "
                        + "'discharge_TestDataRecordCountMax for batttest data count to insert to mysql server'), "
                        + "('discharge_BattTestGroupCountMax', '10', "
                        + "'discharge_BattTestGroupCountMax for batttest thread count to work at the same time'), "
                        //-------------------------------------------------------------------------------//
                        + "('charge_SaveDataTimeInterval', '10', "
                        + "'charge_TimeInterval for every data insert into db_batt_testdata by seconds'), "
                        + "('charge_MonVolChangeLevel', '0.05', "
                        + "'charge_MonVolChangeLevel for batt test data to save'), "
                        + "('charge_TestTimeLongMinimum', '1800', "
                        + "'charge_TestTimeLongMinimum for batttest data to store'), "
                        + "('charge_TestDataRecordCountMax', '10000', "
                        + "'charge_TestDataRecordCountMax for batttest data count to insert to mysql server'), "
                        + "('charge_BattTestGroupCountMax', '10', "
                        + "'charge_BattTestGroupCountMax for batttest thread count to work at the same time'), "
                        //-------------------------------------------------------------------------------//
                        + "('poweroff_SaveDataTimeInterval', '10', "
                        + "'poweroff_TimeInterval for every data insert into db_batt_testdata by seconds'), "
                        + "('poweroff_MonVolChangeLevel', '0.05', "
                        + "'poweroff_MonVolChangeLevel for batt test data to save'), "
                        + "('poweroff_TestTimeLongMinimum', '1800', "
                        + "'poweroff_TestTimeLongMinimum for batttest data to store'), "
                        + "('poweroff_TestDataRecordCountMax', '10000', "
                        + "'poweroff_TestDataRecordCountMax for batttest data count to insert to mysql server'), "
                        + "('poweroff_BattTestGroupCountMax', '10', "
                        + "'poweroff_BattTestGroupCountMax for batttest thread count to work at the same time'), "
                        //-------------------------------------------------------------------------------//
                        + "('BattJunHengFN', 'false', "
                        + "'BattJunHengFN for batt monomer to be balance')";
                al_sqlstr.add(sql_str);
                for(int n=0; n<al_sqlstr.size(); n++)
                    sql.sqlMysqlExecute(al_sqlstr.get(n));
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_TestDataRecordCountMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('discharge_TestDataRecordCountMax', '" + this.m_MonitorParam.discharge_TestDataRecordCountMax + "', " + "'discharge_TestDataRecordCountMax for batttest data count to insert to mysql server');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_BattTestGroupCountMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('discharge_BattTestGroupCountMax', '" + this.m_MonitorParam.discharge_BattTestGroupCountMax + "', "    + "'discharge_BattTestGroupCountMax for batttest thread count to work at the same time');");
            }
            //-------------------------------------------------------------------------------//
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_SaveDataTimeInterval'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('charge_SaveDataTimeInterval', '" + this.m_MonitorParam.charge_SaveDataTimeInterval + "', "    + "'charge_TimeInterval for every data insert into db_batt_testdata by seconds');");
            }
            
            sql_str = "SELECT * FROM  " + AppParamTableName;
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_MonVolChangeLevel'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('charge_MonVolChangeLevel', '" + this.m_MonitorParam.charge_MonVolChangeLevel + "', " + "'charge_MonVolChangeLevel for batt test data to save');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_TestTimeLongMinimum'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('charge_TestTimeLongMinimum', '" + this.m_MonitorParam.charge_TestTimeLongMinimum + "', " + "'charge_TestTimeLongMinimum for batttest data to store');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_TestDataRecordCountMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('charge_TestDataRecordCountMax', '" + this.m_MonitorParam.charge_TestDataRecordCountMax + "', "    + "'charge_TestDataRecordCountMax for batttest data count to insert to mysql server');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_BattTestGroupCountMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('charge_BattTestGroupCountMax', '" + this.m_MonitorParam.charge_BattTestGroupCountMax + "', " + "'charge_BattTestGroupCountMax for batttest thread count to work at the same time')");
            }
            //-------------------------------------------------------------------------------//
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_SaveDataTimeInterval'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('poweroff_SaveDataTimeInterval', '" + this.m_MonitorParam.poweroff_SaveDataTimeInterval + "', "    + "'poweroff_TimeInterval for every data insert into db_batt_testdata by seconds');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_MonVolChangeLevel'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('poweroff_MonVolChangeLevel', '" + this.m_MonitorParam.poweroff_MonVolChangeLevel + "', " + "'poweroff_MonVolChangeLevel for batt test data to save');");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_TestTimeLongMinimum'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('poweroff_TestTimeLongMinimum', '" + this.m_MonitorParam.poweroff_TestTimeLongMinimum + "', " + "'poweroff_TestTimeLongMinimum for batttest data to store')");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_TestDataRecordCountMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('poweroff_TestDataRecordCountMax', '" + this.m_MonitorParam.poweroff_TestDataRecordCountMax + "', "    + "'poweroff_TestDataRecordCountMax for batttest data count to insert to mysql server')");
            }
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_BattTestGroupCountMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('poweroff_BattTestGroupCountMax', '" + this.m_MonitorParam.poweroff_BattTestGroupCountMax + "', " + "'poweroff_BattTestGroupCountMax for batttest thread count to work at the same time')");
            }
            //-------------------------------------------------------------------------------//
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'BattJunHengFN'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('BattJunHengFN', '" + this.m_MonitorParam.BattJunHengFN + "', "    + "'BattJunHengFN for batt monomer to be balance')");
            }
            //-------------------------------------------------------------------------------//
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'realdata_SaveDataTimeInterval'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('realdata_SaveDataTimeInterval', '" + this.m_MonitorParam.realdata_SaveDataTimeInterval + "', "    + "'real-time history data save data interval by seconds')");
            }
            //-------------------------------------------------------------------------------//
            res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'realdata_SaveDataTimeMax'");
            if(!res.next()) {
                sql.sqlMysqlExecute(sql_str + "('realdata_SaveDataTimeMax', '" + this.m_MonitorParam.realdata_SaveDataTimeMax + "', "    + "'real-time history data save data max time for batttest data count to insert to mysql server')");
            }
            sql_str = "SELECT * FROM  " + Sql_Mysql.App_Param_Table;
            res = sql.sqlMysqlQuery(sql_str);
            String pm_name;
            while(res.next())
@@ -366,18 +398,18 @@
                //---------------------------------------------------------------------------//
                else if(pm_name.equals("BattJunHengFN"))
                    m_MonitorParam.BattJunHengFN = res.getBoolean("param_value");
                //---------------------------------------------------------------------------//
                else if(pm_name.equals("realdata_SaveDataTimeInterval"))
                    m_MonitorParam.realdata_SaveDataTimeInterval = res.getInt("param_value");
                //---------------------------------------------------------------------------//
                else if(pm_name.equals("realdata_SaveDataTimeMax"))
                    m_MonitorParam.realdata_SaveDataTimeMax = res.getInt("param_value");
                //---------------------------------------------------------------------------//
            }
        }
        catch (Exception e) {
        } catch (SQLException e) {
            logger.error(e.toString(), e);
        }
        finally
        {
            try {
                sql.close_con();
            } catch (Exception e) {
                logger.error(e.toString(), e);
            }
        } finally {
            sql.close_con();
        }
        //--------------------------------------------------------------------------------------------------------//
        if(m_MonitorParam.discharge_SaveDataTimeInterval < 5) m_MonitorParam.discharge_SaveDataTimeInterval = 5;
@@ -424,6 +456,10 @@
        
        if(m_MonitorParam.poweroff_BattTestGroupCountMax < 10) m_MonitorParam.poweroff_BattTestGroupCountMax = 10;
        if(m_MonitorParam.poweroff_BattTestGroupCountMax > 350) m_MonitorParam.poweroff_BattTestGroupCountMax = 350;
        if(m_MonitorParam.realdata_SaveDataTimeInterval < 10) m_MonitorParam.realdata_SaveDataTimeInterval = 10;
        if(m_MonitorParam.realdata_SaveDataTimeMax < 31) m_MonitorParam.realdata_SaveDataTimeMax = 31;
        //--------------------------------------------------------------------------------------------------------//
    }
}
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BattRealDataPro_Thread.java
@@ -20,19 +20,22 @@
 */
public class BattRealDataPro_Thread extends Thread{
    public MysqlConnPool con_pool;
    public AppConfig cfg;
    public AppParam param;
    public BattData_RT_Array data;
    Logger logger = null;
    
    public static int MinRecordTimeLong = 60;            //每次记录的最短时间间隔
    public static int MaxRecordTimeLong = 366;        //最大记录历史数据时间
    
    public BattRealDataPro_Thread(MysqlConnPool con_pool, AppConfig cfg, BattData_RT_Array data) {
    public BattRealDataPro_Thread(MysqlConnPool con_pool, AppParam param, BattData_RT_Array data) {
        logger = LogManager.getLogger(this.getClass());
        
        this.cfg = cfg;
        this.param = param;
        this.con_pool = con_pool;
        this.data = data;
        MinRecordTimeLong = param.getRealdata_SaveDataTimeInterval();
        MaxRecordTimeLong = param.getRealdata_SaveDataTimeMax();
    }
    
    
@@ -43,14 +46,14 @@
        Date lastTime = new Date();
        Date lastdelTime = new Date(0);
        //线程启动前休眠60秒                            //用于甄别还未通讯上的设备
//        for(int i =0; i<60; i++) {
//            try {
//                sleep(1000);
//            } catch (InterruptedException e) {
//                logger.error(e.toString(), e);
//            }
//        }
        logger.info("BattRealDataPro_Thread Start  Record......");
        for(int i =0; i<60; i++) {
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                logger.error(e.toString(), e);
            }
        }
        logger.warn("BattRealDataPro_Thread Start  Record MinRecordTimeLong:" + MinRecordTimeLong + "  MaxRecordTimeLong:"+MaxRecordTimeLong);
        Date nowTime = null;
        while(true) {
            /**************** mxpopstar add @ 20200817 ***************/
@@ -73,9 +76,9 @@
                     */
                    //获取指定天数之前的时间
                    Date critical = getDateBefore(nowTime, MaxRecordTimeLong);
                    logger.error("删除"+Com.get_DTF(critical, Com.DTF_YMDhms)+"之前创建的电池组历史实时数据库表");
                    //logger.error("删除"+Com.get_DTF(critical, Com.DTF_YMDhms)+"之前创建的电池组历史实时数据库表");
                    BTS61850_Task_Thread_SQL.deleteHistoryData(con_pool, critical);
                    logger.error("删除结束。。。。。。");
                    //logger.error("删除结束。。。。。。");
                    
                    lastdelTime = nowTime;
                }
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/Sql_Mysql.java
@@ -134,7 +134,10 @@
    public final static String Tb_Vip_UserTable = WEB_Site+".tb_vip_user";                                    //vip用户表
    public final static String Tb_Batt_Param_LowTable = WEB_Site+".tb_batt_param_low";                        //电池下限表
    public final static String Tb_AnnounceTable = WEB_Site+".tb_announce";                                    //平台公告表
    //--------------------------------------------------------------------------------------------//
    //------------------------------------- -------------------------------------------------------//
    //------------------------------------- -------------------------------------------------------//
    public final static String App_Param_Table = DB_PARAM + ".`tb_app_param`";
    //------------------------------------- -------------------------------------------------------//
    public final static String Tb_BtsStateChange_inf = DB_BATT_HISTORY + ".`tb_btsstaechange_inf`";            //设备状态变换记录表
    public final static String Tb_Batt_RealData = DB_BATT_HISTORY + ".tb_batt_realdata_";                    //电池实时数据记录表
    
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/main_BTS_APP_IEC61850.java
@@ -142,7 +142,7 @@
        
        /************************************ 记录历史实时数据 ***************************************************************/
        {
            BattRealDataPro_Thread batt_realdata = new BattRealDataPro_Thread(GB_MysqlConnPool, m_AppConfig, GB_DataArray);
            BattRealDataPro_Thread batt_realdata = new BattRealDataPro_Thread(GB_MysqlConnPool, GB_App_Param, GB_DataArray);
            batt_realdata.start();
        }
        /*********************************************************************************/
iec61850_forFoShanAES_Model/src/com/version_inf/version_inf.txt
@@ -6,6 +6,7 @@
V6.106 edit by lijun    @  2024-04-19
    1.修复老版本程序只能识别第一个干接点告警,2-10编号干接点告警无法触发
    2.新增单体电压,单体内阻,单体温度,单体剩余容量告警,核容终止时剩余容量,核容终止时组端电压,核容终止时间等读取
    3.新增历史实时数据通过表 'db_param.tb_app_param'设置保存的时间
V6.105 edit by lijun    @  2024-02-21    
    1.新增sign_type 标识当前设备是标准1托1还是标准1托2设备