diff --git a/readme.txt b/readme.txt index 65786d47..77c78864 100644 --- a/readme.txt +++ b/readme.txt @@ -35,4 +35,10 @@ beidou-exapi 9908(外) 3)幅度压缩:压缩值=上个周期平滑值+(单位周期解算值-上个周期平滑值)*幅度压缩系数,平滑值=滤波窗口内avg(压缩值) 4)初值作为参考点的有效时长,缺省为1个周期。从初始值更新时间开始算起 -小树林算法:1b+2b+3高程0.1+4的48小时 \ No newline at end of file +小树林算法:1b+2b+3高程0.1+4的48小时 + +2024-11 +告警: +1)离线:设备记录最后一次收到任何数据的时间。定时任务检查设备最后一次时间,如果与当前时间差距大于门限,则判断为离线;D3F0/D3F2清除离线告警 +2)连续无效解:每次解算完,如果是无效解,则无效解次数加1;否则清0;如果等于N,则产生一次告警。 +3)连续无固定解:每个周期结束,如果是有效解解,则记录当前时间;D3F2检测当前时间和最近一次有效解时间差距,如果大于N,则产生一次告警。 \ No newline at end of file diff --git a/sec-api/src/main/java/com/imdroid/secapi/dto/WarningCfg.java b/sec-api/src/main/java/com/imdroid/secapi/dto/WarningCfg.java index 684b1a3a..2b4970fb 100644 --- a/sec-api/src/main/java/com/imdroid/secapi/dto/WarningCfg.java +++ b/sec-api/src/main/java/com/imdroid/secapi/dto/WarningCfg.java @@ -38,8 +38,8 @@ public class WarningCfg { public static final String TYPE_NAME_LESS_B562 = "固定解少"; public static final int TYPE_NO_FIXED_RESULT = 0x100; public static final String TYPE_NAME_NO_FIXED_RESULT = "连续无固定解"; - //public static final int TYPE_BS_NO_RESULT = 0x200; - //public static final String TYPE_NAME_BS_NO_RESULT = "基站下的测站均无解"; + public static final int TYPE_CONT_INVALID_RESULT = 0x200; + public static final String TYPE_NAME_CONT_INVALID_RESULT = "长时间无有效解"; public static final int TYPE_INCLINE = 0x400; public static final String TYPE_NAME_INCLINE = "异常倾斜"; @@ -66,7 +66,7 @@ public class WarningCfg { if((code & TYPE_LESS_D3XX) !=0) warningInfo.add(TYPE_NAME_LESS_D3XX); if((code & TYPE_LESS_B562) !=0) warningInfo.add(TYPE_NAME_LESS_B562); if((code & TYPE_NO_FIXED_RESULT) !=0) warningInfo.add(TYPE_NAME_NO_FIXED_RESULT); - //if((code & TYPE_BS_NO_RESULT) !=0) warningInfo.add(TYPE_NAME_BS_NO_RESULT); + if((code & TYPE_CONT_INVALID_RESULT) !=0) warningInfo.add(TYPE_NAME_CONT_INVALID_RESULT); if((code & TYPE_INCLINE) !=0) warningInfo.add(TYPE_NAME_INCLINE); return warningInfo; } diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/SingleLineGNSSCalcService.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/SingleLineGNSSCalcService.java index 49e81bcf..b1388a08 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/SingleLineGNSSCalcService.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/SingleLineGNSSCalcService.java @@ -203,8 +203,6 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService { future = ThreadManager.getScheduledThreadPool().schedule(() -> { try { calCycleResult(device, groupCalc,date); - // 清除统计 - device.clearStat(); } catch (Exception e) { logger.error(e.toString()); } @@ -283,6 +281,13 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService { } } + //更新有效解时间 + if(locationRecord.getEnabled()){ + if(device.getLastValidCalcDataTime()==null || device.getLastValidCalcDataTime().isBefore(resultTime)){ + device.setLastValidCalcDataTime(resultTime); + } + } + // 记录本次位置,作为下次的参考 if(focusCalculator.getVer()==6) { if(locationRecord.getRpose()!=null) { diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D331RtcmMessageExecutor.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D331RtcmMessageExecutor.java index af6bcb5f..6240d092 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D331RtcmMessageExecutor.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D331RtcmMessageExecutor.java @@ -40,18 +40,11 @@ public class D331RtcmMessageExecutor implements Executor public Void execute(D331RtcmMessage message) { String id = message.getId(); // 补齐tenantId - Device device1 = deviceService.findByDeviceId(id); - if(device1 == null || device1.getOpMode() == GnssDevice.OP_MODE_UNUSE) return null; - - // 原始码流输出到日志文件 -- INFO 级别 - // 只有测站开了日志记录,或者消息来自基站,才将原码记录到日志文件 - if(device1.getLoggingmode() == GnssDevice.LOGGING_MODE_FULL || device1.getDeviceType() == GnssDevice.TYPE_REFERENCE_STATION){ - logger.info("receive {} d331 message: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData())); - logger.info("receive d331 rtcm message of device: {}, seq:{}, len:{}", message.getId(), message.getSeq(), message.getLen()); - } + Device deviceBs = deviceService.findByDeviceId(id); + if(deviceBs == null || deviceBs.getOpMode() == GnssDevice.OP_MODE_UNUSE) return null; // 推送基站数据 - if(device1.getOpMode() == GnssDevice.OP_MODE_USE) { + if(deviceBs.getOpMode() == GnssDevice.OP_MODE_USE) { byte[] forwardBytes = message.getSrcData(); // 要求快速转发,因此用缓存,不要每次都查数据库 List deviceList = deviceService.findByParentId(id); @@ -74,26 +67,31 @@ public class D331RtcmMessageExecutor implements Executor } // 如果30分钟内收到不到d3f0和d3f2,则根据UDP最后一个报文触发状态更新和统计 - LocalDateTime now = LocalDateTime.now(); - if(device1.getLastRxTime()!=null && - device1.getLastRxTime().isBefore(now.minusMinutes(1))){ - if(device1.getLastD3f0f2Time() == null || - device1.getLastD3f0f2Time().isBefore(now.minusMinutes(30))) { + if(deviceBs.getD3xxbytes()>0){ + LocalDateTime now = LocalDateTime.now(); + if(deviceBs.getLastRxTime().isBefore(now.minusMinutes(1)) && + (deviceBs.getLastD3f2Time() == null || + deviceBs.getLastD3f2Time().isBefore(now.minusMinutes(30)))) { // new cycle - logger.info("device {} rx {} d331 in a cycle while not d3f0f2",device1.getDeviceId(),device1.getD3xxCount()); + logger.info("device {} rx {} d331 in a cycle while not d3f0f2",deviceBs.getDeviceId(),deviceBs.getD3xxCount()); Device lastCycleDevice = new Device(); - lastCycleDevice.setDeviceId(device1.getDeviceId()); - lastCycleDevice.setTenantId(device1.getTenantId()); - lastCycleDevice.setD3xxbytes(device1.getD3xxbytes()); - lastCycleDevice.setD3xxCount(device1.getD3xxCount()); - lastCycleDevice.setLastRxTime(device1.getLastRxTime()); - lastCycleDevice.setSatelitesInUse(device1.getSatelitesInUse()); - device1.clearStat(); + lastCycleDevice.setDeviceId(deviceBs.getDeviceId()); + lastCycleDevice.setDeviceType(deviceBs.getDeviceType()); + lastCycleDevice.setTenantId(deviceBs.getTenantId()); + lastCycleDevice.setD341bytes(deviceBs.getD341bytes()); + lastCycleDevice.setD341Count(deviceBs.getD341Count()); + lastCycleDevice.setFixedNum(deviceBs.getFixedNum()); + lastCycleDevice.setFloatNum(deviceBs.getFloatNum()); + lastCycleDevice.setNoFixedAndFloatResult(deviceBs.getNoFixedAndFloatResult()); + lastCycleDevice.setLastRxTime(deviceBs.getLastRxTime()); + lastCycleDevice.setLastValidCalcDataTime(deviceBs.getLastValidCalcDataTime()); + lastCycleDevice.setSatelitesInUse(deviceBs.getSatelitesInUse()); + deviceBs.clearStat(); ThreadManager.getFixedThreadPool().submit(() -> { // 通知上线 try { - beidouClient.onDeviceActive(device1.getDeviceId(), device1.getTenantId()); + beidouClient.onDeviceActive(deviceBs.getDeviceId(), deviceBs.getTenantId()); } catch (Exception e) { logger.error(e.toString()); } @@ -103,18 +101,26 @@ public class D331RtcmMessageExecutor implements Executor } // update trx - device1.updateRx(message.getHeader(),message.getLen(),message.getPacketNum()); + deviceBs.updateRx(message.getHeader(),message.getLen(),message.getPacketNum()); // update gga Gga gga = message.getGga(); if(gga != null) { - device1.updateSatelitesNum(gga.getSatellitesInUsed()); + deviceBs.updateSatelitesNum(gga.getSatellitesInUsed()); //if(gga.isFixed()) { //基站的quality不会是4 - device1.setLatitude(gga.getLatitude()); - device1.setLongitude(gga.getLongitude()); - device1.setAltitude(gga.getAltitude()); + deviceBs.setLatitude(gga.getLatitude()); + deviceBs.setLongitude(gga.getLongitude()); + deviceBs.setAltitude(gga.getAltitude()); //} } + ThreadManager.getFixedThreadPool().submit(() -> { + // 原始码流输出到日志文件 -- INFO 级别 + // 只有测站开了日志记录,或者消息来自基站,才将原码记录到日志文件 + if(deviceBs.getLoggingmode() == GnssDevice.LOGGING_MODE_FULL){ + logger.info("receive {} d331 message: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData())); + } + }); + return null; } diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D341LocationMessageExecutor.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D341LocationMessageExecutor.java index e60c0488..013a5944 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D341LocationMessageExecutor.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D341LocationMessageExecutor.java @@ -37,32 +37,28 @@ public class D341LocationMessageExecutor implements Executor0) { + LocalDateTime now = LocalDateTime.now(); + if (device.getLastRxTime().isBefore(now.minusMinutes(1)) && + (device.getLastD3f2Time() == null || + device.getLastD3f2Time().isBefore(now.minusMinutes(30)))) { // new cycle Device lastCycleDevice = new Device(); lastCycleDevice.setDeviceId(device.getDeviceId()); + lastCycleDevice.setDeviceType(device.getDeviceType()); lastCycleDevice.setTenantId(device.getTenantId()); lastCycleDevice.setD341bytes(device.getD341bytes()); lastCycleDevice.setD341Count(device.getD341Count()); lastCycleDevice.setFixedNum(device.getFixedNum()); lastCycleDevice.setFloatNum(device.getFloatNum()); + lastCycleDevice.setNoFixedAndFloatResult(device.getNoFixedAndFloatResult()); lastCycleDevice.setLastRxTime(device.getLastRxTime()); + lastCycleDevice.setLastValidCalcDataTime(device.getLastValidCalcDataTime()); lastCycleDevice.setSatelitesInUse(device.getSatelitesInUse()); device.clearStat(); ThreadManager.getFixedThreadPool().submit(() -> { @@ -78,6 +74,7 @@ public class D341LocationMessageExecutor implements Executor { gnssCalcService.calcSingle(message,true); + // 原始码流输出到日志文件 -- INFO 级别 + if(device.getLoggingmode() == GnssDevice.LOGGING_MODE_FULL){ + logger.info("receive {} d341 message: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData())); + } + else { + Gga gga1 = message.getGga(); + if (gga1 != null && !gga1.isFixed()) { + // 若不是固定解,则打印原始码流到日志里 + logger.info("receive {} d341 message: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData())); + } + } }); return null; diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D3F0SelfCheckMessageExecutor.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D3F0SelfCheckMessageExecutor.java index 35de5f6b..53e84877 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D3F0SelfCheckMessageExecutor.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D3F0SelfCheckMessageExecutor.java @@ -25,6 +25,10 @@ import java.time.LocalDateTime; /** * @author Layton * @date 2023/2/2 20:40 + * 1、回ACK,以便终端判断是否连接上服务器后台 + * 2、同步参数 + * 3、判断是否发冷启动指令 + * 4、保存状态信息,判断是否有低电压等告警,清除离线告警 */ @Component public class D3F0SelfCheckMessageExecutor implements Executor { @@ -49,30 +53,31 @@ public class D3F0SelfCheckMessageExecutor implements Executor { + // 检查是否需要对设备的F9P进行冷启动操作 + checkAndSendF9PColdStartCommand(device); + // 通知beidou服务设备上线,这里会触发参数同步 GnssStatus lastGnssStatus = dataPersistService.getDeviceState(message.getId()); try { if (lastGnssStatus != null && lastGnssStatus.getState() == GnssStatus.STATE_OFFLINE) { beidouClient.onLine(lastGnssStatus.getDeviceid(), lastGnssStatus.getTenantid(), lastGnssStatus.getUpdatetime()); } else { - // 通知beidou服务设备上线 beidouClient.onDeviceActive(message.getId(), device.getTenantId()); } } catch (Exception e){ } + //保存状态信息,判断是否有低电压等告警,清除离线告警 dataPersistService.saveDeviceState(message); }); @@ -84,7 +89,7 @@ public class D3F0SelfCheckMessageExecutor implements Executor= 6){ @@ -93,14 +98,15 @@ public class D3F0SelfCheckMessageExecutor implements Executor= 6){ - sendF9PColdStartCommand(device); - logger.debug("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult()); + //sendF9PColdStartCommand(device); + logger.info("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult()); device.clearNoResultStat(); } } @@ -122,7 +128,7 @@ public class D3F0SelfCheckMessageExecutor implements Executor { @@ -40,23 +42,21 @@ public class D3F2StopIndicationMessageExecutor implements Executor { + // 开始周期解算 LocalDateTime uploadTime = multiLineGNSSCalcService.checkUploadTime( device.getDeviceId(), device.getTenantId()); + gnssCalcService.calSingleDone(device, null, message.getCreateTime()); + + // 保存统计,判断是否有连续无固定解、连续无有效解等告警,清除离线告警 dataPersistService.saveDeviceTrxStat(message, (uploadTime!=null), device); // 保存缓存中的 GNSS 单次解析结果 @@ -87,15 +91,8 @@ public class D3F2StopIndicationMessageExecutor implements Executor0) noFixedAndFloatResult++; else noFixedAndFloatResult = 0; d3xxCount = 0; diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/DataPersistServiceImpl.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/DataPersistServiceImpl.java index b93b90b6..79eaa307 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/DataPersistServiceImpl.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/DataPersistServiceImpl.java @@ -130,6 +130,16 @@ public class DataPersistServiceImpl implements DataPersistService { deviceState.setAltitude(device.getAltitude()); deviceState.setState(isUploading?GnssStatus.STATE_UPLOADING:GnssStatus.STATE_IDLE); deviceStateRepository.updateById(deviceState); + + warningService.checkDeviceStatus(null, deviceState); + + // 检查GNSS质量 + if(device.getDeviceType() == Device.DEVICE_BASE_STATION){ + warningService.checkD3xxNum(device); + } + else{ + warningService.checkB562Num(device); + } } } catch (Exception e) { e.printStackTrace(); diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/WarningServiceImpl.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/WarningServiceImpl.java index a41b2522..b3c0c998 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/WarningServiceImpl.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/WarningServiceImpl.java @@ -2,6 +2,7 @@ package com.imdroid.sideslope.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.imdroid.common.util.NumberUtils; +import com.imdroid.common.util.WarningLogExecutor; import com.imdroid.secapi.dto.*; import com.imdroid.sideslope.sal.Device; import org.springframework.beans.factory.annotation.Autowired; @@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; +import java.time.Duration; import java.time.LocalDateTime; import java.util.List; import java.util.Map; @@ -23,6 +25,8 @@ public class WarningServiceImpl implements WarningService { @Autowired GnssStatusMapper gnssStatusMapper; + @Value("${warning.log.directory}") + private String logDirectory; // warning type <-> level & value Map cfgMap = new ConcurrentHashMap<>(); @@ -64,13 +68,41 @@ public class WarningServiceImpl implements WarningService { isUpdated=true; } - //清除连续无b562 - if(0 != device.getFixedNum()){ - if ((status.getWarningcode() & WarningCfg.TYPE_NO_FIXED_RESULT) != 0) { + //连续无固定解 + if ((status.getWarningcode() & WarningCfg.TYPE_NO_FIXED_RESULT) != 0) { + if(0 != device.getFixedNum()) { status.setWarningcode(status.getWarningcode() & ~WarningCfg.TYPE_NO_FIXED_RESULT); isUpdated = true; } } + else{ + if(check(status, WarningCfg.TYPE_NO_FIXED_RESULT, + WarningCfg.TYPE_NAME_NO_FIXED_RESULT,false, + (int) device.getNoFixedAndFloatResult(),null, + "连续无固定解:"+device.getNoFixedAndFloatResult())){ + isUpdated=true; + } + } + + //连续无有效解 + if ((status.getWarningcode() & WarningCfg.TYPE_CONT_INVALID_RESULT) != 0) { + int[] warningValues = cfgMap.get(WarningCfg.TYPE_CONT_INVALID_RESULT); + if(warningValues!=null && device.getLastValidCalcDataTime()!=null){ + if(LocalDateTime.now().isBefore(device.getLastValidCalcDataTime().plusHours(warningValues[1]))){ + status.setWarningcode(status.getWarningcode() & ~WarningCfg.TYPE_CONT_INVALID_RESULT); + isUpdated = true; + } + } + } + else{ + if(device.getLastValidCalcDataTime()!=null && + check(status, WarningCfg.TYPE_CONT_INVALID_RESULT, + WarningCfg.TYPE_NAME_CONT_INVALID_RESULT,false, + (int) Duration.between(device.getLastValidCalcDataTime(), LocalDateTime.now()).toHours(),null, + "长时间无有效解:"+device.getLastValidCalcDataTime())){ + isUpdated=true; + } + } if(isUpdated){ // 根据告警码确定告警级别 @@ -176,6 +208,9 @@ public class WarningServiceImpl implements WarningService { warningMsgMapper.insert(warningMsg); //告警级别 curStatus.setWarningcode(curStatus.getWarningcode() | warningType); + + // 新告警出现后,生成对应设备的 warning 日志文件 + //generate_warning_logs(curStatus.getDeviceid(),warningType,auxInfo); } isUpdated = true; } @@ -222,4 +257,11 @@ public class WarningServiceImpl implements WarningService { } } + public void generate_warning_logs(String device_id,int warning_type,String warning_type_name){ + if (warning_type == WarningCfg.TYPE_LOW_VOLTAGE) { + WarningLogExecutor warningLogExecutor = new WarningLogExecutor(logDirectory); + warningLogExecutor.generateWarningLogs(device_id, warning_type_name); + } + + } } diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java index 8b646bd4..7b11d71f 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java @@ -61,7 +61,7 @@ public class IndexController extends BasicController{ if(status.getState() == GnssStatus.STATE_OFFLINE) { deviceOfflineNum++; } - else if((status.getWarningcode()&WarningCfg.TYPE_NO_FIXED_RESULT) != 0) { + else if((status.getWarningcode()&WarningCfg.TYPE_CONT_INVALID_RESULT) != 0) { noFix++; } @@ -127,8 +127,7 @@ public class IndexController extends BasicController{ queryWrapper.eq("state",GnssStatus.STATE_OFFLINE); } else if(query.equals("nofixed")){ - queryWrapper.ge("warningcode",256); - queryWrapper.le("warningcode",512); + queryWrapper.eq("warningcode&"+WarningCfg.TYPE_CONT_INVALID_RESULT,WarningCfg.TYPE_CONT_INVALID_RESULT); } else if(query.equals("warning1")){ queryWrapper.eq("warning",WarningCfg.LEVEL_1); diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java index 12dd6fcb..bc9a36b8 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java @@ -38,7 +38,7 @@ public class WarningController extends BasicController implements CommonExcelSer @PostConstruct public static void init() { warningMap.put(WarningCfg.TYPE_DEVICE_OFF_LINE, WarningCfg.TYPE_NAME_DEVICE_OFF_LINE); - //warningMap.put(WarningCfg.TYPE_BS_NO_RESULT, WarningCfg.TYPE_NAME_BS_NO_RESULT); + warningMap.put(WarningCfg.TYPE_CONT_INVALID_RESULT, WarningCfg.TYPE_NAME_CONT_INVALID_RESULT); warningMap.put(WarningCfg.TYPE_NO_FIXED_RESULT, WarningCfg.TYPE_NAME_NO_FIXED_RESULT); warningMap.put(WarningCfg.TYPE_LESS_INUSE_SAT, WarningCfg.TYPE_NAME_LESS_INUSE_SAT); warningMap.put(WarningCfg.TYPE_LESS_D3XX, WarningCfg.TYPE_NAME_LESS_D3XX); diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/task/DeviceStatusChecker.java b/sec-beidou/src/main/java/com/imdroid/beidou/task/DeviceStatusChecker.java index 16669a7c..f7d3dbeb 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/task/DeviceStatusChecker.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/task/DeviceStatusChecker.java @@ -1,7 +1,5 @@ package com.imdroid.beidou.task; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.github.yulichang.query.MPJQueryWrapper; import com.imdroid.beidou.service.NotificationService; import com.imdroid.secapi.dto.*; import lombok.extern.slf4j.Slf4j; @@ -99,8 +97,8 @@ public class DeviceStatusChecker { now.format(formatter), WarningCfg.LEVEL_2); } } - - @Scheduled(cron = "0 28 * * * ?") // 每小时执行一次 +/* + @Scheduled(cron = "0 27 * * * ?") // 每小时执行一次 void checkRoverStationCalcData() throws ExecutionException, InterruptedException { // 获取无固定解告警配置 QueryWrapper warningCfgQueryWrapper = new QueryWrapper<>(); @@ -109,7 +107,7 @@ public class DeviceStatusChecker { WarningCfg warningCfg = warningCfgMapper.selectOne(warningCfgQueryWrapper); if(warningCfg == null) return; - // 获取所有n个小时内无固定解的测站 + // 获取所有warningCfg.getValue()个小时内无固定解的测站 LocalDateTime now = LocalDateTime.now(); LocalDateTime beginTime = now.minusHours(warningCfg.getValue()); QueryWrapper calcDataQueryWrapper = new QueryWrapper<>(); @@ -169,5 +167,5 @@ public class DeviceStatusChecker { WarningCfg.LEVEL_2); } } - +*/ } \ No newline at end of file diff --git a/sec-beidou/src/main/resources/templates/page/device_overview.html b/sec-beidou/src/main/resources/templates/page/device_overview.html index 6592a7a7..c2ad2c1b 100644 --- a/sec-beidou/src/main/resources/templates/page/device_overview.html +++ b/sec-beidou/src/main/resources/templates/page/device_overview.html @@ -78,7 +78,7 @@
0
- + 2020