瀏覽代碼

Merge branch 'dev' into fpg-master

guoqiang 7 月之前
父節點
當前提交
171de23a37

+ 4 - 4
jeecg-module-gather/src/main/java/org/jeecg/modules/common/enums/EDeviceInformationType.java

@@ -2,10 +2,10 @@ package org.jeecg.modules.common.enums;
 
 public enum EDeviceInformationType {
 
-    HOST_OPEN("host_open", "峰平谷开启"),
-    HOST_STOP("host_stop", "峰平谷关闭"),
-    FPG_OPEN("fpg_open", "主设备开启"),
-    FPG_CLOSE("fpg_close", "主设备关闭"),
+    HOST_OPEN("host_open", "主设备开启"),
+    HOST_STOP("host_stop", "主设备关闭"),
+    FPG_OPEN("fpg_open", "峰平谷开启"),
+    FPG_CLOSE("fpg_close", "峰平谷关闭"),
     FPG_ING_TIME("fpg_ing_time", "峰平谷运行时间"),
     FPG_POWER_LIMIT("fpg_power_limit", "峰平谷功率限制");
 

+ 11 - 2
jeecg-module-gather/src/main/java/org/jeecg/modules/fpgJob/LeanEventTriggerWarnTask.java

@@ -1,7 +1,10 @@
 package org.jeecg.modules.fpgJob;
 
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.formula.functions.T;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.common.enums.EDeviceInformationType;
 import org.jeecg.modules.device.service.IDeviceInformationService;
@@ -10,6 +13,7 @@ import org.jeecg.modules.events.entity.LeanEventsHost;
 import org.jeecg.modules.events.service.ILeanEventsHostService;
 import org.jeecg.modules.gatherData.entity.FpgGatherData;
 import org.jeecg.modules.gatherData.service.IFpgGatherDataService;
+import org.jeecg.modules.leanEventWarn.entity.LeanEventsHostConfig;
 import org.jeecg.modules.leanEventWarn.service.ILeanEventWarnInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.mongodb.core.MongoTemplate;
@@ -129,8 +133,13 @@ public class LeanEventTriggerWarnTask {
     /**
      * 峰平谷采集数据 过期数据定时删除
      */
-//    @Scheduled(cron = "0 */10 * * * *")
+    @Scheduled(cron = "0 0/60 * * * ?")
     public void removeFpgGatherDataHandle(){
-
+        LambdaQueryWrapper<FpgGatherData> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(FpgGatherData::getEventWarnState, "1").eq(FpgGatherData::getFpgModelState, "1");
+        List<FpgGatherData>  fpgGatherDataList = fpgGatherDataService.list(queryWrapper);
+        if (oConvertUtils.listIsNotEmpty(fpgGatherDataList)){
+            fpgGatherDataService.updateBatchById(fpgGatherDataList);
+        }
     }
 }

+ 68 - 34
jeecg-module-gather/src/main/java/org/jeecg/modules/leanEventWarn/service/impl/LeanEventWarnInfoServiceImpl.java

@@ -1,7 +1,7 @@
 package org.jeecg.modules.leanEventWarn.service.impl;
-import cn.hutool.core.date.LocalDateTimeUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.jeecg.modules.common.enums.EDeviceInformationType;
 import org.jeecg.modules.events.entity.LeanEventsHost;
-import org.jeecg.modules.gatherData.entity.FpgStatiscsModelData;
 import org.jeecg.modules.gatherData.entity.FpgStatiscsModelMongodb;
 import org.jeecg.modules.leanEventWarn.entity.LeanEventWarnInfo;
 import org.jeecg.modules.leanEventWarn.entity.LeanEventsHostConfig;
@@ -14,7 +14,9 @@ import org.jeecg.modules.gatherData.service.IFpgGatherDataService;
 import org.jeecg.modules.leanEventWarn.service.ILeanEventsHostConfigService;
 import org.jeecg.modules.peaksAndValleysTimeConfig.entity.PeaksAndValleysTimeConfig;
 import org.jeecg.modules.peaksAndValleysTimeConfig.entity.PeaksAndValleysTimeConfigParam;
+import org.jeecg.modules.peaksAndValleysTimeConfig.entity.SystemVariable;
 import org.jeecg.modules.peaksAndValleysTimeConfig.service.IPeaksAndValleysTimeConfigService;
+import org.jeecg.modules.peaksAndValleysTimeConfig.service.ISystemVariableService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.data.mongodb.core.query.Criteria;
@@ -58,6 +60,9 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
     @Autowired
     MongoTemplate mongoTemplate;
 
+    @Autowired
+    ISystemVariableService systemVariableService;
+
     @Override
     public void openDeviceTriggerWarnInfo(FpgGatherData fpgGatherData) {
         LeanEventWarnInfo leanEventWarnInfo = new LeanEventWarnInfo();
@@ -67,12 +72,19 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
         leanEventWarnInfo.setCreateTime(new Date());
 
         // 根据采集点的运行电流,判断是否需要上报告警信息 (辅设备电流小于等于5,上报告警信息)
-        BigDecimal limitVoltage = new BigDecimal("5");
+        QueryWrapper<SystemVariable> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("variable_address", "sys_run_current_limit");
+        queryWrapper.eq("status",  0);
+        SystemVariable systemVariable = systemVariableService.getOne(queryWrapper);
+        if (systemVariable == null){
+            return;
+        }
+        BigDecimal limitCurrent = new BigDecimal(systemVariable.getDefaultValue());
 
-        if (fpgGatherData.getRunCurrent().compareTo(limitVoltage) < 0){
+        if (fpgGatherData.getRunCurrent().compareTo(limitCurrent) < 0){
             // 上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("HOST_OPEN状态下,辅设备电流小于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.HOST_OPEN.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -87,11 +99,18 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
         leanEventWarnInfo.setDevicePointId(fpgGatherData.getDevicePointId());
         leanEventWarnInfo.setCreateTime(new Date());
         // 根据采集点的电流,判断是否需要上报告警信息 (辅设备电流大于5,上报告警信息)
-        BigDecimal limitVoltage = new BigDecimal("5");
-        if (fpgGatherData.getRunCurrent().compareTo(limitVoltage) > 0){
+        QueryWrapper<SystemVariable> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("variable_address", "sys_run_current_limit");
+        queryWrapper.eq("status",  0);
+        SystemVariable systemVariable = systemVariableService.getOne(queryWrapper);
+        if (systemVariable == null){
+            return;
+        }
+        BigDecimal limitCurrent = new BigDecimal(systemVariable.getDefaultValue());
+        if (fpgGatherData.getRunCurrent().compareTo(limitCurrent) > 0){
             // 上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("HOST_CLOSE状态下,辅设备电流大于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.HOST_STOP.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -115,43 +134,51 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
 
         List<PeaksAndValleysTimeConfig> valleysNewPeaksAndValleysTimeConfigList = getPeaksAndValleysTimeConfigByType(peaksAndValleysTimeConfigParam, "valleys", fpgGatherData.getCreateTime());
 
-        BigDecimal limitVoltage = new BigDecimal("5");
+        QueryWrapper<SystemVariable> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("variable_address", "sys_run_current_limit");
+        queryWrapper.eq("status",  0);
+        SystemVariable systemVariable = systemVariableService.getOne(queryWrapper);
+        if (systemVariable == null){
+            return;
+        }
+        BigDecimal limitCurrent = new BigDecimal(systemVariable.getDefaultValue());
+
         // 根据采集到的数据 创建时间,跟峰平谷配置的时间,判断属于哪个时段(尖、峰、平、谷)
         Instant instant = fpgGatherData.getCreateTime().toInstant();
         LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
 
         boolean topsIsExit = topsNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (topsIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) < 0){
+        if (topsIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) < 0){
             // 采集到的数据电流小于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_OPEN状态下,尖时段采集到的数据电流小于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_OPEN.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
         }
         boolean peaksIsExit = peaksNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (peaksIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) < 0){
+        if (peaksIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) < 0){
             // 采集到的数据电流小于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_OPEN状态下,峰时段采集到的数据电流小于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_OPEN.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
         }
         boolean flatIsExit = flatNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (flatIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) < 0){
+        if (flatIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) < 0){
             // 采集到的数据电流小于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_OPEN状态下,平时段采集到的数据电流小于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_OPEN.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
         }
         boolean valleysIsExit = valleysNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (valleysIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) < 0){
+        if (valleysIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) < 0){
             // 采集到的数据电流小于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_OPEN状态下,谷时段采集到的数据电流小于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_OPEN.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -197,42 +224,49 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
         List<PeaksAndValleysTimeConfig> valleysNewPeaksAndValleysTimeConfigList = getPeaksAndValleysTimeConfigByType(peaksAndValleysTimeConfigParam, "valleys", fpgGatherData.getCreateTime());
 
         // 根据采集到的数据 创建时间,跟峰平谷配置的时间,判断属于哪个时段(尖、峰、平、谷)
-        BigDecimal limitVoltage = new BigDecimal("5");
+        QueryWrapper<SystemVariable> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("variable_address", "sys_run_current_limit");
+        queryWrapper.eq("status",  0);
+        SystemVariable systemVariable = systemVariableService.getOne(queryWrapper);
+        if (systemVariable == null){
+            return;
+        }
+        BigDecimal limitCurrent = new BigDecimal(systemVariable.getDefaultValue());
 
         Instant instant = fpgGatherData.getCreateTime().toInstant();
         LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
         boolean topsIsExit = topsNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (topsIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) > 0){
+        if (topsIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) > 0){
             // 采集到的数据电流大于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_CLOSE状态下,采集到的数据电流大于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_CLOSE.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
         }
         boolean peaksIsExit = peaksNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (peaksIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) > 0){
+        if (peaksIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) > 0){
             // 采集到的数据电流大于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_CLOSE状态下,采集到的数据电流大于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_CLOSE.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
         }
         boolean flatIsExit = flatNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (flatIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) > 0){
+        if (flatIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) > 0){
             // 采集到的数据电流大于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_CLOSE状态下,采集到的数据电流大于5A,触发告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_CLOSE.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
         }
         boolean valleysIsExit = valleysNewPeaksAndValleysTimeConfigList.stream().anyMatch(a -> containsCreateTime(localDateTime, a.getStartTime(), a.getEndTime()));
