代码调整
This commit is contained in:
parent
1a560db6e9
commit
05da62da72
@ -52,6 +52,9 @@ public class OccTcpClientConnection {
|
|||||||
* 是否是实时数据连接
|
* 是否是实时数据连接
|
||||||
*/
|
*/
|
||||||
private boolean realDataConn;
|
private boolean realDataConn;
|
||||||
|
/**
|
||||||
|
* 发送请求基础数据
|
||||||
|
*/
|
||||||
private AtomicBoolean requestBaseData = new AtomicBoolean(false);
|
private AtomicBoolean requestBaseData = new AtomicBoolean(false);
|
||||||
|
|
||||||
public void write(MessageData messageData) {
|
public void write(MessageData messageData) {
|
||||||
@ -98,7 +101,7 @@ public class OccTcpClientConnection {
|
|||||||
this.connected = true;
|
this.connected = true;
|
||||||
InUsedScheduleData scheduleData = DeviceDataRepository.findDataSouce(String.valueOf(this.client.getLineId()), DataTypeEnum.TRAIN_PLAN);
|
InUsedScheduleData scheduleData = DeviceDataRepository.findDataSouce(String.valueOf(this.client.getLineId()), DataTypeEnum.TRAIN_PLAN);
|
||||||
if (Objects.equals(false, this.realDataConn) && requestBaseData.compareAndSet(false, true) && scheduleData.isEmpty()) {
|
if (Objects.equals(false, this.realDataConn) && requestBaseData.compareAndSet(false, true) && scheduleData.isEmpty()) {
|
||||||
log.info("发送计划运行图请求 lingId[{}]", this.client.getLineId());
|
log.info("发送计划运行图请求 lineId[{}] host[{}] 端口[{}]", this.client.getLineId(), this.host, this.port);
|
||||||
LoadHistoryTGDataRequest dataRequest = new LoadHistoryTGDataRequest((short) this.client.getLineId(), LocalDateTime.now(), ApplyTypeEnum.PLAN_GRAPH);
|
LoadHistoryTGDataRequest dataRequest = new LoadHistoryTGDataRequest((short) this.client.getLineId(), LocalDateTime.now(), ApplyTypeEnum.PLAN_GRAPH);
|
||||||
this.write(dataRequest);
|
this.write(dataRequest);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public class SwitchLostAlertMonitoringTask implements AlertMonitoringTask {
|
|||||||
|
|
||||||
private final AlertManager alertManager = AlertManager.getDefault();
|
private final AlertManager alertManager = AlertManager.getDefault();
|
||||||
|
|
||||||
Map<String, Switch.Builder> deviceMap = new ConcurrentHashMap<>();
|
private final Map<String, Switch.Builder> deviceMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
public void putSwitchIfNotExist(Switch.Builder switchBuilder) {
|
public void putSwitchIfNotExist(Switch.Builder switchBuilder) {
|
||||||
if (!deviceMap.containsKey(switchBuilder.getId())) {
|
if (!deviceMap.containsKey(switchBuilder.getId())) {
|
||||||
|
@ -35,7 +35,7 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
|||||||
|
|
||||||
private final AlertManager alertManager = AlertManager.getDefault();
|
private final AlertManager alertManager = AlertManager.getDefault();
|
||||||
|
|
||||||
private Map<String, TrainInfo.Builder> trainInfoMap = new ConcurrentHashMap<>();
|
private final Map<String, TrainInfo.Builder> trainInfoMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
public void putTrainInfoMonitor(TrainInfo.Builder train) {
|
public void putTrainInfoMonitor(TrainInfo.Builder train) {
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d82140370ef78529ad745356e41bad635a333457
|
Subproject commit da3fb50a050cb48ae2f90c082178ffaba6634967
|
Loading…
Reference in New Issue
Block a user