From 03e8aca3ad6201c0d74e00d4c8d7367cdaaa54f9 Mon Sep 17 00:00:00 2001
From: Jay <csj123456>
Date: 星期五, 01 十一月 2024 11:49:51 +0800
Subject: [PATCH] tag新增导入导出功能

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOCollector.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 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 3dd07c6..77339a2 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
@@ -1,14 +1,14 @@
 package com.iailab.module.data.channel.kio.collector;
 
+import com.iailab.module.data.channel.kio.entity.ChannelKioDeviceEntity;
+import com.iailab.module.data.channel.kio.service.ChannelKioDeviceService;
 import com.iailab.module.data.common.enums.DataSourceType;
 import com.iailab.module.data.common.utils.TagUtils;
-import com.iailab.module.data.channel.kio.dto.ChannelKioDeviceDTO;
-import com.iailab.module.data.channel.kio.service.ChannelKioDeviceService;
 import lombok.extern.slf4j.Slf4j;
-import javax.annotation.Resource;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -31,15 +31,15 @@
 
     private Map<String, KingIOClient> clientMap = new ConcurrentHashMap<>();
 
-    private Map<String, ChannelKioDeviceDTO> deviceMap = new HashMap<>();
+    private Map<String, ChannelKioDeviceEntity> deviceMap = new HashMap<>();
 
     public synchronized KingIOClient getClient(String sourceId) throws Exception {
         if (!clientMap.containsKey(sourceId)) {
-            ChannelKioDeviceDTO deviceDto = channelKioDeviceService.get(sourceId);
-            deviceMap.put(sourceId, deviceDto);
-            KingIOClient kingIOClient = new KingIOClient(deviceDto.getInstanceName());
+            ChannelKioDeviceEntity deviceEntity = channelKioDeviceService.info(sourceId);
+            deviceMap.put(sourceId, deviceEntity);
+            KingIOClient kingIOClient = new KingIOClient(deviceEntity.getInstanceName());
             clientMap.put(sourceId, kingIOClient);
-            if (!kingIOClient.login(deviceDto.getAddress(), deviceDto.getPort(), deviceDto.getUsername(), deviceDto.getPassword())) {
+            if (!kingIOClient.login(deviceEntity.getAddress(), deviceEntity.getPort(), deviceEntity.getUsername(), deviceEntity.getPassword())) {
                 throw new Exception("登录异常");
             }
         }

--
Gitblit v1.9.3