From 1e2eb11bc373763dae6a1d494bdbddcd72f68697 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 28 三月 2025 13:48:41 +0800
Subject: [PATCH] ASDC

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
index d3c6d26..68fee73 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
@@ -3,6 +3,7 @@
 import com.iailab.framework.common.util.string.StrUtils;
 import com.iailab.module.data.channel.http.collector.SourceApiEnum;
 import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsdb;
+import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsdc;
 import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsde;
 import com.iailab.module.data.channel.http.collector.ihdb.HttpCollectorForIhd;
 import com.iailab.module.data.channel.opcda.collector.OpcDACollector;
@@ -63,6 +64,9 @@
     @Autowired
     private HttpCollectorForAsde httpCollectorForAsde;
 
+    @Autowired
+    private HttpCollectorForAsdc httpCollectorForAsdc;
+
     @Resource
     private DaPointService daPointService;
 
@@ -83,6 +87,7 @@
         List<Object[]> httpTagIhd = new ArrayList<>();
         List<Object[]> httpTagAsdb = new ArrayList<>();
         List<Object[]> httpTagAsde = new ArrayList<>();
+        List<Object[]> httpTagAsdc = new ArrayList<>();
 
         dtos.stream().forEach(item -> {
             if (DataSourceType.OPCUA.getCode().equals(item.getSourceType())) {
@@ -106,7 +111,11 @@
                     if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) {
                         httpTagAsde.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()});
                     }
-                }
+                } /*else if (SourceApiEnum.ASDC.getCode().equals(item.getSourceName())) {
+                    if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) {
+                        httpTagAsdc.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()});
+                    }
+                }*/
             }
         });
 
@@ -132,6 +141,9 @@
         if (!CollectionUtils.isEmpty(httpTagAsde)) {
             tagValues.putAll(httpCollectorForAsde.getTagValues(httpTagAsde, collectTime));
         }
+        if (!CollectionUtils.isEmpty(httpTagAsdc)) {
+            tagValues.putAll(httpCollectorForAsdc.getTagValues(httpTagAsdc, collectTime));
+        }
         this.toCommonResult(collectTime, dtos, tagValues, dataMap, result,listGood,listBad);
         log.info("测量点处理结束");
         return result;
@@ -155,7 +167,7 @@
                     pojo.setTimestamp(collectTime.toInstant());
                     result.add(pojo);
                     listBad.add(dto.getPointNo());
-                    System.out.println("值异常!TagId=" + tagId);
+                    log.info("值异常!TagId=" + tagId);
                 }
             });
         }

--
Gitblit v1.9.3