1、优化告警处理
This commit is contained in:
parent
06fe707939
commit
2282fdcde3
@ -109,15 +109,6 @@ public class DeviceStatusChecker {
|
|||||||
if(status != null && status.getState()!=GnssStatus.STATE_OFFLINE) {
|
if(status != null && status.getState()!=GnssStatus.STATE_OFFLINE) {
|
||||||
int warningCode = 0;
|
int warningCode = 0;
|
||||||
if(!isRoverStationNormal(bs.getDeviceid())){
|
if(!isRoverStationNormal(bs.getDeviceid())){
|
||||||
WarningMsg warningMsg = new WarningMsg();
|
|
||||||
warningMsg.setDeviceid(bs.getDeviceid());
|
|
||||||
warningMsg.setTenantid(bs.getTenantid());
|
|
||||||
warningMsg.setCreatetime(LocalDateTime.now());
|
|
||||||
warningMsg.setDevicetype(WarningCfg.TYPE_GNSS);
|
|
||||||
warningMsg.setCode(WarningCfg.TYPE_BS_NO_RESULT);
|
|
||||||
warningMsg.setLevel(WarningCfg.LEVEL_2);
|
|
||||||
warningMsg.setInfo(WarningCfg.TYPE_NAME_BS_NO_RESULT);
|
|
||||||
warningMsgMapper.insert(warningMsg);
|
|
||||||
warningCode = WarningCfg.TYPE_BS_NO_RESULT;
|
warningCode = WarningCfg.TYPE_BS_NO_RESULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +120,16 @@ public class DeviceStatusChecker {
|
|||||||
status.setWarning(WarningCfg.LEVEL_0);
|
status.setWarning(WarningCfg.LEVEL_0);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
WarningMsg warningMsg = new WarningMsg();
|
||||||
|
warningMsg.setDeviceid(bs.getDeviceid());
|
||||||
|
warningMsg.setTenantid(bs.getTenantid());
|
||||||
|
warningMsg.setCreatetime(LocalDateTime.now());
|
||||||
|
warningMsg.setDevicetype(WarningCfg.TYPE_GNSS);
|
||||||
|
warningMsg.setCode(WarningCfg.TYPE_BS_NO_RESULT);
|
||||||
|
warningMsg.setLevel(WarningCfg.LEVEL_2);
|
||||||
|
warningMsg.setInfo(WarningCfg.TYPE_NAME_BS_NO_RESULT);
|
||||||
|
warningMsgMapper.insert(warningMsg);
|
||||||
|
|
||||||
status.setWarningcode(status.getWarningcode() | WarningCfg.TYPE_BS_NO_RESULT);
|
status.setWarningcode(status.getWarningcode() | WarningCfg.TYPE_BS_NO_RESULT);
|
||||||
status.setWarning(WarningCfg.LEVEL_2);
|
status.setWarning(WarningCfg.LEVEL_2);
|
||||||
deviceIds.add(bs.getDeviceid());
|
deviceIds.add(bs.getDeviceid());
|
||||||
@ -150,7 +151,6 @@ public class DeviceStatusChecker {
|
|||||||
|
|
||||||
/***
|
/***
|
||||||
* 检查基站下的测站最近一个小时是否全都无固定解
|
* 检查基站下的测站最近一个小时是否全都无固定解
|
||||||
* @param parentId
|
|
||||||
*/
|
*/
|
||||||
boolean isRoverStationNormal(String parentId){
|
boolean isRoverStationNormal(String parentId){
|
||||||
//是否有关联测站
|
//是否有关联测站
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user