演示调整
This commit is contained in:
parent
6fba8a134b
commit
96d74e7163
@ -23,8 +23,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
//@ConditionalOnProperty(name = "mock-alert-test", havingValue = "true")
|
@ConditionalOnProperty(name = "load-mock-history-data", havingValue = "true")
|
||||||
//@Component
|
@Component
|
||||||
@Order(1)
|
@Order(1)
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class MockLoadData implements ApplicationRunner {
|
public class MockLoadData implements ApplicationRunner {
|
||||||
|
@ -180,6 +180,8 @@ public class AlertMockService {
|
|||||||
return this.alertInfoService.createAlert(dto.getAlertType(), AlertDeviceType.DEVICE_TYPE_SWITCH, turnout.getCommon().getId(), switchs, dto.getAll(), AlertDeviceType.DEVICE_TYPE_SWITCH, true);
|
return this.alertInfoService.createAlert(dto.getAlertType(), AlertDeviceType.DEVICE_TYPE_SWITCH, turnout.getCommon().getId(), switchs, dto.getAll(), AlertDeviceType.DEVICE_TYPE_SWITCH, true);
|
||||||
}
|
}
|
||||||
case AXLE_LED_RED, AXLE_LED_ORANGE -> {
|
case AXLE_LED_RED, AXLE_LED_ORANGE -> {
|
||||||
|
|
||||||
|
// Optional<AreaConfigVO> alertInfoMostOptional = this.alertInfoService.findAreaDevice(AlertType.BLUE_DISPLAY, AlertDeviceType.DEVICE_TYPE_RTU, station.getCommon().getId(), lineId);
|
||||||
MessageOrBuilder msg = LineGraphicDataRepository.getDeviceByCode(lineId, dto.getFrist());
|
MessageOrBuilder msg = LineGraphicDataRepository.getDeviceByCode(lineId, dto.getFrist());
|
||||||
Track.Builder track = Track.newBuilder();
|
Track.Builder track = Track.newBuilder();
|
||||||
track.setId(dto.getFrist());
|
track.setId(dto.getFrist());
|
||||||
@ -193,7 +195,9 @@ public class AlertMockService {
|
|||||||
track.setId(dto.getFrist());
|
track.setId(dto.getFrist());
|
||||||
track.setLineId(dto.getLineId());
|
track.setLineId(dto.getLineId());
|
||||||
track.setTimestamp(System.currentTimeMillis() / 1000);
|
track.setTimestamp(System.currentTimeMillis() / 1000);
|
||||||
return this.alertInfoService.createAlert(dto.getAlertType(), AlertDeviceType.DEVICE_TYPE_TRACK, dto.getFrist(), track, dto.getAll(), AlertDeviceType.DEVICE_TYPE_TRACK, true);
|
MessageOrBuilder msg = LineGraphicDataRepository.getDeviceByCode(lineId, dto.getFrist());
|
||||||
|
CommonInfo commonInfo = DeviceStatusDataOperate.findFieldVal(msg, "common", CommonInfo.class);
|
||||||
|
return this.alertInfoService.createAlert(dto.getAlertType(), AlertDeviceType.DEVICE_TYPE_TRACK, commonInfo.getId(), track, dto.getAll(), AlertDeviceType.DEVICE_TYPE_TRACK, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
case TRAIN_EB_ATP -> {
|
case TRAIN_EB_ATP -> {
|
||||||
|
@ -17,4 +17,7 @@ occ:
|
|||||||
unRealPort: 123
|
unRealPort: 123
|
||||||
lineId: 3
|
lineId: 3
|
||||||
collectorData: false
|
collectorData: false
|
||||||
mock-alert-test: true
|
#故障测试
|
||||||
|
mock-alert-test: true
|
||||||
|
#加载历史模拟数据
|
||||||
|
load-mock-history-data: false
|
@ -22,4 +22,5 @@ occ:
|
|||||||
unRealPort: 5703
|
unRealPort: 5703
|
||||||
lineId: 3
|
lineId: 3
|
||||||
collectorData: false
|
collectorData: false
|
||||||
mock-alert-test: false
|
mock-alert-test: false
|
||||||
|
load-mock-history-data: false
|
@ -22,4 +22,5 @@ occ:
|
|||||||
unRealPort: 5703
|
unRealPort: 5703
|
||||||
lineId: 3
|
lineId: 3
|
||||||
collectorData: false
|
collectorData: false
|
||||||
mock-alert-test: false
|
mock-alert-test: false
|
||||||
|
load-mock-history-data: false
|
Loading…
Reference in New Issue
Block a user