Commit cf4096e3 authored by duanruiming's avatar duanruiming

[update] 信号机告警名称

parent 0e26dcd5
......@@ -97,6 +97,7 @@ public class CommonEventWarnTask {
String crossId = (String) result.get("crossId");
Integer currentFaultType = (Integer) result.get("faultType");
String coordinate = "";
String crossName = "";
int faultTypeDB = 0;
if (StringUtils.isNotEmpty(crossId)) {
CrossInfoPO tBaseCrossInfo = situationDetectionService.selectCrossInfoById(crossId);
......@@ -107,14 +108,15 @@ public class CommonEventWarnTask {
TDeviceStatusInfo tDeviceStatusInfo = tDeviceStatusMapper.selectOne(queryWrapper.eq("code", crossId));
if (Objects.nonNull(tDeviceStatusInfo)) {
faultTypeDB = tDeviceStatusInfo.getFaultType();
crossName = tDeviceStatusInfo.getName();
}
}
if (Objects.nonNull(currentFaultType) && currentFaultType != faultTypeDB) {
CommonEventAlarmOutVo commonEventAlarmOutVo = new CommonEventAlarmOutVo();
commonEventAlarmOutVo.setEventType(3);
commonEventAlarmOutVo.setEventId(signalId);
commonEventAlarmOutVo.setEventName("信号机告警");
commonEventAlarmOutVo.setEventDesc("信号机告警");
commonEventAlarmOutVo.setEventName(crossName);
commonEventAlarmOutVo.setEventDesc(crossName.concat("信号机告警"));
commonEventAlarmOutVo.setStatus(String.valueOf(currentFaultType));
commonEventAlarmOutVo.setStartTime(formatNow);
commonEventAlarmOutVo.setCoordinate(coordinate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment