wangggziwen 3 år sedan
förälder
incheckning
c67cc41259

+ 1 - 1
src/main/java/io/renren/RenrenApplication.java

@@ -9,7 +9,7 @@
 package io.renren;
 
 import io.renren.modules.aspen.entity.TElecdashboardRealtimeEntity;
-import io.renren.modules.aspen.utils.DashboardDataPullUtils;
+import io.renren.modules.aspen.core.utils.DashboardDataPullUtils;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

+ 1 - 1
src/main/java/io/renren/modules/aspen/controller/TElecdashboardDayController.java

@@ -3,7 +3,7 @@ package io.renren.modules.aspen.controller;
 import io.renren.modules.aspen.entity.TElecdashboardDayEntity;
 import io.renren.modules.aspen.entity.base.TElecdashboard;
 import io.renren.modules.aspen.service.TElecdashboardDayService;
-import io.renren.modules.aspen.utils.DashboardDataPullUtils;
+import io.renren.modules.aspen.core.utils.DashboardDataPullUtils;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;

+ 1 - 1
src/main/java/io/renren/modules/aspen/controller/TElecdashboardHourController.java

@@ -3,7 +3,7 @@ package io.renren.modules.aspen.controller;
 import io.renren.modules.aspen.entity.TElecdashboardHourEntity;
 import io.renren.modules.aspen.entity.base.TElecdashboard;
 import io.renren.modules.aspen.service.TElecdashboardHourService;
-import io.renren.modules.aspen.utils.DashboardDataPullUtils;
+import io.renren.modules.aspen.core.utils.DashboardDataPullUtils;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;

+ 9 - 1
src/main/java/io/renren/modules/aspen/controller/TElecdashboardRealtimeController.java

@@ -3,7 +3,7 @@ package io.renren.modules.aspen.controller;
 import io.renren.modules.aspen.entity.TElecdashboardRealtimeEntity;
 import io.renren.modules.aspen.entity.base.TElecdashboard;
 import io.renren.modules.aspen.service.TElecdashboardRealtimeService;
