Kaynağa Gözat

重命名模块

欧阳劲驰 2 hafta önce
ebeveyn
işleme
91700f739d

+ 1 - 1
custom-gateway-app/pom.xml

@@ -30,7 +30,7 @@
         <!--中环数采-->
         <dependency>
             <groupId>com.shkpr.service</groupId>
-            <artifactId>custom-gateway-zhiot</artifactId>
+            <artifactId>custom-gateway-zhscada</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

+ 2 - 2
custom-gateway-zhiot/pom.xml

@@ -9,13 +9,13 @@
     </parent>
 
     <!--工件名-->
-    <artifactId>custom-gateway-zhiot</artifactId>
+    <artifactId>custom-gateway-zhscada</artifactId>
     <!--版本号-->
     <version>${project.version}</version>
     <!--打包方式-->
     <packaging>jar</packaging>
     <!--项目名-->
-    <name>CustomGatewayZhiot</name>
+    <name>CustomGatewayZhscada</name>
     <!--项目描述-->
     <description>中环数采</description>
 

+ 6 - 6
custom-gateway-zydma/src/main/java/com/shkpr/service/customgateway/zydma/components/IotCollector.java

@@ -33,17 +33,17 @@ import java.util.stream.Collectors;
 import static com.shkpr.service.customgateway.zydma.constants.IotPlatformMetadata.*;
 
 /**
- * 物联网平台采集器
+ * 数据采集器
  *
  * @author 欧阳劲驰
  * @since 1.0.0
  */
 @Component
-public class IotCollector {
+public class DataCollector {
     /**
      * log
      */
-    private static final String CLASS_NAME = "IotCollector";
+    private static final String CLASS_NAME = "DataCollector";
     private static final String BIZ_TYPE = LogFlagBusiType.BUSI_ALL.toStrValue();
 
     final
@@ -62,7 +62,7 @@ public class IotCollector {
     //密钥
     public volatile IntegrationKey key = null;
 
-    public IotCollector(CallingProperties callingProperties, DeviceRegistry deviceRegistry, DeviceIdGenerator deviceIdGenerator, InfluxDbUtil influxDbUtil, CallingUtil callingUtil) {
+    public DataCollector(CallingProperties callingProperties, DeviceRegistry deviceRegistry, DeviceIdGenerator deviceIdGenerator, InfluxDbUtil influxDbUtil, CallingUtil callingUtil) {
         this.callingProperties = callingProperties;
         this.endpoint = callingProperties.getEndpoints().get(NAME);
         this.deviceRegistry = deviceRegistry;
@@ -73,11 +73,11 @@ public class IotCollector {
 
 
     /**
-     * 采集流量
+     * 采集物联网平台
      *
      * @param previousHours 往前回溯小时数
      */
-    public void collectFlow(int previousHours) {
+    public void collectIotPlatform(int previousHours) {
         LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, BIZ_TYPE, CLASS_NAME
                 , "开始采集流量数据,开始拉取数据");
         long begin = System.currentTimeMillis();

+ 10 - 10
custom-gateway-zydma/src/main/java/com/shkpr/service/customgateway/zydma/manager/IotManager.java

@@ -1,6 +1,6 @@
 package com.shkpr.service.customgateway.zydma.manager;
 
-import com.shkpr.service.customgateway.zydma.components.IotCollector;
+import com.shkpr.service.customgateway.zydma.components.DataCollector;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Component;
@@ -8,21 +8,21 @@ import org.springframework.stereotype.Component;
 import javax.annotation.PostConstruct;
 
 /**
- * 物联网管理
+ * 数据管理
  *
  * @author 欧阳劲驰
  * @serial 1.0.0
  */
 @Component
-public class IotManager {
+public class DataManager {
     final
     ThreadPoolTaskExecutor taskScheduler;
     final
-    IotCollector iotCollector;
+    DataCollector dataCollector;
 
-    public IotManager(ThreadPoolTaskExecutor taskScheduler, IotCollector iotCollector) {
+    public DataManager(ThreadPoolTaskExecutor taskScheduler, DataCollector dataCollector) {
         this.taskScheduler = taskScheduler;
-        this.iotCollector = iotCollector;
+        this.dataCollector = dataCollector;
     }
 
     /**
@@ -30,8 +30,8 @@ public class IotManager {
      */
     @PostConstruct
     public void init() {
-        //采集流量数据
-        taskScheduler.execute(() -> iotCollector.collectFlow(4 * 24));
+        //采集物联网平台
+        taskScheduler.execute(() -> dataCollector.collectIotPlatform(4 * 24));
     }
 
     /**
@@ -39,7 +39,7 @@ public class IotManager {
      */
     @Scheduled(cron = "0 */15 0,6,12,18 * * ?")
     public void minuteTask() {
-        //采集流量数据
-        taskScheduler.execute(() -> iotCollector.collectFlow(2 * 6));
+        //采集物联网平台
+        taskScheduler.execute(() -> dataCollector.collectIotPlatform(2 * 6));
     }
 }

+ 1 - 1
pom.xml

@@ -29,7 +29,7 @@
         <!--枣阳漏控-->
         <module>custom-gateway-zydma</module>
         <!--中环数采-->
-        <module>custom-gateway-zhiot</module>
+        <module>custom-gateway-zhscada</module>
     </modules>