V2.102 edit by lijun	@  2023-08-16
1.当前版本修改为南瑞协转的通信程序
2.兼容正常1托2和常规1托2
11个文件已修改
61 ■■■■■ 已修改文件
iec61850_forFoShanAES_Model/bin/com/battdata_rt/BattData_RT$InsertDataToMysql_Task.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/battdata_rt/BattData_RT.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/battdata_rt/BattData_RT_Array.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/BTS_61850_SocketClient.class 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/version_inf/version_inf.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/log4j2_batt_61850_dev_x64.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/log4j2_batt_61850_dev_x64.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/battdata_rt/BattData_RT.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/battdata_rt/BattData_RT_Array.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/src/com/version_inf/version_inf.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iec61850_forFoShanAES_Model/bin/com/battdata_rt/BattData_RT$InsertDataToMysql_Task.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/battdata_rt/BattData_RT.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/battdata_rt/BattData_RT_Array.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/dec/fbs9100/BTS_61850_SocketClient.class
Binary files differ
iec61850_forFoShanAES_Model/bin/com/version_inf/version_inf.txt
@@ -7,6 +7,7 @@
    
V2.102 edit by lijun    @  2023-08-16
    1.当前版本修改为南瑞协转的通信程序    
    2.兼容正常1托2和常规1托2
    
    
V6.102 edit by lijun    @  2023-08-16
iec61850_forFoShanAES_Model/bin/log4j2_batt_61850_dev_x64.xml
@@ -24,7 +24,17 @@
                <SizeBasedTriggeringPolicy size="20MB"/>
            </Policies>
            <!--保存日志文件个数-->
            <DefaultRolloverStrategy max="9"/>
            <DefaultRolloverStrategy max="15">
                <Delete basePath="${LOG_HOME}/" maxDepth="2">
                    <IfFileName glob="*.log.gz" >
                        <IfAny>
                          <IfAccumulatedFileCount exceeds="14" />
                        </IfAny>
                    </IfFileName>
                    <!--!Note: 这里的age必须和filePattern协调, 后者是精确到dd, 这里就要写成xd, xD就不起作用,另外, 数字最好>2, 否则可能造成删除的时候, 最近的文件还处于被占用状态,导致删除不成功!-->
                    <!--30天-->
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>
        <!--error级别日志输出-->
iec61850_forFoShanAES_Model/log4j2_batt_61850_dev_x64.xml
@@ -24,7 +24,17 @@
                <SizeBasedTriggeringPolicy size="20MB"/>
            </Policies>
            <!--保存日志文件个数-->
            <DefaultRolloverStrategy max="9"/>
            <DefaultRolloverStrategy max="15">
                <Delete basePath="${LOG_HOME}/" maxDepth="2">
                    <IfFileName glob="*.log.gz" >
                        <IfAny>
                          <IfAccumulatedFileCount exceeds="14" />
                        </IfAny>
                    </IfFileName>
                    <!--!Note: 这里的age必须和filePattern协调, 后者是精确到dd, 这里就要写成xd, xD就不起作用,另外, 数字最好>2, 否则可能造成删除的时候, 最近的文件还处于被占用状态,导致删除不成功!-->
                    <!--30天-->
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>
        <!--error级别日志输出-->
iec61850_forFoShanAES_Model/src/com/battdata_rt/BattData_RT.java
@@ -75,6 +75,8 @@
    public int mSaveDataTimeInterval = 10;
    private float mDataHistoryNewLevel = (float) 0.01;
    private int mTestDataRecordCountMax = 10000;
    public int sign_type;
    
    Logger logger = null;
    /*********************************************************************************/
iec61850_forFoShanAES_Model/src/com/battdata_rt/BattData_RT_Array.java
@@ -84,7 +84,7 @@
            
            String sql_str = "SELECT DISTINCT "
                            + " FBSDeviceId,FBSDeviceIp,BattGroupName6,GroupIndexInFBSDevice,FBSDeviceName,"
                            + " BattGroupId,BattGroupNum,MonCount,BattFloatCurrent,FloatVolLevel,MonCapStd,MonVolStd"
                            + " BattGroupId,BattGroupNum,MonCount,BattFloatCurrent,FloatVolLevel,MonCapStd,MonVolStd,sign_type"
                            + " FROM " + Sql_Mysql.BattInf_Table
                            + " WHERE FLOOR(FBSDeviceId/10000)=61850"
                            + " ORDER BY BattGroupId ASC";