-import io.renren.modules.aspen.utils.DashboardDataPullUtils;
+import io.renren.modules.aspen.core.utils.DashboardDataPullUtils;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
@@ -35,6 +35,14 @@ public class TElecdashboardRealtimeController {
         TElecdashboard tElecdashboard = dashboardDataPullUtils.getExcelData(new TElecdashboardRealtimeEntity());
         TElecdashboardRealtimeEntity tElecdashboardRealtimeEntity = (TElecdashboardRealtimeEntity) tElecdashboard;
         tElecdashboardRealtimeService.insertTElecdashboardRealtime(tElecdashboardRealtimeEntity);
+        // 检查预警值
+        this.checkAlarmValue();
+    }
+
+    /**
+     * 检查预警值
+     */
+    private void checkAlarmValue() {
     }
 
     /**

+ 191 - 0
src/main/java/io/renren/modules/aspen/core/constant/AlarmValue.java

@@ -0,0 +1,191 @@
+package io.renren.modules.aspen.core.constant;
+
+/**
+ * 电厂大屏预警值
+ *
+ * @author: Wang Zi Wen
+ * @email: wangggziwen@163.com
+ * @datetime: 2022/9/16 16:24
+ */
+public enum AlarmValue {
+
+//    GTG45HA1("", "", ""),
+//    GTG45HA2("", "", ""),
+//    GTG45HA3("", "", ""),
+//    GTG45HA4("", "", ""),
+//    GTG45HA5("", "", ""),
+//    GTG45HA6("", "", ""),
+//    GTG45HA7("", "", ""),
+//    GTG45HA8("", "", ""),
+//    GTG45HA9("", "", ""),
+//    GTG45HT1("", "", ""),
+//    GTG45HT2("", "", ""),
+//    GTG45HT3("", "", ""),
+//    GTG45HT4("", "", ""),
+//    GTG45HT5("", "", ""),
+//    GTG45HT6("", "", ""),
+    QT61001(0, 1000, "CW-H2"),
+    QT61002(0, 1000, "CW-H2"),
+    QT61003(0, 1000, "CW-H2"),
+    QT61004(0, 1000, "CW-H2"),
+    QT61005(0, 1000, "CW-H2"),
+    QT61101(0, 50, "CW-CO"),
+    QT61102(0, 50, "CW-CO"),
+    QT61103(0, 50, "CW-CO"),
+    QT61104(0, 50, "CW-CO"),
+    QT61105(0, 50, "CW-CO"),
+    QT76001(0, 100, "GAS FILTERING STATION"),
+    QT76002(0, 100, "GAS METERING STATION");
+//    QT76041("", "", ""),
+//    QT80001("", "", ""),
+//    QT80002("", "", ""),
+//    QT80003("", "", ""),
+//    QT91001("", "", ""),
+//    QT91002("", "", ""),
+//    QT91003("", "", ""),
+//    QT91004("", "", ""),
+//    QT91005("", "", ""),
+//    QT91006("", "", ""),
+//    QT91011("", "", ""),
+//    QT91012("", "", ""),
+//    QT91013("", "", ""),
+//    AT83001("", "", ""),
+//    AT83002("", "", ""),
+//    AT83003("", "", ""),
+//    AT83004("", "", ""),
+//    QT12001("", "", ""),
+//    QT12501("", "", ""),
+//    QT12502("", "", ""),
+//    QT22001("", "", ""),
+//    QT22501("", "", ""),
+//    QT22502("", "", ""),
+//    QT32001("", "", ""),
+//    QT32002("", "", ""),
+//    QT32005("", "", ""),
+//    QT32003("", "", ""),
+//    QT32004("", "", ""),
+//    AI82002("", "", ""),
+//    AI82003("", "", ""),
+//    AI82004("", "", ""),
+//    AI82005("", "", ""),
+//    AI82006("", "", ""),
+//    AI82007("", "", ""),
+//    AI82008("", "", ""),
+//    AI82009("", "", ""),
+//    AI82010("", "", ""),
+//    AI82011("", "", ""),
+//    AI82101("", "", ""),
+//    AI82102("", "", ""),
+//    AI82103("", "", ""),
+//    AI82104("", "", ""),
+//    AI82105("", "", ""),
+//    AI82106("", "", ""),
+//    AI82107("", "", ""),
+//    AI82108("", "", ""),
+//    AI82109("", "", ""),
+//    AI82110("", "", ""),
+//    AI82111("", "", ""),
+//    AI82112("", "", ""),
+//    AI82113("", "", ""),
+//    HRSG1_AI82201("", "", ""),
+//    HRSG1_AI82202("", "", ""),
+//    HRSG1_AI82203("", "", ""),
+//    HRSG1_AI82204("", "", ""),
+//    HRSG1_AI82205("", "", ""),
+//    HRSG1_AI82206("", "", ""),
+//    HRSG1_AI82207("", "", ""),
+//    HRSG1_AI82208("", "", ""),
+//    HRSG1_AI82209("", "", ""),
+//    HRSG1_AI82210("", "", ""),
+//    HRSG1_AI82211("", "", ""),
+//    HRSG1_AI82212("", "", ""),
+//    HRSG1_AIR12551("", "", ""),
+//    HRSG1_AIR12552("", "", ""),
+//    HRSG1_AIR12553("", "", ""),
+//    HRSG1_AIR12554("", "", ""),
+//    HRSG1_AIR12555("", "", ""),
+//    HRSG1_AIR12556("", "", ""),
+//    HRSG1_AIR12557("", "", ""),
+//    HRSG1_AIR12558("", "", ""),
+//    HRSG2_AI82301("", "", ""),
+//    HRSG2_AI82302("", "", ""),
+//    HRSG2_AI82303("", "", ""),
+//    HRSG2_AI82304("", "", ""),
+//    HRSG2_AI82305("", "", ""),
+//    HRSG2_AI82306("", "", ""),
+//    HRSG2_AI82307("", "", ""),
+//    HRSG2_AI82308("", "", ""),
+//    HRSG2_AI82309("", "", ""),
+//    HRSG2_AI82310("", "", ""),
+//    HRSG2_AI82311("", "", ""),
+//    HRSG2_AI82312("", "", ""),
+//    HRSG2_AIR22551("", "", ""),
+//    HRSG2_AIR22552("", "", ""),
+//    HRSG2_AIR22553("", "", ""),
+//    HRSG2_AIR22554("", "", ""),
+//    HRSG2_AIR22555("", "", ""),
+//    HRSG2_AIR22556("", "", ""),
+//    HRSG2_AIR22557("", "", ""),
+//    HRSG2_AIR22558("", "", ""),
+//    HRSG2_QI22240("", "", ""),
+//    HRSG2_QI22241("", "", ""),
+//    HRSG2_QI22242("", "", ""),
+//    HRSG3_AI82401("", "", ""),
+//    HRSG3_AI82402("", "", ""),
+//    HRSG3_AI82403("", "", ""),
+//    HRSG3_AI82404("", "", ""),
+//    HRSG3_AI82405("", "", ""),
+//    HRSG3_AI82406("", "", ""),
+//    HRSG3_AI82407("", "", ""),
+//    HRSG3_AI82408("", "", ""),
+//    HRSG3_AI82409("", "", ""),
+//    HRSG3_AI82410("", "", ""),
+//    HRSG3_AI82411("", "", ""),
+//    HRSG3_AI82412("", "", ""),
+//    HRSG3_AIR32551("", "", ""),
+//    HRSG3_AIR32552("", "", ""),
+//    HRSG3_AIR32553("", "", ""),
+//    HRSG3_AIR32554("", "", ""),
+//    HRSG3_AIR32555("", "", ""),
+//    HRSG3_AIR32556("", "", ""),
+//    HRSG3_AIR32557("", "", ""),
+//    HRSG3_AIR32558("", "", ""),
+//    HRSG3_QI32240("", "", ""),
+//    HRSG3_QI32241("", "", ""),
+//    HRSG3_QI32242("", "", "");
+
+    private double min;
+    private double max;
+    private String desc;
+
+    public double getMin() {
+        return min;
+    }
+
+    public void setMin(double min) {
+        this.min = min;
+    }
+
+    public double getMax() {
+        return max;
+    }
+
+    public void setMax(double max) {
+        this.max = max;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+
+    AlarmValue(double min, double max, String desc) {
+        this.min = min;
+        this.max = max;
+        this.desc = desc;
+    }
+
+}

+ 1 - 1
src/main/java/io/renren/modules/aspen/utils/DashboardDataPullUtils.java → src/main/java/io/renren/modules/aspen/core/utils/DashboardDataPullUtils.java

@@ -1,4 +1,4 @@
-package io.renren.modules.aspen.utils;
+package io.renren.modules.aspen.core.utils;
 
 import com.opencsv.CSVReader;
 import io.renren.modules.aspen.entity.base.TElecdashboard;