Commit 68f747c0 authored by duanruiming's avatar duanruiming

[update] 信号机离线上线

parent 358971d8
......@@ -38,7 +38,7 @@ public class SignalStatusTask {
private final TDeviceStatusLogMapper tDeviceStatusLogMapper;
private final CrossInfoMapper crossInfoMapper;
@Scheduled(fixedRate = 1 * 60 * 1000)
@Scheduled(fixedRate = 1 * 30 * 1000)
@Transactional
public void syncSignalStatus() {
try {
......@@ -66,6 +66,7 @@ public class SignalStatusTask {
}
Integer currentSignalStatus = signalStatusVO.getStatus() == null ? 0 : signalStatusVO.getStatus();
Integer currentFaultType = signalStatusVO.getFaultType() == null ? 0 : signalStatusVO.getFaultType();
// 信号机在线,但是故障,数据库状态为2
if (currentSignalStatus == 1 && !Objects.equals(0, currentFaultType)) {
currentSignalStatus = 2;
}
......
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