Browse Source

bug修复2

xushili 5 months ago
parent
commit
73ccbfe16a

+ 73 - 27
.idea/workspace.xml

@@ -4,26 +4,19 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="c9251c3e-9f2f-4b6c-a5f7-503156fe13c0" name="Changes" comment="读取调试">
-      <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao/IHistoryDao.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/service/TaosDataService.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/dataSources.local.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources.local.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/dataSources.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/jarRepositories.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/jarRepositories.xml" afterDir="false" />
+    <list default="true" id="c9251c3e-9f2f-4b6c-a5f7-503156fe13c0" name="Changes" comment="bug修复">
+      <change afterPath="$PROJECT_DIR$/generationXK-service/src/test/java/com/gyee/generation/SaticScheduleCALTaskTest.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/data-adapter/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/pom.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/config/DataConverterManager2.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/config/DataConverterManager2.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/config/MqttServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/config/MqttServer.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/config/PushCallback.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/config/PushCallback.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/controller/SubscribeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/controller/SubscribeController.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/MqttTaosLatestDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/MqttTaosLatestDao.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/TaosConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/TaosConfig.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/entity/PointData.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/entity/PointData.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/service/TsDataService.java" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/service/TsDataService.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/data-adapter/src/main/resources/application.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/data-adapter/src/main/resources/application.yaml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/config/mybatis/CustomizedSqlInjector.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/config/mybatis/CustomizedSqlInjector.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/config/mybatis/InsertOrUpdateBath.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/config/mybatis/InsertOrUpdateBath.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconAnalysisSubtableBottomServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconAnalysisSubtableBottomServiceImpl.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconStationPowerServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconStationPowerServiceImpl.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconSystemEfficiencyEquipmentServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconSystemEfficiencyEquipmentServiceImpl.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconSystemEfficiencyServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconSystemEfficiencyServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/generationXK-service/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/pom.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/generationXK-service/src/test/java/com/gyee/generation/CurveTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/generationXK-service/src/test/java/com/gyee/generation/CurveTest.java" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -43,6 +36,9 @@
   <component name="GitToolBoxStore">
     <option name="projectConfigVersion" value="5" />
   </component>
