1、优化告警处理
This commit is contained in:
parent
2282fdcde3
commit
164e4f3174
@ -49,9 +49,6 @@ public class GnssStatusJoin {
|
|||||||
@ExcelProperty("湿度")
|
@ExcelProperty("湿度")
|
||||||
Float humidity;
|
Float humidity;
|
||||||
|
|
||||||
@ExcelProperty("可见卫星")
|
|
||||||
Integer satelliteinview;
|
|
||||||
|
|
||||||
@ExcelProperty("使用卫星")
|
@ExcelProperty("使用卫星")
|
||||||
Integer satelliteinuse;
|
Integer satelliteinuse;
|
||||||
// 这里的收发都是服务端统计的,终端收发详细统计在msg_trx表里
|
// 这里的收发都是服务端统计的,终端收发详细统计在msg_trx表里
|
||||||
@ -83,4 +80,6 @@ public class GnssStatusJoin {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
Integer group_id;
|
Integer group_id;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
String name;//设备名称
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public interface GnssStatusMapper extends MPJBaseMapper<GnssStatus> {
|
|||||||
@Update({"update gnssstatus set state=0,warning=#{warning},warningcode=#{warningcode} where deviceid=#{deviceid}"})
|
@Update({"update gnssstatus set state=0,warning=#{warning},warningcode=#{warningcode} where deviceid=#{deviceid}"})
|
||||||
int setOfflineByDeviceId(GnssStatusJoin status);
|
int setOfflineByDeviceId(GnssStatusJoin status);
|
||||||
|
|
||||||
@Select({"select s.*, d.devicetype, d.group_id from gnssstatus s ,gnssdevices d where s.deviceid=d.deviceid and s.state <> 0"})
|
@Select({"select s.*, d.devicetype, d.group_id, d.name from gnssstatus s ,gnssdevices d where s.deviceid=d.deviceid and s.state <> 0"})
|
||||||
List<GnssStatusJoin> queryOnline();
|
List<GnssStatusJoin> queryOnline();
|
||||||
|
|
||||||
// 需要关联设备类型
|
// 需要关联设备类型
|
||||||
|
|||||||
@ -75,7 +75,6 @@ public class DeviceStatusVO {
|
|||||||
this.rxbytes = gnssStatus.getRxbytes();
|
this.rxbytes = gnssStatus.getRxbytes();
|
||||||
this.d3xxbytes = gnssStatus.getD3xxbytes();
|
this.d3xxbytes = gnssStatus.getD3xxbytes();
|
||||||
this.b562bytes = gnssStatus.getB562bytes();
|
this.b562bytes = gnssStatus.getB562bytes();
|
||||||
this.satelliteinview = gnssStatus.getSatelliteinview();
|
|
||||||
this.satelliteinuse = gnssStatus.getSatelliteinuse();
|
this.satelliteinuse = gnssStatus.getSatelliteinuse();
|
||||||
this.dtuState = gnssStatus.getState();
|
this.dtuState = gnssStatus.getState();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ public class DeviceStatusChecker {
|
|||||||
GnssDeviceMapper deviceMapper;
|
GnssDeviceMapper deviceMapper;
|
||||||
static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
@Scheduled(cron = "0 18,48 * * * ?") // 每半时执行一次
|
@Scheduled(cron = "0 18,59 * * * ?") // 每半时执行一次
|
||||||
public void checkDeviceState() throws ExecutionException, InterruptedException {
|
public void checkDeviceState() throws ExecutionException, InterruptedException {
|
||||||
List<GnssGroup> groupCfgs = groupMapper.selectList(null);
|
List<GnssGroup> groupCfgs = groupMapper.selectList(null);
|
||||||
HashMap<Integer,Integer> group_cycle_map=new HashMap<>();
|
HashMap<Integer,Integer> group_cycle_map=new HashMap<>();
|
||||||
@ -86,7 +86,7 @@ public class DeviceStatusChecker {
|
|||||||
warningMsg.setCode(WarningCfg.TYPE_DEVICE_OFF_LINE);
|
warningMsg.setCode(WarningCfg.TYPE_DEVICE_OFF_LINE);
|
||||||
warningMsgMapper.insert(warningMsg);
|
warningMsgMapper.insert(warningMsg);
|
||||||
//短信推送
|
//短信推送
|
||||||
deviceIds.add(status.getDeviceid());
|
deviceIds.add(status.getDeviceid()+"("+status.getName()+")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(deviceIds.size()>0){
|
if(deviceIds.size()>0){
|
||||||
@ -132,7 +132,7 @@ public class DeviceStatusChecker {
|
|||||||
|
|
||||||
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()+"("+bs.getName()+")");
|
||||||
}
|
}
|
||||||
gnssStatusMapper.updateById(status);
|
gnssStatusMapper.updateById(status);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user