Commit cf4096e3 authored by duanruiming's avatar duanruiming

[update] 信号机告警名称

parent 0e26dcd5
...@@ -97,6 +97,7 @@ public class CommonEventWarnTask { ...@@ -97,6 +97,7 @@ public class CommonEventWarnTask {
String crossId = (String) result.get("crossId"); String crossId = (String) result.get("crossId");
Integer currentFaultType = (Integer) result.get("faultType"); Integer currentFaultType = (Integer) result.get("faultType");
String coordinate = ""; String coordinate = "";
String crossName = "";
int faultTypeDB = 0; int faultTypeDB = 0;
if (StringUtils.isNotEmpty(crossId)) { if (StringUtils.isNotEmpty(crossId)) {
CrossInfoPO tBaseCrossInfo = situationDetectionService.selectCrossInfoById(crossId); CrossInfoPO tBaseCrossInfo = situationDetectionService.selectCrossInfoById(crossId);
...@@ -107,14 +108,15 @@ public class CommonEventWarnTask { ...@@ -107,14 +108,15 @@ public class CommonEventWarnTask {
TDeviceStatusInfo tDeviceStatusInfo = tDeviceStatusMapper.selectOne(queryWrapper.eq("code", crossId)); TDeviceStatusInfo tDeviceStatusInfo = tDeviceStatusMapper.selectOne(queryWrapper.eq("code", crossId));
if (Objects.nonNull(tDeviceStatusInfo)) { if (Objects.nonNull(tDeviceStatusInfo)) {
faultTypeDB = tDeviceStatusInfo.getFaultType(); faultTypeDB = tDeviceStatusInfo.getFaultType();
crossName = tDeviceStatusInfo.getName();
} }
} }
if (Objects.nonNull(currentFaultType) && currentFaultType != faultTypeDB) { if (Objects.nonNull(currentFaultType) && currentFaultType != faultTypeDB) {
CommonEventAlarmOutVo commonEventAlarmOutVo = new CommonEventAlarmOutVo(); CommonEventAlarmOutVo commonEventAlarmOutVo = new CommonEventAlarmOutVo();
commonEventAlarmOutVo.setEventType(3); commonEventAlarmOutVo.setEventType(3);
commonEventAlarmOutVo.setEventId(signalId); commonEventAlarmOutVo.setEventId(signalId);
commonEventAlarmOutVo.setEventName("信号机告警"); commonEventAlarmOutVo.setEventName(crossName);
commonEventAlarmOutVo.setEventDesc("信号机告警"); commonEventAlarmOutVo.setEventDesc(crossName.concat("信号机告警"));
commonEventAlarmOutVo.setStatus(String.valueOf(currentFaultType)); commonEventAlarmOutVo.setStatus(String.valueOf(currentFaultType));
commonEventAlarmOutVo.setStartTime(formatNow); commonEventAlarmOutVo.setStartTime(formatNow);
commonEventAlarmOutVo.setCoordinate(coordinate); 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