+  <component name="HighlightingSettingsPerFile">
+    <setting file="file://$PROJECT_DIR$/generationXK-service/src/test/java/com/gyee/generation/SaticScheduleCALTaskTest.java" root0="FORCE_HIGHLIGHTING" />
+  </component>
   <component name="KubernetesApiPersistence">{}</component>
   <component name="KubernetesApiProvider">{
   &quot;isMigrated&quot;: true
@@ -71,6 +67,8 @@
     "HTTP 请求.generated-requests | #261.executor": "Run",
     "HTTP 请求.generated-requests | #262.executor": "Run",
     "HTTP 请求.generated-requests | #263.executor": "Run",
+    "HTTP 请求.generated-requests | #264.executor": "Run",
+    "JUnit.SaticScheduleCALTaskTest.all.executor": "Debug",
     "JUnit.test.test1.executor": "Debug",
     "Maven.common [clean].executor": "Run",
     "Maven.common [compile].executor": "Run",
@@ -93,7 +91,7 @@
     "WebServerToolWindowFactoryState": "false",
     "git-widget-placeholder": "master",
     "kotlin-language-version-configured": "true",
-    "last_opened_file_path": "C:/Users/gfhdpc/AppData/Roaming/DBeaverData/drivers/maven/maven-central/com.taosdata.jdbc/taos-jdbcdriver-3.3.2.jar",
+    "last_opened_file_path": "D:/ruoyi/runeconomy-nx/generationXK-service/src/test/java/com/gyee/generation",
     "node.js.detected.package.eslint": "true",
     "node.js.detected.package.tslint": "true",
     "node.js.selected.package.eslint": "(autodetect)",
@@ -137,22 +135,35 @@
       </set>
     </option>
   </component>
-  <component name="RunManager" selected="Spring Boot.GenerationMain">
+  <component name="RunManager" selected="JUnit.SaticScheduleCALTaskTest.all">
     <configuration name="generated-requests | #259" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="259" requestIdentifier="#259" runType="运行单个请求">
       <method v="2" />
     </configuration>
-    <configuration name="generated-requests | #260" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="260" requestIdentifier="#260" runType="运行单个请求">
-      <method v="2" />
-    </configuration>
     <configuration name="generated-requests | #261" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="261" requestIdentifier="#261" runType="运行单个请求">
       <method v="2" />
     </configuration>
-    <configuration name="generated-requests | #262" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="262" requestIdentifier="#262" runType="运行单个请求">
+    <configuration name="generated-requests | #263" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="263" requestIdentifier="#263" runType="运行单个请求">
       <method v="2" />
     </configuration>
-    <configuration name="generated-requests | #263" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="263" requestIdentifier="#263" runType="运行单个请求">
+    <configuration name="generated-requests | #264" type="HttpClient.HttpRequestRunConfigurationType" factoryName="HTTP Request" temporary="true" nameIsGenerated="true" path="$APPLICATION_CONFIG_DIR$/scratches/generated-requests.http" index="264" requestIdentifier="#264" runType="运行单个请求">
       <method v="2" />
     </configuration>
+    <configuration name="SaticScheduleCALTaskTest.all" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="generationXK-service" />
+      <extension name="coverage">
+        <pattern>
+          <option name="PATTERN" value="com.gyee.generation.*" />
+          <option name="ENABLED" value="true" />
+        </pattern>
+      </extension>
+      <option name="PACKAGE_NAME" value="com.gyee.generation" />
+      <option name="MAIN_CLASS_NAME" value="com.gyee.generation.SaticScheduleCALTaskTest" />
+      <option name="METHOD_NAME" value="all" />
+      <option name="TEST_OBJECT" value="method" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration default="true" type="JetRunConfigurationType">
       <module name="runeconomy-nx" />
       <method v="2">
@@ -196,11 +207,11 @@
     </configuration>
     <recent_temporary>
       <list>
+        <item itemvalue="JUnit.SaticScheduleCALTaskTest.all" />
+        <item itemvalue="HTTP 请求.generated-requests | #264" />
         <item itemvalue="HTTP 请求.generated-requests | #259" />
         <item itemvalue="HTTP 请求.generated-requests | #263" />
         <item itemvalue="HTTP 请求.generated-requests | #261" />
-        <item itemvalue="HTTP 请求.generated-requests | #262" />
-        <item itemvalue="HTTP 请求.generated-requests | #260" />
       </list>
     </recent_temporary>
   </component>
@@ -238,7 +249,7 @@
       <workItem from="1726275498465" duration="21935000" />
       <workItem from="1726622318617" duration="13588000" />
       <workItem from="1726642901861" duration="8316000" />
-      <workItem from="1726708351953" duration="8193000" />
+      <workItem from="1726708351953" duration="14332000" />
     </task>
     <task id="LOCAL-00001" summary="宁夏风公司">
       <option name="closed" value="true" />
@@ -272,7 +283,15 @@
       <option name="project" value="LOCAL" />
       <updated>1726643253281</updated>
     </task>
-    <option name="localTasksCounter" value="5" />
+    <task id="LOCAL-00005" summary="bug修复">
+      <option name="closed" value="true" />
+      <created>1726725051595</created>
+      <option name="number" value="00005" />
+      <option name="presentableId" value="LOCAL-00005" />
+      <option name="project" value="LOCAL" />
+      <updated>1726725051595</updated>
+    </task>
+    <option name="localTasksCounter" value="6" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -293,7 +312,34 @@
     <MESSAGE value="宁夏风公司" />
     <MESSAGE value="适配器适配" />
     <MESSAGE value="读取调试" />
-    <option name="LAST_COMMIT_MESSAGE" value="读取调试" />
+    <MESSAGE value="bug修复" />
+    <option name="LAST_COMMIT_MESSAGE" value="bug修复" />
+  </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager>
+      <breakpoints>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/controller/AdapterController.java</url>
+          <line>89</line>
+          <option name="timeStamp" value="1" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/MqttTaosLatestDao.java</url>
+          <line>46</line>
+          <option name="timeStamp" value="3" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/MqttTaosLatestDao.java</url>
+          <line>48</line>
+          <option name="timeStamp" value="7" />
+        </line-breakpoint>
+      </breakpoints>
+    </breakpoint-manager>
+    <watches-manager>
+      <configuration name="SpringBootApplicationConfigurationType">
+        <watch expression="sb" />
+      </configuration>
+    </watches-manager>
   </component>
   <component name="XSLT-Support.FileAssociations.UIState">
     <expand />

+ 1 - 1
data-adapter/src/main/java/com/gyee/dataadapter/config/DataConverterManager2.java

@@ -161,7 +161,7 @@ public class DataConverterManager2 {
         return val;
     }
 
-    private float getFloat() {
+    private double getFloat() {
         int count = 4;
         byte[] bs = Arrays.copyOfRange(datas, index, count + index);
         toReverserBytes(bs);

+ 40 - 11
data-adapter/src/main/java/com/gyee/dataadapter/config/MqttServer.java

@@ -1,5 +1,6 @@
 package com.gyee.dataadapter.config;
 
+import lombok.extern.slf4j.Slf4j;
 import org.eclipse.paho.client.mqttv3.*;
 import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
 import org.slf4j.Logger;
@@ -12,9 +13,9 @@ import javax.annotation.Resource;
  * 发布端:主要实现发布消息和订阅主题,接收消息在回调类PushCallback中
  * 要发布消息的时候只需要调用sendMQTTMessage方法就OK了
  */
+@Slf4j
 @Service
 public class MqttServer {
-    private static final Logger LOGGER = LoggerFactory.getLogger(MqttServer.class);
 
     /* 订阅者客户端对象 */
     private MqttClient subsribeClient;
@@ -39,8 +40,27 @@ public class MqttServer {
     @Resource
     private MqttConfig config;
 
+    private String topicStr;
+    private int qos;
+
+    public String getTopicStr() {
+        return topicStr;
+    }
+
+    public void setTopicStr(String topicStr) {
+        this.topicStr = topicStr;
+    }
+
+    public int getQos() {
+        return qos;
+    }
+
+    public void setQos(int qos) {
+        this.qos = qos;
+    }
+
     public MqttServer() {
-        LOGGER.info("9011上线了");
+        log.info("9011上线了");
     }
 
     /**
@@ -59,11 +79,11 @@ public class MqttServer {
         //判断拦截状态*
         if (!publishClient.isConnected()) {
             publishClient.connect(options);
-            LOGGER.info("---------------------连接成功");
+            log.info("---------------------连接成功");
         } else {//这里的逻辑是如果连接成功就重新连接
             publishClient.disconnect();
             publishClient.connect(mqttConnect.getOptions(options));
-            LOGGER.info("---------------------连接成功");
+            log.info("---------------------连接成功");
         }
         return publishClient;
     }
@@ -92,9 +112,9 @@ public class MqttServer {
                 subsribeClient.disconnect();
                 subsribeClient.connect(mqttConnect.getOptions(options));
             }
-            LOGGER.info("----------Mqtt客户端连接成功");
+            log.info("----------Mqtt客户端连接成功");
         } catch (MqttException e) {
-            LOGGER.info(e.getMessage(), e);
+            log.info(e.getMessage(), e);
         }
     }
 
@@ -119,9 +139,9 @@ public class MqttServer {
             } else {
                 sbf.append("失败!");
             }
-            LOGGER.info(sbf.toString());
+            log.info(sbf.toString());
         } catch (MqttException e) {
-            LOGGER.info(e.toString());
+            log.info(e.toString());
         }
         return token.isComplete();
     }
@@ -152,7 +172,7 @@ public class MqttServer {
             //将组装好的消息发出去
             publish(this.topic, message);
         } catch (Exception e) {
-            LOGGER.info(e.toString());
+            log.info(e.toString());
             e.printStackTrace();
         }
 
@@ -171,8 +191,17 @@ public class MqttServer {
         try {
             subsribeClient.subscribe(topic, qos);
         } catch (MqttException e) {
-            LOGGER.info(e.getMessage(), e);
+            log.info(e.getMessage(), e);
         }
+        this.topicStr = topic;
+        this.qos = qos;
+    }
+
+    public void init() throws MqttException {
+        //建立连接
+        subsribeConnect();
+        //以某个消息级别订阅某个主题
+        subsribeClient.subscribe(topicStr, qos);
     }
 
     /**
@@ -188,7 +217,7 @@ public class MqttServer {
             //MQTT 协议中订阅关系是持久化的,因此如果不需要订阅某些 Topic,需要调用 unsubscribe 方法取消订阅关系。
             subsribeClient.unsubscribe(topic);
         } catch (MqttException e) {
-            LOGGER.info(e.getMessage(), e);
+            log.info(e.getMessage(), e);
         }
     }
 }

+ 1 - 1
data-adapter/src/main/java/com/gyee/dataadapter/config/PushCallback.java

@@ -30,7 +30,7 @@ public class PushCallback implements MqttCallback {
         while (retries < MAX_RETRIES) {
             try {
                 // 尝试连接到服务器
-                mqttServer.publishConnect();
+                mqttServer.init();
                 log.info("连接成功!");
                 break; // 成功连接后退出循环
             } catch (Exception e) {

+ 0 - 1
data-adapter/src/main/java/com/gyee/dataadapter/controller/SubscribeController.java

@@ -15,7 +15,6 @@ public class SubscribeController implements ApplicationRunner {
     @Resource
     private MqttServer mqttserver;
 
-
     @Value("${subscribe.topic}")
     private String topic;
 

+ 1 - 2
data-adapter/src/main/java/com/gyee/dataadapter/dao_mqtt_influxdb_taos/MqttTaosLatestDao.java

@@ -38,8 +38,7 @@ public class MqttTaosLatestDao implements ILatestDao {
             StringBuilder sb = new StringBuilder();
             sb.append("INSERT INTO ");
             for (PointData obj : list) {
-                String point = config.getTableName(obj.getTagName());
-                sb.append(config.getDbName()).append(".").append(point).append(" USING ")
+                sb.append(config.getDbName()).append(".").append(obj.getTagName()).append(" USING ")
                         .append(config.getDbName()).append(".").append(config.getAIStableName())
                         .append(" TAGS ('','','','','') VALUES (").append(obj.getTs())
                         .append(",").append(obj.getValue()).append(") ");

+ 23 - 14
data-adapter/src/main/java/com/gyee/dataadapter/entity/PointData.java

@@ -13,8 +13,9 @@ public class PointData {
     /**
      * 时间戳
      */
+    private long ts;
     private Date time;
-    @JsonIgnore
+    //@JsonInclude(JsonInclude.Include.NON_NULL)
     private String tagName;
     /**
      * 数据
@@ -32,13 +33,17 @@ public class PointData {
     public PointData() {
     }
 
-    public PointData(Date time, Double doubleValue) {
+    public PointData(Date time, double doubleValue) {
         this.time = time;
         this.doubleValue = doubleValue;
     }
 
     public long getTs() {
-        return time.getTime();
+        return ts;
+    }
+
+    public void setTs(long ts) {
+        this.ts = ts;
     }
 
     @JsonIgnore
@@ -51,10 +56,22 @@ public class PointData {
         return TsDataType.DOUBLE;
     }
 
-    public void setBooleanValue(Boolean booleanValue) {
+    public Boolean getBooleanValue() {
+        return booleanValue;
+    }
+
+    public Boolean isBooleanValue() {
+        return booleanValue;
+    }
+
+    public void setBooleanValue(boolean booleanValue) {
         this.booleanValue = booleanValue;
     }
 
+    public Long getLongValue() {
+        return longValue;
+    }
+
     public void setLongValue(long longValue) {
         this.longValue = longValue;
     }
@@ -79,12 +96,8 @@ public class PointData {
         return doubleValue;
     }
 
-    public Boolean isBooleanValue() {
-        return booleanValue;
-    }
-
-    public long getLongValue() {
-        return longValue;
+    public void setDoubleValue(double doubleValue) {
+        this.doubleValue = doubleValue;
     }
 
     @JsonIgnore
@@ -97,8 +110,4 @@ public class PointData {
         return doubleValue;
     }
 
-    public void setDoubleValue(Double doubleValue) {
-        this.doubleValue = doubleValue;
-    }
-
 }

+ 2 - 0
data-adapter/src/main/java/com/gyee/dataadapter/service/TsDataService.java

@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Service
@@ -27,6 +28,7 @@ public class TsDataService {
     }
 
     public Map<String, PointData> getLatest(String... tagNames) {
+        Map<Boolean, List<String>> nxFgs = Arrays.stream(tagNames).collect(Collectors.groupingBy(tn -> tn.startsWith("NX_FGS_")));
         return adapterService.getLatestData2(tagNames);
     }
 

+ 2 - 2
data-adapter/src/main/resources/application.yaml

@@ -38,6 +38,6 @@ taoscz:
   driver_type: com.taosdata.jdbc.rs.RestfulDriver
   #  driver_type: com.taosdata.jdbc.TSDBDriver
   #taos中ai测点的超级表名
-  di_stable_name: point_di
+  di_stable_name: pointdi
   #taos中di测点的超级表名
-  ai_stable_name: point_ci
+  ai_stable_name: pointci

+ 10 - 0
generationXK-service/pom.xml

@@ -126,6 +126,16 @@
             <artifactId>xxl-job-core</artifactId>
             <version>2.3.1</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
 
         <!--        <dependency>-->
         <!--            <groupId>com.gyee</groupId>-->

+ 0 - 4
generationXK-service/src/test/java/com/gyee/generation/CsvTest.java

@@ -3,19 +3,15 @@ package com.gyee.generation;
 
 import com.gyee.common.util.SortUtils;
 import com.gyee.generation.model.vo.CsvVo;
-
-
 import com.gyee.generation.model.vo.PointVo;
 import com.gyee.generation.util.StringUtils;
 import com.gyee.generation.util.realtimesource.math.LineUtil;
 import com.opencsv.CSVReader;
 
-
 import java.io.FileReader;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
-
 import java.util.stream.Collectors;
 
 

+ 0 - 3
generationXK-service/src/test/java/com/gyee/generation/CurveTest.java

@@ -15,11 +15,9 @@ import com.gyee.generation.service.auto.IProEconWtCurveFittingYearService;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.redis.RedisService;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
 import java.util.Calendar;
@@ -35,7 +33,6 @@ import java.util.stream.Collectors;
  * @author pankaj
  */
 @SpringBootTest
-@RunWith(SpringRunner.class)
 @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
 public class CurveTest {
 

+ 0 - 3
generationXK-service/src/test/java/com/gyee/generation/GenerationTest.java

@@ -6,11 +6,9 @@ import com.gyee.generation.service.StationPower.StationPowerService;
 import com.gyee.generation.service.initalcache.CacheService;
 import com.gyee.generation.service.realtimelibrary.*;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
 
@@ -21,7 +19,6 @@ import javax.annotation.Resource;
  * @Description :
  */
 @SpringBootTest
-@RunWith(SpringRunner.class)
 @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
 public class GenerationTest {
     @Resource

+ 72 - 0
generationXK-service/src/test/java/com/gyee/generation/SaticScheduleCALTaskTest.java

@@ -0,0 +1,72 @@
+package com.gyee.generation;
+
+import com.gyee.generation.service.InitialRedisService;
+import com.gyee.generation.service.realtimelibrary.AccessStatusService;
+import com.gyee.generation.task.SaticScheduleCALTask;
+import com.gyee.generation.task.SaticSchedulePgTask;
+import org.junit.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import javax.annotation.Resource;
+
+/**
+ * Author: malijun
+ * Data  : 2023: 12: 13
+ **/
+@SpringBootTest
+public class SaticScheduleCALTaskTest {
+
+    @Resource
+    public AccessStatusService accessStatusService;
+    @Resource
+    private InitialRedisService initialRedisService;
+    @Resource
+    private SaticScheduleCALTask saticScheduleCALTask;
+    @Resource
+    private SaticSchedulePgTask saticSchedulePgTask;
+
+    @Test
+    public void all() throws Exception {
+        //        saticScheduleCALTask.status_powerRationing();//status_middleStatusReal
+        //        saticScheduleCALTask.status_statusReal();
+        //          saticScheduleCALTask.calculate_powerRationing();
+        //        saticScheduleCALTask.calculateStatusNumber();
+
+        //saticSchedulePgTask.shutdown_All_STA();
+
+        //        saticScheduleCALTask.theoreticalPower_CAL();
+        //        saticScheduleCALTask.realtime_CAL();
+        //        saticScheduleCALTask.realtime_Wp_CAL();
+        //        saticScheduleCALTask.electricityMetering_CAL();
+
+        //        saticScheduleCALTask.accessStatus_CAL();
+        //        saticScheduleCALTask.cycleCalculation_CAL();
+
+
+        //        saticSchedulePgTask.inputOrOutPutSpeed_PG();
+        //        saticSchedulePgTask.inputOrOutPut_PG();
+        //        saticSchedulePgTask.shutdown_PG();
+
+        //        saticSchedulePgTask.equipment_PowerInfo1_PG();
+        //        saticSchedulePgTask.equipment_PowerInfo2_PG();
+        //        saticSchedulePgTask.equipment_PowerInfo3_PG();
+        //        saticSchedulePgTask.equipment_PowerInfo5_PG();
+        //        saticSchedulePgTask.equipment_PowerInfo4_PG();
+        //        saticSchedulePgTask.equipmentInfoDayTop_PG();
+        //        saticSchedulePgTask.wtAlysisDay_PG();
+
+        //        saticSchedulePgTask.windturbineGoodness_PG();
+        //        saticSchedulePgTask.calWindDeviation_PG();
+        //        saticSchedulePgTask.calFailRate_PG();
+        //        saticSchedulePgTask.brownouts_PG();
+        //
+        //        saticSchedulePgTask.windPowerInfo1_PG();
+        //        saticSchedulePgTask.windPowerInfo2_PG();
+        //        saticSchedulePgTask.windPowerInfo3_PG();
+        //        saticSchedulePgTask.windPowerInfo4_PG();
+        //        saticSchedulePgTask.windPowerInfo5_PG();
+        //        saticSchedulePgTask.windPowerInfo6_PG();
+
+
+    }
+}