-        if (valleysIsExit && fpgGatherData.getRunCurrent().compareTo(limitVoltage) > 0){
+        if (valleysIsExit && fpgGatherData.getRunCurrent().compareTo(limitCurrent) > 0){
             // 采集到的数据电流大于5A,上报告警信息
             leanEventWarnInfo.setDeviceWarnInfo("FPG_CLOSE状态下,采集到的数据电流大于5A,触发精益事件告警!");
-            leanEventWarnInfo.setWarnType("1");
+            leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_CLOSE.getCode());
             leanEventWarnInfo.setDeviceWarnLevel("0");
             // 更新或者新增逻辑处理
             saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -281,7 +315,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (topsIngTimeSum.intValue() > runTimeLimit){
                 // 尖——累加运行时长超过限制时长,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_ING_TIME,尖运行时长超过限制时长,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_ING_TIME.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -292,7 +326,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (peaksIngTimeSum.intValue() > runTimeLimit){
                 // 峰——累加运行时长超过限制时长,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_ING_TIME,峰运行时长超过限制时长,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_ING_TIME.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -303,7 +337,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (flatIngTimeSum.intValue() > runTimeLimit){
                 // 平——累加运行时长超过限制时长,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_ING_TIME,平运行时长超过限制时长,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_ING_TIME.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -314,7 +348,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (valleysIngTimeSum.intValue() > runTimeLimit){
                 // 谷——累加运行时长超过限制时长,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_ING_TIME,谷运行时长超过限制时长,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_ING_TIME.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -364,7 +398,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (topsPowerLimitSum.intValue() > powerLimit){
                 // 尖——累加累计功率超过功率限制,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_POWER_LIMIT,尖累计功率超过功率限制,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_POWER_LIMIT.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -375,7 +409,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (peaksPowerLimitSum.intValue() > powerLimit){
                 // 峰——累加累计功率超过功率限制,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_POWER_LIMIT,峰累计功率超过功率限制,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_POWER_LIMIT.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -386,7 +420,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (flatPowerLimitSum.intValue() > powerLimit){
                 // 平——累加累计功率超过功率限制,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_POWER_LIMIT,平累计功率超过功率限制,触发告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_POWER_LIMIT.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);
@@ -397,7 +431,7 @@ public class LeanEventWarnInfoServiceImpl extends ServiceImpl<LeanEventWarnInfoM
             if (valleysPowerLimitSum.intValue() > powerLimit){
                 // 谷——累加累计功率超过功率限制,触发告警
                 leanEventWarnInfo.setDeviceWarnInfo("事件类型为FPG_POWER_LIMIT,谷累计功率超过功率限制,触发精益事件告警!");
-                leanEventWarnInfo.setWarnType("1");
+                leanEventWarnInfo.setWarnType(EDeviceInformationType.FPG_POWER_LIMIT.getCode());
                 leanEventWarnInfo.setDeviceWarnLevel("0");
                 // 更新或者新增逻辑处理
                 saveOrUpdateLeanEventWarnInfo(fpgGatherData, leanEventWarnInfo);

+ 81 - 0
jeecg-module-gather/src/main/java/org/jeecg/modules/peaksAndValleysTimeConfig/entity/SystemVariable.java

@@ -0,0 +1,81 @@
+package org.jeecg.modules.peaksAndValleysTimeConfig.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 系统变量表
+ * @Author: jeecg-boot
+ * @Date:   2024-09-11
+ * @Version: V1.0
+ */
+@Data
+@TableName("system_variable")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="system_variable对象", description="系统变量表")
+public class SystemVariable implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**主键*/
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**创建人*/
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**创建日期*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private java.util.Date createTime;
+    /**更新人*/
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**更新日期*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private java.util.Date updateTime;
+    /**所属部门*/
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**变量名称*/
+    @Excel(name = "变量名称", width = 15)
+    @ApiModelProperty(value = "变量名称")
+    private String variableName;
+    /**变量地址*/
+    @Excel(name = "变量地址", width = 15)
+    @ApiModelProperty(value = "变量地址")
+    private String variableAddress;
+    /**数据类型*/
+    @Excel(name = "数据类型", width = 15)
+    @ApiModelProperty(value = "数据类型")
+    @Dict(dicCode = "sysvariable_datatype")
+    private String dataType;
+    /**默认值*/
+    @Excel(name = "默认值", width = 15)
+    @ApiModelProperty(value = "默认值")
+    private String defaultValue;
+    /**描述*/
+    @Excel(name = "描述", width = 15)
+    @ApiModelProperty(value = "描述")
+    private String description;
+    /**状态*/
+    @Excel(name = "状态", width = 15)
+    @ApiModelProperty(value = "状态")
+    @Dict(dicCode = "sysvariable_status")
+    private String status;
+}

+ 15 - 0
jeecg-module-gather/src/main/java/org/jeecg/modules/peaksAndValleysTimeConfig/mapper/SystemVariableMapper.java

@@ -0,0 +1,15 @@
+package org.jeecg.modules.peaksAndValleysTimeConfig.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.peaksAndValleysTimeConfig.entity.SystemVariable;
+
+
+/**
+ * @Description: 系统变量表
+ * @Author: jeecg-boot
+ * @Date:   2024-09-11
+ * @Version: V1.0
+ */
+public interface SystemVariableMapper extends BaseMapper<SystemVariable> {
+
+}

+ 5 - 0
jeecg-module-gather/src/main/java/org/jeecg/modules/peaksAndValleysTimeConfig/mapper/xml/SystemVariableMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.peaksAndValleysTimeConfig.mapper.SystemVariableMapper">
+
+</mapper>

+ 14 - 0
jeecg-module-gather/src/main/java/org/jeecg/modules/peaksAndValleysTimeConfig/service/ISystemVariableService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.peaksAndValleysTimeConfig.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.peaksAndValleysTimeConfig.entity.SystemVariable;
+
+/**
+ * @Description: 系统变量表
+ * @Author: jeecg-boot
+ * @Date:   2024-09-11
+ * @Version: V1.0
+ */
+public interface ISystemVariableService extends IService<SystemVariable> {
+
+}

+ 19 - 0
jeecg-module-gather/src/main/java/org/jeecg/modules/peaksAndValleysTimeConfig/service/impl/SystemVariableServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.peaksAndValleysTimeConfig.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import org.jeecg.modules.peaksAndValleysTimeConfig.entity.SystemVariable;
+import org.jeecg.modules.peaksAndValleysTimeConfig.mapper.SystemVariableMapper;
+import org.jeecg.modules.peaksAndValleysTimeConfig.service.ISystemVariableService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 系统变量表
+ * @Author: jeecg-boot
+ * @Date:   2024-09-11
+ * @Version: V1.0
+ */
+@Service
+public class SystemVariableServiceImpl extends ServiceImpl<SystemVariableMapper, SystemVariable> implements ISystemVariableService {
+
+}