@@ -105,6 +105,7 @@
                float float_vol_lev = res.getFloat("FloatVolLevel");
                float float_curr_lev = res.getFloat("BattFloatCurrent");
                int GroupIndexInFBSDevice = res.getInt("GroupIndexInFBSDevice");
                int sign_type = res.getInt("sign_type");
                if(GroupIndexInFBSDevice > 3) {
                    GroupIndexInFBSDevice = 3;
                }
@@ -131,6 +132,10 @@
                            brt.GroupIndexInFBSDevice = GroupIndexInFBSDevice;
                            param_changed = true;
                        }
                        if(sign_type != brt.sign_type) {
                            brt.sign_type = sign_type;
                            param_changed = true;
                        }
                        
                        if(true == param_changed) {
                            FBS9100_Task_Thread_SQL.update_BTS_BattGroupState_Table(m_Conn_Pool, brt.FBSDeviceId, brt.BattGroupId, 
@@ -154,6 +159,7 @@
                    rtdata.FBSDeviceName = res.getString("FBSDeviceName").trim();
                    rtdata.setDevRegCode(res.getString("BattGroupName6").trim());
                    rtdata.GroupIndexInFBSDevice = res.getInt("GroupIndexInFBSDevice");
                    rtdata.sign_type = res.getInt("sign_type");
                    if(rtdata.GroupIndexInFBSDevice > 3) {
                        rtdata.GroupIndexInFBSDevice = 3;
                    }
iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java
@@ -32,6 +32,7 @@
import org.openmuc.openiec61850.clientgui.databind.Int64DataBind;
import org.openmuc.openiec61850.clientgui.databind.VisibleStringDataBind;
import com.base.AppConfig;
import com.base.Com;
import com.battdata_rt.BattData_RT;
import com.battdata_rt.BattData_RT_Array;
@@ -39,6 +40,9 @@
/****************************************************************************************************/
public class BTS_61850_SocketClient extends Thread {
    public static final int Sign_Type_Default = 0;
    public static final int Sign_Type_InTow   = 1;      //正常1托2
    private boolean m_App_IsAlive = true;
    private FBS9100_VCData m_FBS_VCData = null;
    private FBS9100_ParamDischarge m_FBS_DiscParam = null;
@@ -2161,7 +2165,7 @@
     * @param agree
     * @return
     */
    public static String getUKEYRootDomStr(String agree) {
    public String getUKEYRootDomStr(String agree) {
        String str1=agree.substring(0, agree.indexOf("BTSE"));
        /**
         * @lijun 兼容佛山三期版本,签名中的BTSE路径一拖一和一拖二均为BTSE
@@ -2169,15 +2173,30 @@
//        if(str1.length() > 0) {
//            return "BTSE";
//        }
        //兼容正常1托2
        if((null != m_RTData[0]) && (m_RTData[0].sign_type == Sign_Type_InTow)) {
        return agree.substring(str1.length(), agree.length());
        }else {
            return "BTSE";
        }
    }
    
    public static void main(String[] args) {
        System.out.println(getUKEYRootDomStr("ZJDYBTSE2"));
        //System.out.println(getUKEYRootDomStr("ZJDYBTSE2"));
        String btsid = "1234567890BTSE/ncdGGIO1.SPCSO2";
        String keyid = "37395256AD72043037395256AD720430";
        System.out.println(createSignature(btsid, keyid));
        MysqlConnPool pool = new MysqlConnPool("127.0.0.1", 3360, 10);
        BTS_61850_SocketClient ce = new BTS_61850_SocketClient(pool, new FBS9100_StatAndParam("127.0.01", 618500001), new BattData_RT_Array(new AppConfig(), new AppParam(), pool) , null);
        ce.m_RTData[0] = new BattData_RT(new AppConfig(), new AppParam(), pool);
        ce.m_RTData[0].sign_type = 0;
        System.out.println(ce.getUKEYRootDomStr("ZJDYBTSE2"));
    }
    /*********************************************************************************************/
iec61850_forFoShanAES_Model/src/com/version_inf/version_inf.txt
@@ -7,6 +7,7 @@
    
V2.102 edit by lijun    @  2023-08-16
    1.当前版本修改为南瑞协转的通信程序    
    2.兼容正常1托2和常规1托2
    
    
V6.102 edit by lijun    @  2023-08-16