Commit 24068f46 authored by duanruiming's avatar duanruiming

态势检测-信号机状态优化

parent 0d1db110
......@@ -20,7 +20,7 @@ import java.util.Objects;
@RequestMapping("/controlCommand")
@RestController
@SuppressWarnings("all")
public class SignalServiceController {
public class SignalCommandController {
@Autowired
private UtcFeignClients utcFeignClients;
......
......@@ -44,7 +44,7 @@ public class CommonEventWarnTask {
@Autowired
private TDeviceStatusMapper tDeviceStatusMapper;
@Scheduled(fixedRate = 60 * 1000)
@Scheduled(fixedRate = 1 * 60 * 1000)
public void pushEvenWarnData() {
try {
ConcurrentHashMap<String, CommonEventWarnWebSocketServer> evenWarnWebSocketMap = CommonEventWarnWebSocketServer.getEvenWarnWebSocketMap();
......
......@@ -38,7 +38,8 @@ public class SignalStatusTask {
return;
}
List<Map<String, Object>> content = (List<Map<String, Object>>) jsonViewObject.getContent();
Map<String, Object> result = content.get(0);
content.forEach(map -> {
Map<String, Object> result = map;
String signalId = (String) result.get("signalId");
Integer currentSignalStatus = result.get("status") == null ? 0 : (Integer) result.get("status");
Integer currentFaultType = result.get("faultType") == null ? 0 : (Integer) result.get("faultType");
......@@ -54,6 +55,7 @@ public class SignalStatusTask {
tDeviceStatusMapper.updateById(tDeviceStatusInfo);
}
}
});
} catch (Exception e) {
log.error("定时任务同步信号机设备状态远程utcService调用异常", e);
}
......
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