1、告警优化,增加长期无有效解告警

2、固定解统计优化
This commit is contained in:
weidong 2024-11-27 15:53:29 +08:00
parent 58c8865027
commit dbe8a3146a
14 changed files with 109 additions and 56 deletions

View File

@ -36,3 +36,9 @@ beidou-exapi 9908(外)
4初值作为参考点的有效时长缺省为1个周期。从初始值更新时间开始算起 4初值作为参考点的有效时长缺省为1个周期。从初始值更新时间开始算起
小树林算法1b+2b+3高程0.1+4的48小时 小树林算法1b+2b+3高程0.1+4的48小时
2024-11
告警:
1离线设备记录最后一次收到任何数据的时间。定时任务检查设备最后一次时间如果与当前时间差距大于门限则判断为离线D3F0/D3F2清除离线告警
2连续无效解每次解算完如果是无效解则无效解次数加1否则清0如果等于N则产生一次告警。
3连续无固定解每个周期结束如果是有效解解则记录当前时间D3F2检测当前时间和最近一次有效解时间差距如果大于N则产生一次告警。

View File

@ -38,8 +38,8 @@ public class WarningCfg {
public static final String TYPE_NAME_LESS_B562 = "固定解少"; public static final String TYPE_NAME_LESS_B562 = "固定解少";
public static final int TYPE_NO_FIXED_RESULT = 0x100; public static final int TYPE_NO_FIXED_RESULT = 0x100;
public static final String TYPE_NAME_NO_FIXED_RESULT = "连续无固定解"; public static final String TYPE_NAME_NO_FIXED_RESULT = "连续无固定解";
//public static final int TYPE_BS_NO_RESULT = 0x200; public static final int TYPE_CONT_INVALID_RESULT = 0x200;
//public static final String TYPE_NAME_BS_NO_RESULT = "基站下的测站均无"; public static final String TYPE_NAME_CONT_INVALID_RESULT = "长时间无有效";
public static final int TYPE_INCLINE = 0x400; public static final int TYPE_INCLINE = 0x400;
public static final String TYPE_NAME_INCLINE = "异常倾斜"; 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_D3XX) !=0) warningInfo.add(TYPE_NAME_LESS_D3XX);
if((code & TYPE_LESS_B562) !=0) warningInfo.add(TYPE_NAME_LESS_B562); 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_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); if((code & TYPE_INCLINE) !=0) warningInfo.add(TYPE_NAME_INCLINE);
return warningInfo; return warningInfo;
} }

View File

