From c583e5683bac5d11750be01b8a3c4147e8f16026 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 06 十一月 2024 23:21:53 +0800
Subject: [PATCH] 1、opc订阅服务为阻塞模式,配置需要开启多线程 2、新增订阅回调函数,用于执行任务,完成任务时调用 3、目前测试效果来看,一个定时任务只能有一个订阅任务,可订阅多个节点,当某个节点发生变化时,回调任务仅获取变化节点的信息

---
 hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
index 05ad286..c567a90 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
@@ -28,8 +28,16 @@
 
     @Test
     public void testFindPa() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(12);
-        log.info("杩涚倝涓殑鐜荤拑锛歿}", Arrays.asList(glass));
+        List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
+        if(!layoutId.isEmpty()) {
+            List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0));
+            log.info("宸插嚭涓殑鐜荤拑锛歿}", Arrays.asList(intoGlass));
+            //杩涚倝涓殑绗簩涓増鍥�
+            if (layoutId.size() > 1) {
+                List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1));
+                log.info("宸插嚭涓殑鐜荤拑锛歿}", Arrays.asList(intoGlass2));
+            }
+        }
     }
     @Test
     public void testFindPa2() {
@@ -46,15 +54,5 @@
     public void testFindPa4() {
         List<TemperingGlassInfo> glass = temperingAgoService.selectOverGlass();
         log.info("閽㈠寲鍚庣殑鐜荤拑锛歿}", Arrays.asList(glass));
-    }
-    @Test
-    public void testFindPa5() {
-        List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
-        //杩涚倝涓殑鐜荤拑
-        log.info("鐗堝浘id锛歿}", Arrays.asList(layoutId.get(0).getTemperingLayoutId()));
-        List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId());
-        log.info("鐜荤拑鐗堝浘id锛歿}", Arrays.asList(intoGlass));
-        List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId());
-        log.info("鐜荤拑鐗堝浘id锛歿}", Arrays.asList(intoGlass2));
     }
 }

--
Gitblit v1.8.0