From 7efbf921192559cad13a4f8086c46c3617ad2a05 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 31 十月 2024 08:34:42 +0800
Subject: [PATCH] 1、协议解析中,关阀报(83)中的RTU时钟改为关阀时间,但代码误注解掉了这行代码,修改之; 2、通信中间件测试web系统增加查询所在在线情况的命令下发。

---
 pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/Server.java |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/Server.java b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/Server.java
index a7da4eb..cc02dfc 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/Server.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/Server.java
@@ -1,10 +1,12 @@
 package com.dy.pipIrrMwTestRtu;
 
 import com.dy.common.mw.UnitInterface;
-import com.dy.common.util.ConfigXml;
+import com.dy.common.util.ConfigXml4Springboot;
 import com.dy.pipIrrMwTestRtu.tcpClient.TcpClUnit;
 import com.dy.pipIrrMwTestRtu.tcpClient.TcpClUnitConfigVo;
 import org.jdom2.Document;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ResourceLoader;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
@@ -18,8 +20,10 @@
 
 @Component
 public class Server {
+    @Autowired
+    protected ResourceLoader resourceLoader ;
 
-    private ConfigXml conf = null ;
+    private ConfigXml4Springboot conf = null ;
     private Document doc = null ;
     private boolean showStartInfo = false ;
 
@@ -41,8 +45,8 @@
         try {
             //ConfigProperties.init(this.getClass().getResourceAsStream("/config/config.properties"), false);
 
-            this.conf = new ConfigXml() ;
-            this.doc = this.conf.createDom(this.getClass(), "config.xml") ;
+            this.conf = new ConfigXml4Springboot() ;
+            this.doc = this.conf.createDom(resourceLoader, "config.xml") ;
             ////////////////
             //鏈嶅姟 閰嶇疆
             this.showStartInfo = this.conf.getSetAttrBoolean(this.doc, "config.server", "showStartInfo", null, null) ;
@@ -92,6 +96,7 @@
             // ///////////////
             // 鍩虹閰嶇疆
             ServerProperties.rtuAddr = conf.getSetAttrTxt(doc, "config.base", "rtuAddr", null, false, null);
+            ServerProperties.onlyOneHeartBeat = conf.getSetAttrBoolean(doc, "config.base", "onlyOneHeartBeat",  null, null);
             ServerProperties.icCardAddr = conf.getSetAttrTxt(doc, "config.base", "icCardAddr", null, false, null);
             ServerProperties.icCardNo = conf.getSetAttrTxt(doc, "config.base", "icCardNo", null, false, null);
 

--
Gitblit v1.8.0