@ -70,17 +70,22 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
if(deviceBs.getD3xxbytes()>0){ if(deviceBs.getD3xxbytes()>0){
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
if(deviceBs.getLastRxTime().isBefore(now.minusMinutes(1)) && if(deviceBs.getLastRxTime().isBefore(now.minusMinutes(1)) &&
(deviceBs.getLastD3f0f2Time() == null || (deviceBs.getLastD3f2Time() == null ||
deviceBs.getLastD3f0f2Time().isBefore(now.minusMinutes(30)))) { deviceBs.getLastD3f2Time().isBefore(now.minusMinutes(30)))) {
// new cycle // new cycle
logger.info("device {} rx {} d331 in a cycle while not d3f0f2",deviceBs.getDeviceId(),deviceBs.getD3xxCount()); logger.info("device {} rx {} d331 in a cycle while not d3f0f2",deviceBs.getDeviceId(),deviceBs.getD3xxCount());
Device lastCycleDevice = new Device(); Device lastCycleDevice = new Device();
lastCycleDevice.setDeviceId(deviceBs.getDeviceId()); lastCycleDevice.setDeviceId(deviceBs.getDeviceId());
lastCycleDevice.setDeviceType(deviceBs.getDeviceType());
lastCycleDevice.setTenantId(deviceBs.getTenantId()); lastCycleDevice.setTenantId(deviceBs.getTenantId());
lastCycleDevice.setD3xxbytes(deviceBs.getD3xxbytes()); lastCycleDevice.setD341bytes(deviceBs.getD341bytes());
lastCycleDevice.setD3xxCount(deviceBs.getD3xxCount()); lastCycleDevice.setD341Count(deviceBs.getD341Count());
lastCycleDevice.setFixedNum(deviceBs.getFixedNum());
lastCycleDevice.setFloatNum(deviceBs.getFloatNum());
lastCycleDevice.setNoFixedAndFloatResult(deviceBs.getNoFixedAndFloatResult());
lastCycleDevice.setLastRxTime(deviceBs.getLastRxTime()); lastCycleDevice.setLastRxTime(deviceBs.getLastRxTime());
lastCycleDevice.setLastValidCalcDataTime(deviceBs.getLastValidCalcDataTime());
lastCycleDevice.setSatelitesInUse(deviceBs.getSatelitesInUse()); lastCycleDevice.setSatelitesInUse(deviceBs.getSatelitesInUse());
deviceBs.clearStat(); deviceBs.clearStat();
ThreadManager.getFixedThreadPool().submit(() -> { ThreadManager.getFixedThreadPool().submit(() -> {

View File

@ -44,18 +44,21 @@ public class D341LocationMessageExecutor implements Executor<D341LocationMessage
// 如果没有收到d3f2,这里判断是否是一个新的周期上一次收到D341的时间大于两分钟且上次收到d3f2的时间大于30分钟 // 如果没有收到d3f2,这里判断是否是一个新的周期上一次收到D341的时间大于两分钟且上次收到d3f2的时间大于30分钟
if(device.getD341Count()>0) { if(device.getD341Count()>0) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
if (device.getLastRxTime().isBefore(now.minusMinutes(2)) && if (device.getLastRxTime().isBefore(now.minusMinutes(1)) &&
(device.getLastD3f0f2Time() == null || (device.getLastD3f2Time() == null ||
device.getLastD3f0f2Time().isBefore(now.minusMinutes(30)))) { device.getLastD3f2Time().isBefore(now.minusMinutes(30)))) {
// new cycle // new cycle
Device lastCycleDevice = new Device(); Device lastCycleDevice = new Device();
lastCycleDevice.setDeviceId(device.getDeviceId()); lastCycleDevice.setDeviceId(device.getDeviceId());
lastCycleDevice.setDeviceType(device.getDeviceType());
lastCycleDevice.setTenantId(device.getTenantId()); lastCycleDevice.setTenantId(device.getTenantId());
lastCycleDevice.setD341bytes(device.getD341bytes()); lastCycleDevice.setD341bytes(device.getD341bytes());
lastCycleDevice.setD341Count(device.getD341Count()); lastCycleDevice.setD341Count(device.getD341Count());
lastCycleDevice.setFixedNum(device.getFixedNum()); lastCycleDevice.setFixedNum(device.getFixedNum());
lastCycleDevice.setFloatNum(device.getFloatNum()); lastCycleDevice.setFloatNum(device.getFloatNum());
lastCycleDevice.setNoFixedAndFloatResult(device.getNoFixedAndFloatResult());
lastCycleDevice.setLastRxTime(device.getLastRxTime()); lastCycleDevice.setLastRxTime(device.getLastRxTime());
lastCycleDevice.setLastValidCalcDataTime(device.getLastValidCalcDataTime());
lastCycleDevice.setSatelitesInUse(device.getSatelitesInUse()); lastCycleDevice.setSatelitesInUse(device.getSatelitesInUse());
device.clearStat(); device.clearStat();
ThreadManager.getFixedThreadPool().submit(() -> { ThreadManager.getFixedThreadPool().submit(() -> {

View File

@ -25,6 +25,10 @@ import java.time.LocalDateTime;
/** /**
* @author Layton * @author Layton
* @date 2023/2/2 20:40 * @date 2023/2/2 20:40
* 1回ACK以便终端判断是否连接上服务器后台
* 2同步参数
* 3判断是否发冷启动指令
* 4保存状态信息判断是否有低电压等告警清除离线告警
*/ */
@Component @Component
public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessage, Void> { public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessage, Void> {
@ -49,30 +53,31 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
Device device = deviceService.findByDeviceId(message.getId()); Device device = deviceService.findByDeviceId(message.getId());
if(device == null) return null; if(device == null) return null;
// 补齐tenantId
message.setTenantId(device.getTenantId());
//应答 //应答
sendD3F1Ack(device); sendD3F1Ack(device);
//更新统计
// 检查是否需要对设备的F9P进行冷启动操作
checkAndSendF9PColdStartCommand(device);
// 补齐tenantId
message.setTenantId(device.getTenantId());
device.updateRx(message.getHeader(),message.getLen(),1); device.updateRx(message.getHeader(),message.getLen(),1);
ThreadManager.getFixedThreadPool().submit(() -> { ThreadManager.getFixedThreadPool().submit(() -> {
// 检查是否需要对设备的F9P进行冷启动操作
checkAndSendF9PColdStartCommand(device);
// 通知beidou服务设备上线这里会触发参数同步
GnssStatus lastGnssStatus = dataPersistService.getDeviceState(message.getId()); GnssStatus lastGnssStatus = dataPersistService.getDeviceState(message.getId());
try { try {
if (lastGnssStatus != null && lastGnssStatus.getState() == GnssStatus.STATE_OFFLINE) { if (lastGnssStatus != null && lastGnssStatus.getState() == GnssStatus.STATE_OFFLINE) {
beidouClient.onLine(lastGnssStatus.getDeviceid(), beidouClient.onLine(lastGnssStatus.getDeviceid(),
lastGnssStatus.getTenantid(), lastGnssStatus.getUpdatetime()); lastGnssStatus.getTenantid(), lastGnssStatus.getUpdatetime());
} else { } else {
// 通知beidou服务设备上线
beidouClient.onDeviceActive(message.getId(), device.getTenantId()); beidouClient.onDeviceActive(message.getId(), device.getTenantId());
} }
} }
catch (Exception e){ catch (Exception e){
} }
//保存状态信息判断是否有低电压等告警清除离线告警
dataPersistService.saveDeviceState(message); dataPersistService.saveDeviceState(message);
}); });
@ -101,7 +106,7 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
// 连续6个周期无解则发送 F9P 冷启动指令 // 连续6个周期无解则发送 F9P 冷启动指令
if(device.getNoFixedAndFloatResult() >= 6){ if(device.getNoFixedAndFloatResult() >= 6){
//sendF9PColdStartCommand(device); //sendF9PColdStartCommand(device);
logger.info("{}: 类型{}, 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getDeviceType(),device.getNoFixedAndFloatResult()); logger.info("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult());
device.clearNoResultStat(); device.clearNoResultStat();
} }
} }

View File

@ -11,7 +11,6 @@ import com.imdroid.sideslope.sal.Device;
import com.imdroid.sideslope.sal.DeviceService; import com.imdroid.sideslope.sal.DeviceService;
import com.imdroid.sideslope.service.DataPersistService; import com.imdroid.sideslope.service.DataPersistService;
import com.imdroid.sideslope.service.GnssSingleBufferServiceImpl; import com.imdroid.sideslope.service.GnssSingleBufferServiceImpl;
import com.imdroid.sideslope.service.WarningService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -24,6 +23,9 @@ import java.time.LocalDateTime;
* 停止指示消息处理器 * 停止指示消息处理器
* *
* @author LiGang * @author LiGang
* 1更新统计
* 2启动单周期固定解处理
* 3保存统计信息判断是否有连续无固定解连续无有效解等告警清除离线告警
*/ */
@Component @Component
public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndicationMessage, Void> { public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndicationMessage, Void> {
@ -40,23 +42,21 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
private GNSSDataCalcService gnssCalcService; private GNSSDataCalcService gnssCalcService;
@Autowired @Autowired
MultiLineGNSSCalcService multiLineGNSSCalcService; MultiLineGNSSCalcService multiLineGNSSCalcService;
@Autowired
WarningService warningService;
@Autowired @Autowired
GnssSingleBufferServiceImpl gnssSingleBufferService; GnssSingleBufferServiceImpl gnssSingleBufferService;
@Override @Override
public Void execute(D3F2StopIndicationMessage message) { public Void execute(D3F2StopIndicationMessage message) {
logger.info("receive d3f2 message of {} device: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData())); logger.info("receive d3f2 message of {} device: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData()));
// 补齐tenantId // 补齐tenantId
String deviceId = message.getId(); String deviceId = message.getId();
Device device = deviceService.findByDeviceId(deviceId); Device device = deviceService.findByDeviceId(deviceId);
if(device == null) return null; if(device == null) return null;
device.updateRx(message.getHeader(), message.getLen(),1);
message.setTenantId(device.getTenantId()); message.setTenantId(device.getTenantId());
//更新统计
device.updateRx(message.getHeader(), message.getLen(),1);
GnssTrxMsg gnssTrxMsg = message.getTrxMsg(); GnssTrxMsg gnssTrxMsg = message.getTrxMsg();
gnssTrxMsg.setTenantid(device.getTenantId()); gnssTrxMsg.setTenantid(device.getTenantId());
gnssTrxMsg.setD3xxbytes(device.getD3xxbytes()); gnssTrxMsg.setD3xxbytes(device.getD3xxbytes());
@ -72,15 +72,7 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
device.getDeviceId(), device.getTenantId()); device.getDeviceId(), device.getTenantId());
gnssCalcService.calSingleDone(device, null, message.getCreateTime()); gnssCalcService.calSingleDone(device, null, message.getCreateTime());
// 检查告警 // 保存统计判断是否有连续无固定解连续无有效解等告警清除离线告警
if(device.getDeviceType() == Device.DEVICE_BASE_STATION) {
warningService.checkD3xxNum(device);
}
else{
warningService.checkB562Num(device);
}
// 保存统计
dataPersistService.saveDeviceTrxStat(message, (uploadTime!=null), device); dataPersistService.saveDeviceTrxStat(message, (uploadTime!=null), device);
// 保存缓存中的 GNSS 单次解析结果 // 保存缓存中的 GNSS 单次解析结果

View File

@ -63,7 +63,7 @@ public class Device {
Double iPosd; Double iPosd;
LocalDateTime lastRxTime; LocalDateTime lastRxTime;
LocalDateTime lastD3f0f2Time; LocalDateTime lastD3f2Time;
short noFixedAndFloatResult=0; short noFixedAndFloatResult=0;
// 日志记录控制 // 日志记录控制
@ -77,22 +77,24 @@ public class Device {
public void updateRx(int head, int bytes,int count){ public void updateRx(int head, int bytes,int count){
lastRxHead = head; lastRxHead = head;
lastRxTime = LocalDateTime.now();
switch (head){ switch (head){
case 0xd3f0: case 0xd3f0:
lastD3f0f2Time = LocalDateTime.now(); //lastD3f0f2Time = LocalDateTime.now();
clearStat(); //clearStat();
break; break;
case 0xd3f2: case 0xd3f2:
lastD3f0f2Time = LocalDateTime.now(); lastD3f2Time = LocalDateTime.now();
break; break;
case 0xd331: case 0xd331:
d3xxCount+=count; d3xxCount+=count;
d3xxbytes += bytes; d3xxbytes += bytes;
lastRxTime = LocalDateTime.now();
break; break;
case 0xd341: case 0xd341:
d341Count+=count; d341Count+=count;
d341bytes += bytes; d341bytes += bytes;
lastRxTime = LocalDateTime.now();
break; break;
case 0xd342: case 0xd342:
d342Count ++; d342Count ++;

View File

@ -130,6 +130,16 @@ public class DataPersistServiceImpl implements DataPersistService {
deviceState.setAltitude(device.getAltitude()); deviceState.setAltitude(device.getAltitude());
deviceState.setState(isUploading?GnssStatus.STATE_UPLOADING:GnssStatus.STATE_IDLE); deviceState.setState(isUploading?GnssStatus.STATE_UPLOADING:GnssStatus.STATE_IDLE);
deviceStateRepository.updateById(deviceState); 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) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -59,7 +60,7 @@ public class WarningServiceImpl implements WarningService {
isUpdated = true; isUpdated = true;
} }
// b562 // 无固定解
if(check(status, WarningCfg.TYPE_LESS_B562, if(check(status, WarningCfg.TYPE_LESS_B562,
WarningCfg.TYPE_NAME_LESS_B562,true, WarningCfg.TYPE_NAME_LESS_B562,true,
device.getFixedNum(),null, device.getFixedNum(),null,
@ -67,13 +68,41 @@ public class WarningServiceImpl implements WarningService {
isUpdated=true; 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); status.setWarningcode(status.getWarningcode() & ~WarningCfg.TYPE_NO_FIXED_RESULT);
isUpdated = true; 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){ if(isUpdated){
// 根据告警码确定告警级别 // 根据告警码确定告警级别

View File

@ -61,7 +61,7 @@ public class IndexController extends BasicController{
if(status.getState() == GnssStatus.STATE_OFFLINE) { if(status.getState() == GnssStatus.STATE_OFFLINE) {
deviceOfflineNum++; deviceOfflineNum++;
} }
else if((status.getWarningcode()&WarningCfg.TYPE_NO_FIXED_RESULT) != 0) { else if((status.getWarningcode()&WarningCfg.TYPE_CONT_INVALID_RESULT) != 0) {
noFix++; noFix++;
} }
@ -127,8 +127,7 @@ public class IndexController extends BasicController{
queryWrapper.eq("state",GnssStatus.STATE_OFFLINE); queryWrapper.eq("state",GnssStatus.STATE_OFFLINE);
} }
else if(query.equals("nofixed")){ else if(query.equals("nofixed")){
queryWrapper.ge("warningcode",256); queryWrapper.eq("warningcode&"+WarningCfg.TYPE_CONT_INVALID_RESULT,WarningCfg.TYPE_CONT_INVALID_RESULT);
queryWrapper.le("warningcode",512);
} }
else if(query.equals("warning1")){ else if(query.equals("warning1")){
queryWrapper.eq("warning",WarningCfg.LEVEL_1); queryWrapper.eq("warning",WarningCfg.LEVEL_1);

View File

@ -38,7 +38,7 @@ public class WarningController extends BasicController implements CommonExcelSer
@PostConstruct @PostConstruct
public static void init() { public static void init() {
warningMap.put(WarningCfg.TYPE_DEVICE_OFF_LINE, WarningCfg.TYPE_NAME_DEVICE_OFF_LINE); 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_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_INUSE_SAT, WarningCfg.TYPE_NAME_LESS_INUSE_SAT);
warningMap.put(WarningCfg.TYPE_LESS_D3XX, WarningCfg.TYPE_NAME_LESS_D3XX); warningMap.put(WarningCfg.TYPE_LESS_D3XX, WarningCfg.TYPE_NAME_LESS_D3XX);

View File

@ -1,9 +1,6 @@
package com.imdroid.beidou.task; 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.beidou.service.NotificationService;
import com.imdroid.common.util.WarningLogExecutor;
import com.imdroid.secapi.dto.*; import com.imdroid.secapi.dto.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -103,7 +100,7 @@ public class DeviceStatusChecker {
now.format(formatter), WarningCfg.LEVEL_2); now.format(formatter), WarningCfg.LEVEL_2);
} }
} }
/*
@Scheduled(cron = "0 27 * * * ?") // 每小时执行一次 @Scheduled(cron = "0 27 * * * ?") // 每小时执行一次
void checkRoverStationCalcData() throws ExecutionException, InterruptedException { void checkRoverStationCalcData() throws ExecutionException, InterruptedException {
// 获取无固定解告警配置 // 获取无固定解告警配置
@ -178,5 +175,5 @@ public class DeviceStatusChecker {
WarningCfg.LEVEL_2); WarningCfg.LEVEL_2);
} }
} }
*/
} }

View File

@ -78,7 +78,7 @@
</div> </div>
<div class="layui-col-xs3 layui-col-md4"> <div class="layui-col-xs3 layui-col-md4">
<a href="#" onclick="queryDevices('offline')" style="color: #bd3004" th:text="'掉线数 '+${deviceOfflineNum}">0</a><br> <a href="#" onclick="queryDevices('offline')" style="color: #bd3004" th:text="'掉线数 '+${deviceOfflineNum}">0</a><br>
<div th:if="${noFix>0}"><a href="#" onclick="queryDevices('nofixed')" style="color: #bd3004" th:text="'长期无解 '+${noFix}">0</a><br></div> <div th:if="${noFix>0}"><a href="#" onclick="queryDevices('nofixed')" style="color: #bd3004" th:text="'长期无解 '+${noFix}">0</a><br></div>
<a style="color: #000000" th:text="'装机量 '+${deviceDeployedNum}">2020</a> <a style="color: #000000" th:text="'装机量 '+${deviceDeployedNum}">2020</a>
</div> </div>
</div> </div>

View File

@ -67,13 +67,13 @@ public class BeidouDevice {
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2412254_0424_4xx.log"); executeAsD342("C:\\Users\\wd\\Desktop\\log\\2412254_0424_4xx.log");
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2412254_0424_5xx.log"); executeAsD342("C:\\Users\\wd\\Desktop\\log\\2412254_0424_5xx.log");
*/ */
execute("C:\\Users\\wd\\Desktop\\log\\2345076_0424_5xx.log"); //execute("C:\\Users\\wd\\Desktop\\log\\2345076_0424_5xx.log");
//executeAsD342("C:\\Users\\wd\\Desktop\\log\\b562_2412270_1xx.log"); //executeAsD342("C:\\Users\\wd\\Desktop\\log\\b562_2412270_1xx.log");
//executeAsD342("C:\\Users\\wd\\Desktop\\log\\b562_2412270_2xx.log"); //executeAsD342("C:\\Users\\wd\\Desktop\\log\\b562_2412270_2xx.log");
/* executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_1.log"); //execute("C:\\Users\\wd\\Desktop\\log\\2345076_0424_1.log");
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_2.log"); execute("C:\\Users\\wd\\Desktop\\log\\2345076_0424_2.log");
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_1xx.log"); /*executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_1xx.log");
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_2xx.log"); executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_2xx.log");
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_3xx.log"); executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_3xx.log");
executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_4xx.log"); executeAsD342("C:\\Users\\wd\\Desktop\\log\\2345076_0424_4xx.log");
@ -120,7 +120,12 @@ public class BeidouDevice {
cycleCount++; cycleCount++;
} }
if(arrs[2].startsWith("d3f2")){
b562Count = b562Count;
}
else{
udpClient.sendData(ByteUtil.hexStringTobyte(arrs[2])); udpClient.sendData(ByteUtil.hexStringTobyte(arrs[2]));
}
b562Count++; b562Count++;
lastTime = time.getTime(); lastTime = time.getTime();
Thread.sleep(100); Thread.sleep(100);