站台门调整,添加请求计划运行图,列车atp切除调整
This commit is contained in:
parent
eadaa81df9
commit
1a560db6e9
@ -1,5 +1,10 @@
|
||||
package club.joylink.xiannccda.ats.message;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository;
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository.DataTypeEnum;
|
||||
import club.joylink.xiannccda.ats.message.collect.datasource.InUsedScheduleData;
|
||||
import club.joylink.xiannccda.ats.message.line3.req.LoadHistoryTGDataRequest;
|
||||
import club.joylink.xiannccda.ats.message.line3.req.LoadHistoryTGDataRequest.ApplyTypeEnum;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
@ -7,10 +12,13 @@ import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.nio.NioSocketChannel;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ -35,18 +43,23 @@ public class OccTcpClientConnection {
|
||||
* 心跳超时重连处理器
|
||||
*/
|
||||
HeartBeatTimeoutHandler timeoutHandler;
|
||||
// HeartBeatSender heartBeatSender;
|
||||
/**
|
||||
* 最后一次收到消息时间
|
||||
*/
|
||||
volatile long lastReceiveMessageTime;
|
||||
|
||||
/**
|
||||
* 是否是实时数据连接
|
||||
*/
|
||||
private boolean realDataConn;
|
||||
private AtomicBoolean requestBaseData = new AtomicBoolean(false);
|
||||
|
||||
public void write(MessageData messageData) {
|
||||
this.channel.writeAndFlush(List.of(messageData));
|
||||
}
|
||||
|
||||
public OccTcpClientConnection(XianOccMessagingClient client, String host, int port, boolean collectorData) {
|
||||
|
||||
public OccTcpClientConnection(XianOccMessagingClient client, String host, int port, boolean collectorData, boolean isReal) {
|
||||
this.realDataConn = isReal;
|
||||
this.client = client;
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
@ -63,9 +76,8 @@ public class OccTcpClientConnection {
|
||||
ch.pipeline().addLast(new OccMessageHandler(self, collectorData));
|
||||
}
|
||||
});
|
||||
// this.connect();
|
||||
this.timeoutHandler = new HeartBeatTimeoutHandler(this);
|
||||
// this.heartBeatSender = new HeartBeatSender(this);
|
||||
|
||||
}
|
||||
|
||||
void reconnect() {
|
||||
@ -83,8 +95,13 @@ public class OccTcpClientConnection {
|
||||
log.info("连接到OCC服务: {}", this.hostPortInfo());
|
||||
this.lastReceiveMessageTime = System.currentTimeMillis();
|
||||
this.channel = channelFuture.channel();
|
||||
|
||||
this.connected = true;
|
||||
InUsedScheduleData scheduleData = DeviceDataRepository.findDataSouce(String.valueOf(this.client.getLineId()), DataTypeEnum.TRAIN_PLAN);
|
||||
if (Objects.equals(false, this.realDataConn) && requestBaseData.compareAndSet(false, true) && scheduleData.isEmpty()) {
|
||||
log.info("发送计划运行图请求 lingId[{}]", this.client.getLineId());
|
||||
LoadHistoryTGDataRequest dataRequest = new LoadHistoryTGDataRequest((short) this.client.getLineId(), LocalDateTime.now(), ApplyTypeEnum.PLAN_GRAPH);
|
||||
this.write(dataRequest);
|
||||
}
|
||||
}
|
||||
});
|
||||
channelFuture.channel().closeFuture().addListener(listener -> {
|
||||
|
@ -11,6 +11,7 @@ public class XianOccMessagingClient {
|
||||
/**
|
||||
* 线路号 实时信息的侦听端口号为2600+line_id,非实时信息的侦听端口号为2700+line_id。 (如对于地铁1号线来说,实时信息的侦听端口号为2601,非实时信息的侦听端口号为2701)
|
||||
*/
|
||||
@Getter
|
||||
final int lineId;
|
||||
final String host;
|
||||
|
||||
@ -39,8 +40,8 @@ public class XianOccMessagingClient {
|
||||
this.lineId = lineId;
|
||||
|
||||
// 创建实时和非实时消息连接
|
||||
this.rtConnection = new OccTcpClientConnection(this, host, realPort, collectorData);
|
||||
this.nrtConnection = new OccTcpClientConnection(this, host, unRealPort, false);
|
||||
this.rtConnection = new OccTcpClientConnection(this, host, realPort, collectorData, true);
|
||||
this.nrtConnection = new OccTcpClientConnection(this, host, unRealPort, false, false);
|
||||
}
|
||||
|
||||
public ConnectionInfo getRTClientConnectionInfo() {
|
||||
|
@ -7,6 +7,13 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Table;
|
||||
import com.google.common.collect.Tables;
|
||||
import com.google.protobuf.GeneratedMessageV3.Builder;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.nio.Buffer;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
@ -26,6 +33,11 @@ public class InUsedScheduleData extends AbstractData {
|
||||
*/
|
||||
private final static Table<String, String, List<Plan.Builder>> trainSchedule = Tables.synchronizedTable(HashBasedTable.create());
|
||||
|
||||
public boolean isEmpty() {
|
||||
return trainSchedule.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addDevice(List<Builder> dataList) {
|
||||
for (Builder builder : dataList) {
|
||||
@ -45,11 +57,18 @@ public class InUsedScheduleData extends AbstractData {
|
||||
if (CollectionUtils.isEmpty(plans)) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return plans.stream().filter(d -> d.getStationId() == stationId && d.getUpWay() == upDownWay).findAny();
|
||||
|
||||
Optional<Plan.Builder> optional = plans.stream().filter(d -> d.getStationId() == stationId && Objects.equals(d.getUpWay(), upDownWay)).findAny();
|
||||
/* if (optional.isEmpty()) {
|
||||
System.out.println("aaaaaaaaaaaaa");
|
||||
}*/
|
||||
return optional;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
trainSchedule.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -103,7 +103,9 @@ public class InusedScheduleResponse extends MessageResponse {
|
||||
planBuild.setPlatformId(record.platformId);
|
||||
planBuild.setATime(DateTimeUtil.epochSecond(record.aTime));
|
||||
planBuild.setDTime(DateTimeUtil.epochSecond(record.dTime));
|
||||
|
||||
planBuild.setUpWay(record.upDir);
|
||||
planBuild.setFlag(record.getFlag());
|
||||
planBuild.setTimestamp(this.getTime());
|
||||
planBuild.setReceiveTime(System.currentTimeMillis());
|
||||
if (planBuild.getDTime() > planBuild.getATime()) {
|
||||
@ -201,10 +203,11 @@ public class InusedScheduleResponse extends MessageResponse {
|
||||
record.dTime = DateTimeUtil.convert(buf);
|
||||
record.flag = buf.readShort();
|
||||
record.LocalSubId = buf.readInt();
|
||||
int bitPosition = 6;
|
||||
short shiftedValue = (short) (this.flag >> bitPosition);
|
||||
short sixthBit = (short) (shiftedValue & 1);
|
||||
this.upDir = sixthBit == 0;
|
||||
|
||||
// int bitPosition = 5;
|
||||
// short shiftedValue = (short) (record.flag >> bitPosition & 1);
|
||||
// this.upDir = shiftedValue == 0;
|
||||
record.upDir = record.flag == 0;
|
||||
return record;
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class TrainRecordResponse extends MessageResponse {
|
||||
if (Objects.nonNull(this.localSubId)) {
|
||||
builder.setLocalSubId(this.localSubId);
|
||||
}
|
||||
builder.setGlobalId(StringUtils.defaultString(this.groupId, ""));
|
||||
builder.setGroupId(StringUtils.defaultString(this.groupId, ""));
|
||||
|
||||
if (this.getDestinationId() != null) {
|
||||
builder.setDestinationId(this.getDestinationId());
|
||||
@ -185,9 +185,8 @@ public class TrainRecordResponse extends MessageResponse {
|
||||
Up(0x02),
|
||||
Unknown(0x00),
|
||||
//实际属性
|
||||
HISTORY_UP(0x01),
|
||||
HISTORY_DOWN(0x00),
|
||||
;
|
||||
/* HISTORY_UP(0x01),
|
||||
HISTORY_DOWN(0x00),*/;
|
||||
private int value;
|
||||
|
||||
private DirectionEnum(final int value) {
|
||||
|
@ -47,7 +47,7 @@ public class PlatformAlertMonitoringTask implements AlertMonitoringTask {
|
||||
|
||||
private final AlertManager alertManager = AlertManager.getDefault();
|
||||
|
||||
private Map<String, TrainRecord.Builder> trainRecordMap = new ConcurrentHashMap<>();
|
||||
private final Map<String, TrainRecord.Builder> trainRecordMap = new ConcurrentHashMap<>();
|
||||
|
||||
private final static String PLATFORM_IS_OPEN = "isopen";
|
||||
private final static String PLATFORM_IS_CLOSE = "isclose";
|
||||
@ -57,9 +57,8 @@ public class PlatformAlertMonitoringTask implements AlertMonitoringTask {
|
||||
}
|
||||
|
||||
public void remoceTrainRecord(TrainRecord.Builder trainRecord) {
|
||||
|
||||
this.trainRecordMap.remove(trainRecord.getTrainId());
|
||||
boolean isUpWay = trainRecord.getDir() == DirectionEnum.HISTORY_UP.getValue();
|
||||
boolean isUpWay = trainRecord.getDir() == DirectionEnum.Up.getValue();
|
||||
Platform.Builder platformBuild = this.parsePlatform(trainRecord, isUpWay);
|
||||
if (Objects.nonNull(platformBuild)) {
|
||||
int lineId = trainRecord.getLineId();
|
||||
@ -82,14 +81,14 @@ public class PlatformAlertMonitoringTask implements AlertMonitoringTask {
|
||||
private Platform.Builder parsePlatform(TrainRecord.Builder record, boolean isUpWay) {
|
||||
Integer stationId = record.getStationId();
|
||||
String stationCode = Strings.padStart(stationId.toString(), 2, '0');
|
||||
String platformCode = String.format("PF%s3%s", stationCode, isUpWay ? "02" : "01");
|
||||
String platformCode = String.format("PF%s3%s", isUpWay ? "02" : "01", stationCode);
|
||||
DeviceStatusData deviceStatusData = DeviceDataRepository.findDataSouce(String.valueOf(record.getLineId()), DataTypeEnum.DEVICE);
|
||||
Map<String, GeneratedMessageV3.Builder> builderMap = deviceStatusData.getAllDeviceMap().get(DeviceStatusProto.Platform.getDescriptor().getName());
|
||||
if (CollectionUtils.isNotEmpty(builderMap)) {
|
||||
GeneratedMessageV3.Builder builder = builderMap.get(platformCode);
|
||||
if (Objects.nonNull(builder)) {
|
||||
Platform.Builder platformBuild = (Platform.Builder) builder;
|
||||
log.info("车站报点未找到对应的屏蔽门信息,线路[{}] 列车车次号[{}] 车站id[{}] 站台门id[{}] 上下行[{}] 屏蔽门状态[{}]"
|
||||
log.info("车站报对应的屏蔽门信息,线路[{}] 列车车次号[{}] 车站id[{}] 站台门id[{}] 上下行[{}] 屏蔽门状态[{}]"
|
||||
, record.getLineId(), record.getGlobalId(), record.getStationId(), record.getSideId(), isUpWay, platformBuild);
|
||||
return platformBuild;
|
||||
}
|
||||
@ -143,13 +142,12 @@ public class PlatformAlertMonitoringTask implements AlertMonitoringTask {
|
||||
false);
|
||||
alertManager.emit(alertInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for (Builder record : this.trainRecordMap.values()) {
|
||||
boolean isUpWay = record.getDir() == DirectionEnum.HISTORY_UP.getValue();
|
||||
boolean isUpWay = record.getDir() == DirectionEnum.Up.getValue();
|
||||
this.handle(record, isUpWay);
|
||||
}
|
||||
}
|
||||
|
@ -5,19 +5,16 @@ import club.joylink.xiannccda.alert.core.AlertDeviceType;
|
||||
import club.joylink.xiannccda.alert.core.AlertManager;
|
||||
import club.joylink.xiannccda.alert.core.AlertMonitoringTask;
|
||||
import club.joylink.xiannccda.ats.cache.LineGraphicDataRepository;
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository;
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository.DataTypeEnum;
|
||||
import club.joylink.xiannccda.ats.message.collect.datasource.TrainDataSource;
|
||||
import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainMode;
|
||||
import club.joylink.xiannccda.dto.protos.GuardConfigProto.GuardConfig;
|
||||
import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.Section;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainRemove;
|
||||
import club.joylink.xiannccda.service.AlertInfoService;
|
||||
import club.joylink.xiannccda.service.config.DeviceGuardConfigService;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -38,12 +35,19 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
||||
|
||||
private final AlertManager alertManager = AlertManager.getDefault();
|
||||
|
||||
private Map<String, Integer> lineTrainGroupMap = new ConcurrentHashMap<>();
|
||||
private Map<String, TrainInfo.Builder> trainInfoMap = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
public void putTrainInfoMonitor(TrainInfo.Builder train) {
|
||||
log.info("线路[{}] 车组号[{}] 列车状态[{}] 加入ATP检测中...", train.getLineId(), train.getGroupId(), train.getMode());
|
||||
this.lineTrainGroupMap.put(train.getGroupId(), train.getLineId());
|
||||
// this.lineTrainGroupMap.put(train.getGroupId(), train.getLineId());
|
||||
TrainInfo.Builder saveTrainInfo = this.trainInfoMap.get(train.getGroupId());
|
||||
if (Objects.isNull(saveTrainInfo)) {
|
||||
this.trainInfoMap.put(train.getGroupId(), train);
|
||||
} else {
|
||||
train.setReceiveTime(saveTrainInfo.getReceiveTime());
|
||||
this.trainInfoMap.put(train.getGroupId(), train);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -54,13 +58,15 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
||||
* @param train
|
||||
*/
|
||||
public void recoverAtpCut(TrainInfo.Builder train) {
|
||||
if (lineTrainGroupMap.containsKey(train.getGroupId())) {
|
||||
if (trainInfoMap.containsKey(train.getGroupId())) {
|
||||
//之前发生过紧制
|
||||
boolean exist = alertManager.deviceIsExist(train.getLineId(), CUSTOM_NAME, train.getGroupId());
|
||||
boolean exist = alertManager.deviceIsExist(train.getLineId(), this.getName(), train.getGroupId());
|
||||
if (exist) {
|
||||
//判断之前是否发生过atp切除
|
||||
this.removeTrainInfo(train.getLineId(), train.getGroupId());
|
||||
}
|
||||
} else {
|
||||
this.removeTrainInfo(train.getLineId(), train.getGroupId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,8 +75,8 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
||||
}
|
||||
|
||||
private void removeTrainInfo(int lineId, String trainGroupId) {
|
||||
this.lineTrainGroupMap.remove(trainGroupId);
|
||||
alertManager.removeAlterDevice(lineId, CUSTOM_NAME, trainGroupId);
|
||||
this.trainInfoMap.remove(trainGroupId);
|
||||
alertManager.removeAlterDevice(lineId, this.getName(), trainGroupId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -78,7 +84,7 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
||||
return "TRAIN_EB_WITH_ATP_CUT_ALTER";
|
||||
}
|
||||
|
||||
private final static String CUSTOM_NAME = AlertType.TRAIN_EB_ATP.name();
|
||||
// private final static String CUSTOM_NAME = AlertType.TRAIN_EB_ATP.name();
|
||||
|
||||
|
||||
protected void trainAlert(TrainInfo.Builder trainInfo) {
|
||||
@ -87,7 +93,7 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
||||
return;
|
||||
}
|
||||
Section section = LineGraphicDataRepository.getDeviceByCode(trainInfo.getLineId(), sectionCode, Section.class);
|
||||
if (alertManager.putAlterDevice(trainInfo.getLineId(), CUSTOM_NAME, trainInfo.getGroupId())) {
|
||||
if (alertManager.putAlterDevice(trainInfo.getLineId(), this.getName(), trainInfo.getGroupId())) {
|
||||
log.info("列车紧制ATP检测告警 线路[{}] 列车车组号[{}] 所在设备[{}]", trainInfo.getLineId(), trainInfo.getGroupId(), trainInfo.getDevName());
|
||||
String alertMsg = String.format("列车[%s] 紧制导致ATP切除所在区段[%s]", trainInfo.getGroupId(), section.getCode());
|
||||
NccAlertInfo alertInfo = this.alertInfoService.createAlert(AlertType.TRAIN_EB_ATP, AlertDeviceType.DEVICE_TYPE_TRAIN, section.getCommon().getId(), trainInfo, alertMsg, false);
|
||||
@ -97,24 +103,20 @@ public class TrainAtpCutAlertMonitoringTask implements AlertMonitoringTask {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
for (Entry<String, Integer> lineGroupEntry : this.lineTrainGroupMap.entrySet()) {
|
||||
Integer lineId = lineGroupEntry.getValue();
|
||||
String groupId = lineGroupEntry.getKey();
|
||||
TrainDataSource trainDataSource = DeviceDataRepository.findDataSouce(lineId.toString(), DataTypeEnum.TRAIN);
|
||||
TrainInfo.Builder trainInfo = trainDataSource.getTrainInfo(groupId);
|
||||
for (Builder trainInfo : this.trainInfoMap.values()) {
|
||||
int lineId = trainInfo.getLineId();
|
||||
String groupId = trainInfo.getGroupId();
|
||||
GuardConfig guardConfig = configService.getGuardConfig(lineId);
|
||||
TrainMode trainMode = trainInfo.getMode();
|
||||
boolean timeOver = this.timeOver(trainInfo.getReceiveTime(), guardConfig.getTrainAtpCutTimes());
|
||||
if (Objects.equals(false, timeOver) && trainMode.getIpModeTrainAtpCut()) {
|
||||
//列车时间ATP切除且时间没有到告警
|
||||
this.trainAlert(trainInfo);
|
||||
}/* else if (Objects.equals(false, trainMode.getIpModeTrainAtpCut())) {
|
||||
|
||||
}*/ else if (timeOver) {
|
||||
this.lineTrainGroupMap.remove(groupId);
|
||||
} else if (timeOver) {
|
||||
this.trainInfoMap.remove(groupId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,6 +105,12 @@ public final class TrainShedule {
|
||||
* @return The receiveTime.
|
||||
*/
|
||||
long getReceiveTime();
|
||||
|
||||
/**
|
||||
* <code>int32 flag = 13;</code>
|
||||
* @return The flag.
|
||||
*/
|
||||
int getFlag();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code alert.Plan}
|
||||
@ -335,6 +341,17 @@ public final class TrainShedule {
|
||||
return receiveTime_;
|
||||
}
|
||||
|
||||
public static final int FLAG_FIELD_NUMBER = 13;
|
||||
private int flag_ = 0;
|
||||
/**
|
||||
* <code>int32 flag = 13;</code>
|
||||
* @return The flag.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getFlag() {
|
||||
return flag_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
@ -385,6 +402,9 @@ public final class TrainShedule {
|
||||
if (receiveTime_ != 0L) {
|
||||
output.writeInt64(12, receiveTime_);
|
||||
}
|
||||
if (flag_ != 0) {
|
||||
output.writeInt32(13, flag_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@ -440,6 +460,10 @@ public final class TrainShedule {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt64Size(12, receiveTime_);
|
||||
}
|
||||
if (flag_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(13, flag_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
@ -479,6 +503,8 @@ public final class TrainShedule {
|
||||
!= other.getTimestamp()) return false;
|
||||
if (getReceiveTime()
|
||||
!= other.getReceiveTime()) return false;
|
||||
if (getFlag()
|
||||
!= other.getFlag()) return false;
|
||||
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||
return true;
|
||||
}
|
||||
@ -520,6 +546,8 @@ public final class TrainShedule {
|
||||
hash = (37 * hash) + RECEIVETIME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
|
||||
getReceiveTime());
|
||||
hash = (37 * hash) + FLAG_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getFlag();
|
||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
@ -663,6 +691,7 @@ public final class TrainShedule {
|
||||
upWay_ = false;
|
||||
timestamp_ = 0L;
|
||||
receiveTime_ = 0L;
|
||||
flag_ = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -732,6 +761,9 @@ public final class TrainShedule {
|
||||
if (((from_bitField0_ & 0x00000800) != 0)) {
|
||||
result.receiveTime_ = receiveTime_;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00001000) != 0)) {
|
||||
result.flag_ = flag_;
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@ -786,6 +818,9 @@ public final class TrainShedule {
|
||||
if (other.getReceiveTime() != 0L) {
|
||||
setReceiveTime(other.getReceiveTime());
|
||||
}
|
||||
if (other.getFlag() != 0) {
|
||||
setFlag(other.getFlag());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
onChanged();
|
||||
return this;
|
||||
@ -872,6 +907,11 @@ public final class TrainShedule {
|
||||
bitField0_ |= 0x00000800;
|
||||
break;
|
||||
} // case 96
|
||||
case 104: {
|
||||
flag_ = input.readInt32();
|
||||
bitField0_ |= 0x00001000;
|
||||
break;
|
||||
} // case 104
|
||||
default: {
|
||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||
done = true; // was an endgroup tag
|
||||
@ -1364,6 +1404,38 @@ public final class TrainShedule {
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int flag_ ;
|
||||
/**
|
||||
* <code>int32 flag = 13;</code>
|
||||
* @return The flag.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getFlag() {
|
||||
return flag_;
|
||||
}
|
||||
/**
|
||||
* <code>int32 flag = 13;</code>
|
||||
* @param value The flag to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setFlag(int value) {
|
||||
|
||||
flag_ = value;
|
||||
bitField0_ |= 0x00001000;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>int32 flag = 13;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearFlag() {
|
||||
bitField0_ = (bitField0_ & ~0x00001000);
|
||||
flag_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
@ -1442,14 +1514,14 @@ public final class TrainShedule {
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\022trainShedule.proto\022\005alert\"\325\001\n\004Plan\022\016\n\006" +
|
||||
"\n\022trainShedule.proto\022\005alert\"\343\001\n\004Plan\022\016\n\006" +
|
||||
"lineId\030\001 \001(\005\022\014\n\004date\030\002 \001(\003\022\020\n\010actionId\030\003" +
|
||||
" \001(\005\022\017\n\007trainId\030\004 \001(\t\022\020\n\010globalId\030\005 \001(\t\022" +
|
||||
"\021\n\tstationId\030\006 \001(\005\022\022\n\nplatformId\030\007 \001(\005\022\r" +
|
||||
"\n\005aTime\030\010 \001(\003\022\r\n\005dTime\030\t \001(\003\022\r\n\005upWay\030\n " +
|
||||
"\001(\010\022\021\n\ttimestamp\030\013 \001(\003\022\023\n\013receiveTime\030\014 " +
|
||||
"\001(\003B1\n!club.joylink.xiannccda.dto.protos" +
|
||||
"B\014TrainSheduleb\006proto3"
|
||||
"\001(\003\022\014\n\004flag\030\r \001(\005B1\n!club.joylink.xiannc" +
|
||||
"cda.dto.protosB\014TrainSheduleb\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
@ -1460,7 +1532,7 @@ public final class TrainShedule {
|
||||
internal_static_alert_Plan_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_alert_Plan_descriptor,
|
||||
new java.lang.String[] { "LineId", "Date", "ActionId", "TrainId", "GlobalId", "StationId", "PlatformId", "ATime", "DTime", "UpWay", "Timestamp", "ReceiveTime", });
|
||||
new java.lang.String[] { "LineId", "Date", "ActionId", "TrainId", "GlobalId", "StationId", "PlatformId", "ATime", "DTime", "UpWay", "Timestamp", "ReceiveTime", "Flag", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
|
@ -18,7 +18,7 @@ logging:
|
||||
|
||||
occ:
|
||||
host: 10.255.11.15
|
||||
realPort: 3603
|
||||
unRealPort: 3703
|
||||
realPort: 5603
|
||||
unRealPort: 5703
|
||||
lineId: 3
|
||||
collectorData: false
|
@ -1,12 +1,9 @@
|
||||
package club.joylink.xiannccda.config;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.config.DeviceGuardConfigDto.GuardUnit;
|
||||
import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType;
|
||||
import club.joylink.xiannccda.dto.protos.GuardConfigProto.GuardConfig;
|
||||
import club.joylink.xiannccda.entity.DeviceGuardConfig;
|
||||
import club.joylink.xiannccda.repository.IDeviceGuardConfigRepository;
|
||||
import club.joylink.xiannccda.service.config.Operator;
|
||||
import java.util.Base64;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@ -33,4 +30,5 @@ public class DataConfigTest {
|
||||
this.iDeviceGuardConfigRepository.save(gc);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user