From a69d63feef10e3d13e91e3647274a889a311db5a Mon Sep 17 00:00:00 2001
From: yyt <306727702@qq.com>
Date: 星期一, 19 二月 2024 08:10:23 +0800
Subject: [PATCH] 更新OPCUA

---
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java
index 4bfa496..c836a15 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java
@@ -2,7 +2,6 @@
 
 import com.google.common.collect.Lists;
 import com.jcdm.main.da.opcuaconfig.client.ClientHandler;
-import com.jcdm.main.da.opcuaconfig.controller.DaOpcuaConfigController;
 import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig;
 import com.jcdm.main.da.opcuaconfig.domain.NodeEntity;
 import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService;
@@ -10,10 +9,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.stereotype.Component;
-
 import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 @Component
 @Slf4j
@@ -29,7 +25,8 @@
     public void run(String... args) throws Exception {
         try {
             DaOpcuaConfig daOpcuaConfig=new DaOpcuaConfig();
-            daOpcuaConfig.setSubscribe("Y"); //璁剧疆鏌ヨ鏉′欢锛屾槸鍚﹁闃呯姸鎬佷负Y鐨勬墍鏈夋暟鎹�.
+            daOpcuaConfig.setSubscribe("Y"); //璁剧疆鏌ヨ鏉′欢锛岃闃呯姸鎬佺殑鎵�鏈夋暟鎹�.
+            daOpcuaConfig.setState(Long.valueOf("0")); //璁剧疆鏌ヨ鏉′欢锛屾甯哥姸鎬�.
             List<DaOpcuaConfig> nodeslist=daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig);
             clientHandler.connect();
             if (nodeslist != null && nodeslist.size() > 0) {
@@ -40,9 +37,8 @@
                     return nodeEntity;
                 });
                 clientHandler.subscribe(NodeList);
-                log.info("鍒濆鍖朞PC璁㈤槄" + nodeslist.size() + "鏉★紒");
             }
-            log.info("绯荤粺鎻愮ず锛孫PCUA璁㈤槄鎴愬姛锛�");
+            log.info("OPCUA鍒濆鍖栨垚鍔燂紝骞跺畬鎴�"+ nodeslist.size() +"涓妭鐐硅闃�");
         } catch (Exception e) {
             e.printStackTrace();
             log.info("绯荤粺鎻愮ず锛孫PCUA璁㈤槄澶辫触锛�");

--
Gitblit v1.9.3