From c9dd12a0042b50af36edf2ae710d33430542385d Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期二, 24 十二月 2024 10:15:43 +0800
Subject: [PATCH] 预测值 开始时间计算bug,数据补全bug

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOCollector.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOCollector.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOCollector.java
index 77339a2..4ee8b2a 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOCollector.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOCollector.java
@@ -2,9 +2,12 @@
 
 import com.iailab.module.data.channel.kio.entity.ChannelKioDeviceEntity;
 import com.iailab.module.data.channel.kio.service.ChannelKioDeviceService;
+import com.iailab.module.data.channel.opcua.collector.OpcUaUtils;
+import com.iailab.module.data.common.enums.CommonConstant;
 import com.iailab.module.data.common.enums.DataSourceType;
 import com.iailab.module.data.common.utils.TagUtils;
 import lombok.extern.slf4j.Slf4j;
+import org.eclipse.milo.opcua.sdk.client.OpcUaClient;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
@@ -50,9 +53,15 @@
         return kingIOClient;
     }
 
-    public String getTagValue(String sourceId, String tagName) throws Exception {
-        KingIOClient client = this.getClient(sourceId);
-        String value = client.getTagValue(tagName);
+    public String getTagValue(String sourceId, String tagName) {
+        String value = CommonConstant.BAD_VALUE.toString();
+        try{
+            KingIOClient client = this.getClient(sourceId);
+            value = client.getTagValue(tagName);
+        }catch (Exception ex){
+            ex.printStackTrace();
+            return value;
+        }
         return value;
     }
 

--
Gitblit v1.9.3