diff --git a/src/main/java/club/joylink/xiannccda/ats/cache/LineGraphicDataRepository.java b/src/main/java/club/joylink/xiannccda/ats/cache/LineGraphicDataRepository.java index 77ed407..7248e0e 100644 --- a/src/main/java/club/joylink/xiannccda/ats/cache/LineGraphicDataRepository.java +++ b/src/main/java/club/joylink/xiannccda/ats/cache/LineGraphicDataRepository.java @@ -92,6 +92,20 @@ public class LineGraphicDataRepository { lineGraphMap.remove(id); } + /** + * 获取线路的区段集合 + * + * @param lineId 线路ID + * @return 区段集合 + */ + public static Map getLineSectionBuild(int lineId) { + Map> lineDataMap = lineGraphMap.get(lineId); + if (CollectionUtils.isNotEmpty(lineDataMap)) { + return lineDataMap.get(DeviceType.Section.name()); + } + return Map.of(); + } + /** * 构建程序中的区段信息 * @@ -117,6 +131,7 @@ public class LineGraphicDataRepository { ? (DeviceInfoProto.Section.Builder) cacheSectionMap.get(sid) : DeviceInfoProto.Section.newBuilder().setId(sid); sectionBuilder.setCode(section.getCode()); + sectionBuilder.setDestinationCode(section.getDestinationCode()); if (section.getChildrenCount() > 0) { sectionBuilder.addAllChildrenId(section.getChildrenList()); // 初始化逻辑区段信息,建立逻辑区段与物理区段之间的关系 diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java index 13368e3..22ee9f7 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java @@ -6,11 +6,15 @@ import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataRepository; import club.joylink.xiannccda.ats.message.collect.datasource.DeviceStatusData; import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage; import club.joylink.xiannccda.ats.message.line3.device.DeviceType; +import club.joylink.xiannccda.dto.protos.DeviceInfoProto; import club.joylink.xiannccda.dto.protos.WsMessageProto; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.google.protobuf.GeneratedMessageV3.Builder; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import lombok.Getter; import lombok.extern.slf4j.Slf4j; /** 线网的列车数据,一些公共方法 */ @@ -51,27 +55,121 @@ public abstract class LineNetTrainComMethod { */ public static void setUpKilometerCode( WsMessageProto.WsLineNetTrainOffsetMessage.Builder obj, DeviceType type, String deviceName) { + // 获取到当前区段公里标 + List kmList = getDeviceKilometerCode(obj.getLineId(), type, deviceName); + if (CollectionUtils.isNotEmpty(kmList)) { + obj.setKilometerCode(selectDeviceKilometerCode(obj.getDir(), kmList)); + } else { + log.warn(String.format("设备%s没有公里标信息", deviceName)); + } + } + + /** + * 根据目的码确定方向,并确定公里标 + * + * @param obj 要设置的对象 + * @param destinationCode 目的码 + * @param type 设备类型 + * @param deviceName 设备名称 + */ + public static void setTrainDirectionAndKilometerCode( + WsMessageProto.WsLineNetTrainOffsetMessage.Builder obj, + String destinationCode, + DeviceType type, + String deviceName) { + List deviceKmList = getDeviceKilometerCode(obj.getLineId(), type, deviceName); + if (CollectionUtils.isEmpty(deviceKmList)) { + return; + } + List destinationKmList = getDirectionCodeKilometerCode(obj.getLineId(), destinationCode); + if (CollectionUtils.isEmpty(destinationKmList)) { + return; + } + // 确定方向 + long deviceMax = deviceKmList.stream().max(Long::compareTo).get(); + long destinationMax = destinationKmList.stream().max(Long::compareTo).get(); + if (destinationMax > deviceMax) { // 目的地最大公里标大于设备最大公里标,上行 + obj.setDir(TrainRunDirection.UP.getNum()); + } else { + obj.setDir(TrainRunDirection.DOWN.getNum()); + } + // 赋值公里标 + obj.setKilometerCode(selectDeviceKilometerCode(obj.getDir(), deviceKmList)); + } + + /** + * 获取设备的公里标 + * + * @param lineId 线路ID + * @param type 设备类型 + * @param deviceName 设备名称 + * @return 公里标列表 + */ + private static List getDeviceKilometerCode(int lineId, DeviceType type, String deviceName) { // 非区段、道岔直接返回 if (!DeviceType.DEVICE_TYPE_TRACK.equals(type) && !DeviceType.DEVICE_TYPE_SWITCH.equals(type)) { - return; + return List.of(); } // 转换成程序中的名称 String convertName = DeviceNameChangerManage.findMatch(type, deviceName); // 获取到当前区段公里标 - List kmList = - LineGraphicDataRepository.getKilometerCodeList(obj.getLineId(), convertName); - if (CollectionUtils.isNotEmpty(kmList)) { - long kilometer; - if (obj.getDir() == 1) { // 下行取大值 - kilometer = kmList.stream().min(Long::compareTo).get(); - } else if (obj.getDir() == 2) { // 上行取小值 - kilometer = kmList.stream().max(Long::compareTo).get(); - } else { // 无方向获取第一个 - kilometer = kmList.get(0); - } - obj.setKilometerCode(kilometer); + return LineGraphicDataRepository.getKilometerCodeList(lineId, convertName); + } + + /** + * 获取目的地码的公里标信息 + * + * @param lineId 线路ID + * @param code 目的地码 + * @return 公里标列表 + */ + private static List getDirectionCodeKilometerCode(int lineId, String code) { + Map map = LineGraphicDataRepository.getLineSectionBuild(lineId); + Optional destination = + map.values().stream() + .filter( + s -> { + DeviceInfoProto.Section.Builder b = (DeviceInfoProto.Section.Builder) s; + return Objects.equals(b.getDestinationCode(), code); + }) + .findFirst(); + if (destination.isPresent()) { + DeviceInfoProto.Section.Builder b = (DeviceInfoProto.Section.Builder) destination.get(); + return b.getConvertKilometerList(); } else { - log.warn(String.format("设备%s没有公里标信息", convertName)); + return List.of(); + } + } + + /** + * 选择对应的公里标信息 + * + * @param dir 运行方向 + * @param kmList 公里标列表 + * @return 公里标 + */ + private static long selectDeviceKilometerCode(int dir, List kmList) { + long kilometer; + if (dir == 1) { // 下行取大值 + kilometer = kmList.stream().min(Long::compareTo).get(); + } else if (dir == 2) { // 上行取小值 + kilometer = kmList.stream().max(Long::compareTo).get(); + } else { // 无方向获取第一个 + kilometer = kmList.get(0); + } + return kilometer; + } + + @Getter + public static enum TrainRunDirection { + UP(2), + DOWN(1), + NO(0); + + private int num; + + TrainRunDirection(int num) { + this.num = num; } } } diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainInitConvertor.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainInitConvertor.java index d40a405..5fad374 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainInitConvertor.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainInitConvertor.java @@ -35,9 +35,8 @@ public class LineNetTrainInitConvertor extends DeviceStatusConvertor { offset.setLineId(response.getLineId()); // 线路id offset.setTrainIndex(trainCell.getTrainIndex()); // 列车标示号,全线唯一 offset.setGroupId(trainCell.getGroupId()); // 车组号 - offset.setDir(0); // 初始设置无运行方向 - LineNetTrainComMethod.setUpKilometerCode( - offset, trainCell.getDevType(), trainCell.getDevName()); + LineNetTrainComMethod.setTrainDirectionAndKilometerCode( + offset, trainCell.getDestinationId(), trainCell.getDevType(), trainCell.getDevName()); offset.setShow(offset.getKilometerCode() != 0); buildList.add(offset); } diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainRecordConvertor.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainRecordConvertor.java deleted file mode 100644 index 66b683c..0000000 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainRecordConvertor.java +++ /dev/null @@ -1,52 +0,0 @@ -package club.joylink.xiannccda.ats.message.collect.convertor; - -import club.joylink.xiannccda.ats.message.MessageData; -import club.joylink.xiannccda.ats.message.MessageId; -import club.joylink.xiannccda.ats.message.collect.DeviceStatusConvertor; - -import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataOperate; -import club.joylink.xiannccda.ats.message.line3.device.DeviceType; -import club.joylink.xiannccda.ats.message.line3.rep.TrainRecordResponse; -import club.joylink.xiannccda.dto.protos.WsMessageProto; -import com.google.common.collect.Lists; -import com.google.protobuf.GeneratedMessageV3.Builder; -import java.util.List; -import java.util.Objects; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class LineNetTrainRecordConvertor extends DeviceStatusConvertor { - - @Override - public MessageId getMessageId() { - return MessageId.TRAIN_RECORD; - } - - @Override - public void run(List messageDataList) { - try { - List buildList = Lists.newArrayList(); - // 已存在的设备信息 - for (MessageData data : messageDataList) { - if (Objects.equals(getMessageId(), data.getMsgId())) { // 消息类型一致 - TrainRecordResponse response = (TrainRecordResponse) data; - WsMessageProto.WsLineNetTrainOffsetMessage.Builder offset = - WsMessageProto.WsLineNetTrainOffsetMessage.newBuilder(); - offset.setLineId(response.getLineId()); // 线路id - offset.setGroupId(response.getGroupId()); // 车组号 - LineNetTrainComMethod.getDeviceStatusById(offset); // 合并老旧数据 - offset.setDir(response.getDirection().getValue()); // 初始设置无运行方向 - // 设置公里标信息 - LineNetTrainComMethod.setUpKilometerCode( - offset, DeviceType.DEVICE_TYPE_TRACK, response.getTrackName()); - offset.setShow(offset.getKilometerCode() != 0); - buildList.add(offset); - } - } - // 增加设备信息 - DeviceStatusDataOperate.addDevices(buildList, LineNetTrainComMethod.getDeviceStatusData()); - } catch (Exception e) { - log.error("信息生成出错", e); - } - } -} diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainUpdateConvertor.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainUpdateConvertor.java index b8f03ef..1a58744 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainUpdateConvertor.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainUpdateConvertor.java @@ -35,8 +35,8 @@ public class LineNetTrainUpdateConvertor extends DeviceStatusConvertor { offset.setTrainIndex(response.getTrainIndex()); // 列车标示号,全线唯一 offset.setGroupId(response.getGroupId()); // 车组号 LineNetTrainComMethod.getDeviceStatusById(offset); // 合并老旧数据 - LineNetTrainComMethod.setUpKilometerCode( - offset, response.getDevType(), response.getDevName()); + LineNetTrainComMethod.setTrainDirectionAndKilometerCode( + offset, response.getDestinationId(), response.getDevType(), response.getDevName()); offset.setShow(offset.getKilometerCode() != 0); buildList.add(offset); } diff --git a/src/main/java/club/joylink/xiannccda/dto/protos/DeviceInfoProto.java b/src/main/java/club/joylink/xiannccda/dto/protos/DeviceInfoProto.java index 564bb04..8c9b6b9 100644 --- a/src/main/java/club/joylink/xiannccda/dto/protos/DeviceInfoProto.java +++ b/src/main/java/club/joylink/xiannccda/dto/protos/DeviceInfoProto.java @@ -183,6 +183,26 @@ public final class DeviceInfoProto { */ com.google.protobuf.ByteString getPhysicalSectionIdBytes(); + + /** + *
+     * 目的地码
+     * 
+ * + * string destinationCode = 7; + * @return The destinationCode. + */ + java.lang.String getDestinationCode(); + /** + *
+     * 目的地码
+     * 
+ * + * string destinationCode = 7; + * @return The bytes for destinationCode. + */ + com.google.protobuf.ByteString + getDestinationCodeBytes(); } /** *
@@ -208,6 +228,7 @@ public final class DeviceInfoProto {
       kilometerSystem_ = java.util.Collections.emptyList();
       convertKilometer_ = emptyLongList();
       physicalSectionId_ = "";
+      destinationCode_ = "";
     }
 
     @java.lang.Override
@@ -518,6 +539,53 @@ public final class DeviceInfoProto {
       }
     }
 
+    public static final int DESTINATIONCODE_FIELD_NUMBER = 7;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object destinationCode_ = "";
+    /**
+     * 
+     * 目的地码
+     * 
+ * + * string destinationCode = 7; + * @return The destinationCode. + */ + @java.lang.Override + public java.lang.String getDestinationCode() { + java.lang.Object ref = destinationCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationCode_ = s; + return s; + } + } + /** + *
+     * 目的地码
+     * 
+ * + * string destinationCode = 7; + * @return The bytes for destinationCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationCodeBytes() { + java.lang.Object ref = destinationCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -555,6 +623,9 @@ public final class DeviceInfoProto { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(physicalSectionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, physicalSectionId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, destinationCode_); + } getUnknownFields().writeTo(output); } @@ -599,6 +670,9 @@ public final class DeviceInfoProto { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(physicalSectionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, physicalSectionId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, destinationCode_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -626,6 +700,8 @@ public final class DeviceInfoProto { .equals(other.getConvertKilometerList())) return false; if (!getPhysicalSectionId() .equals(other.getPhysicalSectionId())) return false; + if (!getDestinationCode() + .equals(other.getDestinationCode())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,6 +731,8 @@ public final class DeviceInfoProto { } hash = (37 * hash) + PHYSICALSECTIONID_FIELD_NUMBER; hash = (53 * hash) + getPhysicalSectionId().hashCode(); + hash = (37 * hash) + DESTINATIONCODE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationCode().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -803,6 +881,7 @@ public final class DeviceInfoProto { bitField0_ = (bitField0_ & ~0x00000008); convertKilometer_ = emptyLongList(); physicalSectionId_ = ""; + destinationCode_ = ""; return this; } @@ -867,6 +946,9 @@ public final class DeviceInfoProto { if (((from_bitField0_ & 0x00000020) != 0)) { result.physicalSectionId_ = physicalSectionId_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.destinationCode_ = destinationCode_; + } } @java.lang.Override @@ -942,6 +1024,11 @@ public final class DeviceInfoProto { bitField0_ |= 0x00000020; onChanged(); } + if (!other.getDestinationCode().isEmpty()) { + destinationCode_ = other.destinationCode_; + bitField0_ |= 0x00000040; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1018,6 +1105,11 @@ public final class DeviceInfoProto { bitField0_ |= 0x00000020; break; } // case 50 + case 58: { + destinationCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -1858,6 +1950,98 @@ public final class DeviceInfoProto { onChanged(); return this; } + + private java.lang.Object destinationCode_ = ""; + /** + *
+       * 目的地码
+       * 
+ * + * string destinationCode = 7; + * @return The destinationCode. + */ + public java.lang.String getDestinationCode() { + java.lang.Object ref = destinationCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 目的地码
+       * 
+ * + * string destinationCode = 7; + * @return The bytes for destinationCode. + */ + public com.google.protobuf.ByteString + getDestinationCodeBytes() { + java.lang.Object ref = destinationCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 目的地码
+       * 
+ * + * string destinationCode = 7; + * @param value The destinationCode to set. + * @return This builder for chaining. + */ + public Builder setDestinationCode( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCode_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * 目的地码
+       * 
+ * + * string destinationCode = 7; + * @return This builder for chaining. + */ + public Builder clearDestinationCode() { + destinationCode_ = getDefaultInstance().getDestinationCode(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+       * 目的地码
+       * 
+ * + * string destinationCode = 7; + * @param value The bytes for destinationCode to set. + * @return This builder for chaining. + */ + public Builder setDestinationCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCode_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3348,16 +3532,16 @@ public final class DeviceInfoProto { static { java.lang.String[] descriptorData = { "\n\021device_info.proto\022\005state\032\033stationLayou" + - "tGraphics.proto\"\243\001\n\007Section\022\n\n\002id\030\001 \001(\t\022" + + "tGraphics.proto\"\274\001\n\007Section\022\n\n\002id\030\001 \001(\t\022" + "\014\n\004code\030\002 \001(\t\022\022\n\nchildrenId\030\003 \003(\t\0225\n\017kil" + "ometerSystem\030\004 \003(\0132\034.graphicData.Kilomet" + "erSystem\022\030\n\020convertKilometer\030\005 \003(\003\022\031\n\021ph" + - "ysicalSectionId\030\006 \001(\t\"t\n\007Turnout\022\n\n\002id\030\001" + - " \001(\t\022\014\n\004code\030\002 \001(\t\0225\n\017kilometerSystem\030\003 " + - "\003(\0132\034.graphicData.KilometerSystem\022\030\n\020con" + - "vertKilometer\030\004 \003(\003B4\n!club.joylink.xian" + - "nccda.dto.protosB\017DeviceInfoProtob\006proto" + - "3" + "ysicalSectionId\030\006 \001(\t\022\027\n\017destinationCode" + + "\030\007 \001(\t\"t\n\007Turnout\022\n\n\002id\030\001 \001(\t\022\014\n\004code\030\002 " + + "\001(\t\0225\n\017kilometerSystem\030\003 \003(\0132\034.graphicDa" + + "ta.KilometerSystem\022\030\n\020convertKilometer\030\004" + + " \003(\003B4\n!club.joylink.xiannccda.dto.proto" + + "sB\017DeviceInfoProtob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -3369,7 +3553,7 @@ public final class DeviceInfoProto { internal_static_state_Section_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_state_Section_descriptor, - new java.lang.String[] { "Id", "Code", "ChildrenId", "KilometerSystem", "ConvertKilometer", "PhysicalSectionId", }); + new java.lang.String[] { "Id", "Code", "ChildrenId", "KilometerSystem", "ConvertKilometer", "PhysicalSectionId", "DestinationCode", }); internal_static_state_Turnout_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_state_Turnout_fieldAccessorTable = new diff --git a/src/main/java/club/joylink/xiannccda/dto/protos/LayoutGraphicsProto.java b/src/main/java/club/joylink/xiannccda/dto/protos/LayoutGraphicsProto.java index de9e470..68367d3 100644 --- a/src/main/java/club/joylink/xiannccda/dto/protos/LayoutGraphicsProto.java +++ b/src/main/java/club/joylink/xiannccda/dto/protos/LayoutGraphicsProto.java @@ -16923,6 +16923,46 @@ public final class LayoutGraphicsProto { */ com.google.protobuf.ByteString getDirectionBytes(); + + /** + *
+     *上下行--upLink表示上行,downLink表示下行
+     * 
+ * + * string upAndDown = 5; + * @return The upAndDown. + */ + java.lang.String getUpAndDown(); + /** + *
+     *上下行--upLink表示上行,downLink表示下行
+     * 
+ * + * string upAndDown = 5; + * @return The bytes for upAndDown. + */ + com.google.protobuf.ByteString + getUpAndDownBytes(); + + /** + *
+     *关联的车站
+     * 
+ * + * string refStation = 6; + * @return The refStation. + */ + java.lang.String getRefStation(); + /** + *
+     *关联的车站
+     * 
+ * + * string refStation = 6; + * @return The bytes for refStation. + */ + com.google.protobuf.ByteString + getRefStationBytes(); } /** * Protobuf type {@code graphicData.Platform} @@ -16939,6 +16979,8 @@ public final class LayoutGraphicsProto { private Platform() { code_ = ""; direction_ = ""; + upAndDown_ = ""; + refStation_ = ""; } @java.lang.Override @@ -17088,6 +17130,100 @@ public final class LayoutGraphicsProto { } } + public static final int UPANDDOWN_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object upAndDown_ = ""; + /** + *
+     *上下行--upLink表示上行,downLink表示下行
+     * 
+ * + * string upAndDown = 5; + * @return The upAndDown. + */ + @java.lang.Override + public java.lang.String getUpAndDown() { + java.lang.Object ref = upAndDown_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upAndDown_ = s; + return s; + } + } + /** + *
+     *上下行--upLink表示上行,downLink表示下行
+     * 
+ * + * string upAndDown = 5; + * @return The bytes for upAndDown. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpAndDownBytes() { + java.lang.Object ref = upAndDown_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + upAndDown_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFSTATION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object refStation_ = ""; + /** + *
+     *关联的车站
+     * 
+ * + * string refStation = 6; + * @return The refStation. + */ + @java.lang.Override + public java.lang.String getRefStation() { + java.lang.Object ref = refStation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refStation_ = s; + return s; + } + } + /** + *
+     *关联的车站
+     * 
+ * + * string refStation = 6; + * @return The bytes for refStation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefStationBytes() { + java.lang.Object ref = refStation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refStation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -17114,6 +17250,12 @@ public final class LayoutGraphicsProto { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, direction_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(upAndDown_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, upAndDown_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(refStation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, refStation_); + } getUnknownFields().writeTo(output); } @@ -17137,6 +17279,12 @@ public final class LayoutGraphicsProto { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, direction_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(upAndDown_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, upAndDown_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(refStation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, refStation_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -17163,6 +17311,10 @@ public final class LayoutGraphicsProto { != other.getHasdoor()) return false; if (!getDirection() .equals(other.getDirection())) return false; + if (!getUpAndDown() + .equals(other.getUpAndDown())) return false; + if (!getRefStation() + .equals(other.getRefStation())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -17185,6 +17337,10 @@ public final class LayoutGraphicsProto { getHasdoor()); hash = (37 * hash) + DIRECTION_FIELD_NUMBER; hash = (53 * hash) + getDirection().hashCode(); + hash = (37 * hash) + UPANDDOWN_FIELD_NUMBER; + hash = (53 * hash) + getUpAndDown().hashCode(); + hash = (37 * hash) + REFSTATION_FIELD_NUMBER; + hash = (53 * hash) + getRefStation().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -17324,6 +17480,8 @@ public final class LayoutGraphicsProto { code_ = ""; hasdoor_ = false; direction_ = ""; + upAndDown_ = ""; + refStation_ = ""; return this; } @@ -17371,6 +17529,12 @@ public final class LayoutGraphicsProto { if (((from_bitField0_ & 0x00000008) != 0)) { result.direction_ = direction_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.upAndDown_ = upAndDown_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.refStation_ = refStation_; + } } @java.lang.Override @@ -17401,6 +17565,16 @@ public final class LayoutGraphicsProto { bitField0_ |= 0x00000008; onChanged(); } + if (!other.getUpAndDown().isEmpty()) { + upAndDown_ = other.upAndDown_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRefStation().isEmpty()) { + refStation_ = other.refStation_; + bitField0_ |= 0x00000020; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -17449,6 +17623,16 @@ public final class LayoutGraphicsProto { bitField0_ |= 0x00000008; break; } // case 34 + case 42: { + upAndDown_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + refStation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -17792,6 +17976,190 @@ public final class LayoutGraphicsProto { onChanged(); return this; } + + private java.lang.Object upAndDown_ = ""; + /** + *
+       *上下行--upLink表示上行,downLink表示下行
+       * 
+ * + * string upAndDown = 5; + * @return The upAndDown. + */ + public java.lang.String getUpAndDown() { + java.lang.Object ref = upAndDown_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upAndDown_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *上下行--upLink表示上行,downLink表示下行
+       * 
+ * + * string upAndDown = 5; + * @return The bytes for upAndDown. + */ + public com.google.protobuf.ByteString + getUpAndDownBytes() { + java.lang.Object ref = upAndDown_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + upAndDown_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *上下行--upLink表示上行,downLink表示下行
+       * 
+ * + * string upAndDown = 5; + * @param value The upAndDown to set. + * @return This builder for chaining. + */ + public Builder setUpAndDown( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + upAndDown_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       *上下行--upLink表示上行,downLink表示下行
+       * 
+ * + * string upAndDown = 5; + * @return This builder for chaining. + */ + public Builder clearUpAndDown() { + upAndDown_ = getDefaultInstance().getUpAndDown(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       *上下行--upLink表示上行,downLink表示下行
+       * 
+ * + * string upAndDown = 5; + * @param value The bytes for upAndDown to set. + * @return This builder for chaining. + */ + public Builder setUpAndDownBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + upAndDown_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object refStation_ = ""; + /** + *
+       *关联的车站
+       * 
+ * + * string refStation = 6; + * @return The refStation. + */ + public java.lang.String getRefStation() { + java.lang.Object ref = refStation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refStation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *关联的车站
+       * 
+ * + * string refStation = 6; + * @return The bytes for refStation. + */ + public com.google.protobuf.ByteString + getRefStationBytes() { + java.lang.Object ref = refStation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refStation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *关联的车站
+       * 
+ * + * string refStation = 6; + * @param value The refStation to set. + * @return This builder for chaining. + */ + public Builder setRefStation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refStation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       *关联的车站
+       * 
+ * + * string refStation = 6; + * @return This builder for chaining. + */ + public Builder clearRefStation() { + refStation_ = getDefaultInstance().getRefStation(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+       *关联的车站
+       * 
+ * + * string refStation = 6; + * @param value The bytes for refStation to set. + * @return This builder for chaining. + */ + public Builder setRefStationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refStation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -17933,6 +18301,18 @@ public final class LayoutGraphicsProto { * .graphicData.KilometerSystem kilometerSystem = 6; */ club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.KilometerSystemOrBuilder getKilometerSystemOrBuilder(); + + /** + * string name = 7; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 7; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); } /** * Protobuf type {@code graphicData.Station} @@ -17948,6 +18328,7 @@ public final class LayoutGraphicsProto { } private Station() { code_ = ""; + name_ = ""; } @java.lang.Override @@ -18103,6 +18484,45 @@ public final class LayoutGraphicsProto { return kilometerSystem_ == null ? club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.KilometerSystem.getDefaultInstance() : kilometerSystem_; } + public static final int NAME_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 7; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 7; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -18132,6 +18552,9 @@ public final class LayoutGraphicsProto { if (kilometerSystem_ != null) { output.writeMessage(6, getKilometerSystem()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, name_); + } getUnknownFields().writeTo(output); } @@ -18160,6 +18583,9 @@ public final class LayoutGraphicsProto { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getKilometerSystem()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, name_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -18191,6 +18617,8 @@ public final class LayoutGraphicsProto { if (!getKilometerSystem() .equals(other.getKilometerSystem())) return false; } + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18218,6 +18646,8 @@ public final class LayoutGraphicsProto { hash = (37 * hash) + KILOMETERSYSTEM_FIELD_NUMBER; hash = (53 * hash) + getKilometerSystem().hashCode(); } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -18362,6 +18792,7 @@ public final class LayoutGraphicsProto { kilometerSystemBuilder_.dispose(); kilometerSystemBuilder_ = null; } + name_ = ""; return this; } @@ -18414,6 +18845,9 @@ public final class LayoutGraphicsProto { ? kilometerSystem_ : kilometerSystemBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.name_ = name_; + } } @java.lang.Override @@ -18445,6 +18879,11 @@ public final class LayoutGraphicsProto { if (other.hasKilometerSystem()) { mergeKilometerSystem(other.getKilometerSystem()); } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000020; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -18500,6 +18939,11 @@ public final class LayoutGraphicsProto { bitField0_ |= 0x00000010; break; } // case 50 + case 58: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -18950,6 +19394,78 @@ public final class LayoutGraphicsProto { } return kilometerSystemBuilder_; } + + private java.lang.Object name_ = ""; + /** + * string name = 7; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 7; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 7; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string name = 7; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string name = 7; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -29749,6 +30265,35 @@ public final class LayoutGraphicsProto { */ com.google.protobuf.ByteString getLineIdBytes(); + + /** + *
+     * 虚线段点序号
+     * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return A list containing the dashPointIndexs. + */ + java.util.List getDashPointIndexsList(); + /** + *
+     * 虚线段点序号
+     * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return The count of dashPointIndexs. + */ + int getDashPointIndexsCount(); + /** + *
+     * 虚线段点序号
+     * 
+ * + * repeated int32 dashPointIndexs = 11; + * @param index The index of the element to return. + * @return The dashPointIndexs at the given index. + */ + int getDashPointIndexs(int index); } /** * Protobuf type {@code graphicData.RunLine} @@ -29772,6 +30317,7 @@ public final class LayoutGraphicsProto { linkPathLines_ = com.google.protobuf.LazyStringArrayList.emptyList(); lineId_ = ""; + dashPointIndexs_ = emptyIntList(); } @java.lang.Override @@ -30111,6 +30657,47 @@ public final class LayoutGraphicsProto { } } + public static final int DASHPOINTINDEXS_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList dashPointIndexs_; + /** + *
+     * 虚线段点序号
+     * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return A list containing the dashPointIndexs. + */ + @java.lang.Override + public java.util.List + getDashPointIndexsList() { + return dashPointIndexs_; + } + /** + *
+     * 虚线段点序号
+     * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return The count of dashPointIndexs. + */ + public int getDashPointIndexsCount() { + return dashPointIndexs_.size(); + } + /** + *
+     * 虚线段点序号
+     * 
+ * + * repeated int32 dashPointIndexs = 11; + * @param index The index of the element to return. + * @return The dashPointIndexs at the given index. + */ + public int getDashPointIndexs(int index) { + return dashPointIndexs_.getInt(index); + } + private int dashPointIndexsMemoizedSerializedSize = -1; + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -30125,6 +30712,7 @@ public final class LayoutGraphicsProto { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (common_ != null) { output.writeMessage(1, getCommon()); } @@ -30149,6 +30737,13 @@ public final class LayoutGraphicsProto { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lineId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, lineId_); } + if (getDashPointIndexsList().size() > 0) { + output.writeUInt32NoTag(90); + output.writeUInt32NoTag(dashPointIndexsMemoizedSerializedSize); + } + for (int i = 0; i < dashPointIndexs_.size(); i++) { + output.writeInt32NoTag(dashPointIndexs_.getInt(i)); + } getUnknownFields().writeTo(output); } @@ -30194,6 +30789,20 @@ public final class LayoutGraphicsProto { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lineId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, lineId_); } + { + int dataSize = 0; + for (int i = 0; i < dashPointIndexs_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dashPointIndexs_.getInt(i)); + } + size += dataSize; + if (!getDashPointIndexsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + dashPointIndexsMemoizedSerializedSize = dataSize; + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -30228,6 +30837,8 @@ public final class LayoutGraphicsProto { .equals(other.getLinkPathLinesList())) return false; if (!getLineId() .equals(other.getLineId())) return false; + if (!getDashPointIndexsList() + .equals(other.getDashPointIndexsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -30263,6 +30874,10 @@ public final class LayoutGraphicsProto { } hash = (37 * hash) + LINEID_FIELD_NUMBER; hash = (53 * hash) + getLineId().hashCode(); + if (getDashPointIndexsCount() > 0) { + hash = (37 * hash) + DASHPOINTINDEXS_FIELD_NUMBER; + hash = (53 * hash) + getDashPointIndexsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -30414,6 +31029,7 @@ public final class LayoutGraphicsProto { linkPathLines_ = com.google.protobuf.LazyStringArrayList.emptyList(); lineId_ = ""; + dashPointIndexs_ = emptyIntList(); return this; } @@ -30456,6 +31072,11 @@ public final class LayoutGraphicsProto { } else { result.points_ = pointsBuilder_.build(); } + if (((bitField0_ & 0x00000100) != 0)) { + dashPointIndexs_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.dashPointIndexs_ = dashPointIndexs_; } private void buildPartial0(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.RunLine result) { @@ -30568,6 +31189,16 @@ public final class LayoutGraphicsProto { bitField0_ |= 0x00000080; onChanged(); } + if (!other.dashPointIndexs_.isEmpty()) { + if (dashPointIndexs_.isEmpty()) { + dashPointIndexs_ = other.dashPointIndexs_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureDashPointIndexsIsMutable(); + dashPointIndexs_.addAll(other.dashPointIndexs_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -30646,6 +31277,22 @@ public final class LayoutGraphicsProto { bitField0_ |= 0x00000080; break; } // case 82 + case 88: { + int v = input.readInt32(); + ensureDashPointIndexsIsMutable(); + dashPointIndexs_.addInt(v); + break; + } // case 88 + case 90: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureDashPointIndexsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + dashPointIndexs_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -31576,6 +32223,115 @@ public final class LayoutGraphicsProto { onChanged(); return this; } + + private com.google.protobuf.Internal.IntList dashPointIndexs_ = emptyIntList(); + private void ensureDashPointIndexsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + dashPointIndexs_ = mutableCopy(dashPointIndexs_); + bitField0_ |= 0x00000100; + } + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return A list containing the dashPointIndexs. + */ + public java.util.List + getDashPointIndexsList() { + return ((bitField0_ & 0x00000100) != 0) ? + java.util.Collections.unmodifiableList(dashPointIndexs_) : dashPointIndexs_; + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return The count of dashPointIndexs. + */ + public int getDashPointIndexsCount() { + return dashPointIndexs_.size(); + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @param index The index of the element to return. + * @return The dashPointIndexs at the given index. + */ + public int getDashPointIndexs(int index) { + return dashPointIndexs_.getInt(index); + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @param index The index to set the value at. + * @param value The dashPointIndexs to set. + * @return This builder for chaining. + */ + public Builder setDashPointIndexs( + int index, int value) { + + ensureDashPointIndexsIsMutable(); + dashPointIndexs_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @param value The dashPointIndexs to add. + * @return This builder for chaining. + */ + public Builder addDashPointIndexs(int value) { + + ensureDashPointIndexsIsMutable(); + dashPointIndexs_.addInt(value); + onChanged(); + return this; + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @param values The dashPointIndexs to add. + * @return This builder for chaining. + */ + public Builder addAllDashPointIndexs( + java.lang.Iterable values) { + ensureDashPointIndexsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dashPointIndexs_); + onChanged(); + return this; + } + /** + *
+       * 虚线段点序号
+       * 
+ * + * repeated int32 dashPointIndexs = 11; + * @return This builder for chaining. + */ + public Builder clearDashPointIndexs() { + dashPointIndexs_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -40075,76 +40831,78 @@ public final class LayoutGraphicsProto { "\n\007Polygon\022\'\n\006common\030\001 \001(\0132\027.graphicData." + "CommonInfo\022\014\n\004code\030\002 \001(\t\022\021\n\tlineWidth\030\003 " + "\001(\005\022\021\n\tlineColor\030\004 \001(\t\022\"\n\006points\030\005 \003(\0132\022" + - ".graphicData.Point\"e\n\010Platform\022\'\n\006common" + - "\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004code\030" + - "\002 \001(\t\022\017\n\007hasdoor\030\003 \001(\010\022\021\n\tdirection\030\004 \001(" + - "\t\"\252\001\n\007Station\022\'\n\006common\030\001 \001(\0132\027.graphicD" + + ".graphicData.Point\"\214\001\n\010Platform\022\'\n\006commo" + + "n\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004code" + + "\030\002 \001(\t\022\017\n\007hasdoor\030\003 \001(\010\022\021\n\tdirection\030\004 \001" + + "(\t\022\021\n\tupAndDown\030\005 \001(\t\022\022\n\nrefStation\030\006 \001(" + + "\t\"\270\001\n\007Station\022\'\n\006common\030\001 \001(\0132\027.graphicD" + "ata.CommonInfo\022\014\n\004code\030\002 \001(\t\022\022\n\nhasContr" + "ol\030\003 \001(\010\022\035\n\025concentrationStations\030\004 \001(\010\022" + "5\n\017kilometerSystem\030\006 \001(\0132\034.graphicData.K" + - "ilometerSystem\"k\n\013StationLine\022\'\n\006common\030" + - "\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004code\030\002" + - " \001(\t\022\023\n\013hasTransfer\030\003 \001(\010\022\020\n\010hideName\030\004 " + - "\001(\010\"Y\n\013TrainWindow\022\'\n\006common\030\001 \001(\0132\027.gra" + - "phicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\023\n\013ref" + - "DeviceId\030\003 \003(\t\"\256\001\n\014AxleCounting\022\'\n\006commo" + - "n\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004code" + - "\030\002 \001(\t\0225\n\017kilometerSystem\030\003 \001(\0132\034.graphi" + - "cData.KilometerSystem\0220\n\017axleCountingRef" + - "\030\004 \003(\0132\027.graphicData.RelatedRef\">\n\005Train" + - "\022\'\n\006common\030\001 \001(\0132\027.graphicData.CommonInf" + - "o\022\014\n\004code\030\002 \001(\t\"B\n\tTrainLine\022\'\n\006common\030\001" + + "ilometerSystem\022\014\n\004name\030\007 \001(\t\"k\n\013StationL" + + "ine\022\'\n\006common\030\001 \001(\0132\027.graphicData.Common" + + "Info\022\014\n\004code\030\002 \001(\t\022\023\n\013hasTransfer\030\003 \001(\010\022" + + "\020\n\010hideName\030\004 \001(\010\"Y\n\013TrainWindow\022\'\n\006comm" + + "on\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004cod" + + "e\030\002 \001(\t\022\023\n\013refDeviceId\030\003 \003(\t\"\256\001\n\014AxleCou" + + "nting\022\'\n\006common\030\001 \001(\0132\027.graphicData.Comm" + + "onInfo\022\014\n\004code\030\002 \001(\t\0225\n\017kilometerSystem\030" + + "\003 \001(\0132\034.graphicData.KilometerSystem\0220\n\017a" + + "xleCountingRef\030\004 \003(\0132\027.graphicData.Relat" + + "edRef\">\n\005Train\022\'\n\006common\030\001 \001(\0132\027.graphic" + + "Data.CommonInfo\022\014\n\004code\030\002 \001(\t\"B\n\tTrainLi" + + "ne\022\'\n\006common\030\001 \001(\0132\027.graphicData.CommonI" + + "nfo\022\014\n\004code\030\002 \001(\t\"@\n\007IscsFan\022\'\n\006common\030\001" + " \001(\0132\027.graphicData.CommonInfo\022\014\n\004code\030\002 " + - "\001(\t\"@\n\007IscsFan\022\'\n\006common\030\001 \001(\0132\027.graphic" + - "Data.CommonInfo\022\014\n\004code\030\002 \001(\t\"\333\002\n\007Turnou" + - "t\022\'\n\006common\030\001 \001(\0132\027.graphicData.CommonIn" + - "fo\022\014\n\004code\030\002 \001(\t\022\"\n\006pointA\030\006 \003(\0132\022.graph" + - "icData.Point\022\"\n\006pointB\030\007 \003(\0132\022.graphicDa" + - "ta.Point\022\"\n\006pointC\030\010 \003(\0132\022.graphicData.P" + - "oint\022&\n\005paRef\030\t \001(\0132\027.graphicData.Relate" + - "dRef\022&\n\005pbRef\030\n \001(\0132\027.graphicData.Relate" + - "dRef\022&\n\005pcRef\030\013 \001(\0132\027.graphicData.Relate" + - "dRef\0225\n\017kilometerSystem\030\r \003(\0132\034.graphicD" + - "ata.KilometerSystem\">\n\017KilometerSystem\022\021" + - "\n\tkilometer\030\001 \001(\003\022\030\n\020coordinateSystem\030\002 " + - "\001(\t\"\206\001\n\006Signal\022\'\n\006common\030\001 \001(\0132\027.graphic" + - "Data.CommonInfo\022\014\n\004code\030\002 \001(\t\022\016\n\006mirror\030" + - "\003 \001(\010\0225\n\017kilometerSystem\030\006 \001(\0132\034.graphic" + - "Data.KilometerSystem\"\307\001\n\007RunLine\022\'\n\006comm" + - "on\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004cod" + - "e\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022.graphicData.Po" + - "int\022\021\n\tnameColor\030\004 \001(\t\022\023\n\013nameBgColor\030\005 " + - "\001(\t\022\022\n\ncontainSta\030\010 \003(\t\022\025\n\rlinkPathLines" + - "\030\t \003(\t\022\016\n\006lineId\030\n \001(\t\"\337\002\n\007Section\022\'\n\006co" + - "mmon\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004c" + - "ode\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022.graphicData." + - "Point\022&\n\005paRef\030\004 \001(\0132\027.graphicData.Relat" + - "edRef\022&\n\005pbRef\030\005 \001(\0132\027.graphicData.Relat" + - "edRef\0225\n\013sectionType\030\006 \001(\0162 .graphicData" + - ".Section.SectionType\022\025\n\raxleCountings\030\007 " + - "\003(\t\022\020\n\010children\030\010 \003(\t\022\027\n\017destinationCode" + - "\030\t \001(\t\"0\n\013SectionType\022\014\n\010Physical\020\000\022\023\n\017T" + - "urnoutPhysical\020\002\"i\n\014LogicSection\022\'\n\006comm" + - "on\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004cod" + - "e\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022.graphicData.Po" + - "int\"V\n\016KilometerPoint\022!\n\005point\030\001 \001(\0132\022.g" + - "raphicData.Point\022\021\n\tkilometer\030\002 \001(\003\022\016\n\006s" + - "tName\030\003 \001(\t\"\277\001\n\010PathLine\022\'\n\006common\030\001 \001(\013" + - "2\027.graphicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022" + - "\"\n\006points\030\003 \003(\0132\022.graphicData.Point\022\014\n\004i" + - "sUp\030\004 \001(\010\0224\n\017kilometerPoints\030\005 \003(\0132\033.gra" + - "phicData.KilometerPoint\022\024\n\014isKmIncrease\030" + - "\006 \001(\010\"\366\001\n\nRelatedRef\0226\n\ndeviceType\030\001 \001(\016" + - "2\".graphicData.RelatedRef.DeviceType\022\n\n\002" + - "id\030\002 \001(\t\0226\n\ndevicePort\030\003 \001(\0162\".graphicDa" + - "ta.RelatedRef.DevicePort\"I\n\nDeviceType\022\013" + - "\n\007Section\020\000\022\013\n\007Turnout\020\001\022\017\n\013TrainWindow\020" + - "\002\022\020\n\014AxleCounting\020\003\"!\n\nDevicePort\022\005\n\001A\020\000" + - "\022\005\n\001B\020\001\022\005\n\001C\020\002\"Y\n\tSeparator\022\'\n\006common\030\001 " + - "\001(\0132\027.graphicData.CommonInfo\022\014\n\004code\030\002 \001" + - "(\t\022\025\n\rseparatorType\030\003 \001(\tB8\n!club.joylin" + - "k.xiannccda.dto.protosB\023LayoutGraphicsPr" + - "otob\006proto3" + "\001(\t\"\333\002\n\007Turnout\022\'\n\006common\030\001 \001(\0132\027.graphi" + + "cData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006pointA" + + "\030\006 \003(\0132\022.graphicData.Point\022\"\n\006pointB\030\007 \003" + + "(\0132\022.graphicData.Point\022\"\n\006pointC\030\010 \003(\0132\022" + + ".graphicData.Point\022&\n\005paRef\030\t \001(\0132\027.grap" + + "hicData.RelatedRef\022&\n\005pbRef\030\n \001(\0132\027.grap" + + "hicData.RelatedRef\022&\n\005pcRef\030\013 \001(\0132\027.grap" + + "hicData.RelatedRef\0225\n\017kilometerSystem\030\r " + + "\003(\0132\034.graphicData.KilometerSystem\">\n\017Kil" + + "ometerSystem\022\021\n\tkilometer\030\001 \001(\003\022\030\n\020coord" + + "inateSystem\030\002 \001(\t\"\206\001\n\006Signal\022\'\n\006common\030\001" + + " \001(\0132\027.graphicData.CommonInfo\022\014\n\004code\030\002 " + + "\001(\t\022\016\n\006mirror\030\003 \001(\010\0225\n\017kilometerSystem\030\006" + + " \001(\0132\034.graphicData.KilometerSystem\"\340\001\n\007R" + + "unLine\022\'\n\006common\030\001 \001(\0132\027.graphicData.Com" + + "monInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022." + + "graphicData.Point\022\021\n\tnameColor\030\004 \001(\t\022\023\n\013" + + "nameBgColor\030\005 \001(\t\022\022\n\ncontainSta\030\010 \003(\t\022\025\n" + + "\rlinkPathLines\030\t \003(\t\022\016\n\006lineId\030\n \001(\t\022\027\n\017" + + "dashPointIndexs\030\013 \003(\005\"\337\002\n\007Section\022\'\n\006com" + + "mon\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004co" + + "de\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022.graphicData.P" + + "oint\022&\n\005paRef\030\004 \001(\0132\027.graphicData.Relate" + + "dRef\022&\n\005pbRef\030\005 \001(\0132\027.graphicData.Relate" + + "dRef\0225\n\013sectionType\030\006 \001(\0162 .graphicData." + + "Section.SectionType\022\025\n\raxleCountings\030\007 \003" + + "(\t\022\020\n\010children\030\010 \003(\t\022\027\n\017destinationCode\030" + + "\t \001(\t\"0\n\013SectionType\022\014\n\010Physical\020\000\022\023\n\017Tu" + + "rnoutPhysical\020\002\"i\n\014LogicSection\022\'\n\006commo" + + "n\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004code" + + "\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022.graphicData.Poi" + + "nt\"V\n\016KilometerPoint\022!\n\005point\030\001 \001(\0132\022.gr" + + "aphicData.Point\022\021\n\tkilometer\030\002 \001(\003\022\016\n\006st" + + "Name\030\003 \001(\t\"\277\001\n\010PathLine\022\'\n\006common\030\001 \001(\0132" + + "\027.graphicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"" + + "\n\006points\030\003 \003(\0132\022.graphicData.Point\022\014\n\004is" + + "Up\030\004 \001(\010\0224\n\017kilometerPoints\030\005 \003(\0132\033.grap" + + "hicData.KilometerPoint\022\024\n\014isKmIncrease\030\006" + + " \001(\010\"\366\001\n\nRelatedRef\0226\n\ndeviceType\030\001 \001(\0162" + + "\".graphicData.RelatedRef.DeviceType\022\n\n\002i" + + "d\030\002 \001(\t\0226\n\ndevicePort\030\003 \001(\0162\".graphicDat" + + "a.RelatedRef.DevicePort\"I\n\nDeviceType\022\013\n" + + "\007Section\020\000\022\013\n\007Turnout\020\001\022\017\n\013TrainWindow\020\002" + + "\022\020\n\014AxleCounting\020\003\"!\n\nDevicePort\022\005\n\001A\020\000\022" + + "\005\n\001B\020\001\022\005\n\001C\020\002\"Y\n\tSeparator\022\'\n\006common\030\001 \001" + + "(\0132\027.graphicData.CommonInfo\022\014\n\004code\030\002 \001(" + + "\t\022\025\n\rseparatorType\030\003 \001(\tB8\n!club.joylink" + + ".xiannccda.dto.protosB\023LayoutGraphicsPro" + + "tob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -40209,13 +40967,13 @@ public final class LayoutGraphicsProto { internal_static_graphicData_Platform_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_graphicData_Platform_descriptor, - new java.lang.String[] { "Common", "Code", "Hasdoor", "Direction", }); + new java.lang.String[] { "Common", "Code", "Hasdoor", "Direction", "UpAndDown", "RefStation", }); internal_static_graphicData_Station_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_graphicData_Station_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_graphicData_Station_descriptor, - new java.lang.String[] { "Common", "Code", "HasControl", "ConcentrationStations", "KilometerSystem", }); + new java.lang.String[] { "Common", "Code", "HasControl", "ConcentrationStations", "KilometerSystem", "Name", }); internal_static_graphicData_StationLine_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_graphicData_StationLine_fieldAccessorTable = new @@ -40275,7 +41033,7 @@ public final class LayoutGraphicsProto { internal_static_graphicData_RunLine_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_graphicData_RunLine_descriptor, - new java.lang.String[] { "Common", "Code", "Points", "NameColor", "NameBgColor", "ContainSta", "LinkPathLines", "LineId", }); + new java.lang.String[] { "Common", "Code", "Points", "NameColor", "NameBgColor", "ContainSta", "LinkPathLines", "LineId", "DashPointIndexs", }); internal_static_graphicData_Section_descriptor = getDescriptor().getMessageTypes().get(21); internal_static_graphicData_Section_fieldAccessorTable = new diff --git a/src/main/java/club/joylink/xiannccda/service/LineDeviceStatusService.java b/src/main/java/club/joylink/xiannccda/service/LineDeviceStatusService.java index 986f967..83e7a3e 100644 --- a/src/main/java/club/joylink/xiannccda/service/LineDeviceStatusService.java +++ b/src/main/java/club/joylink/xiannccda/service/LineDeviceStatusService.java @@ -1,13 +1,10 @@ package club.joylink.xiannccda.service; -import club.joylink.xiannccda.ats.message.MessageData; -import club.joylink.xiannccda.ats.message.MessageId; import club.joylink.xiannccda.ats.message.collect.DeviceStatusConvertorManager; import club.joylink.xiannccda.ats.message.collect.convertor.DeviceChangeStatusConvertor; import club.joylink.xiannccda.ats.message.collect.convertor.DeviceInitConvertor; import club.joylink.xiannccda.ats.message.collect.convertor.LineNetTrainInitConvertor; -import club.joylink.xiannccda.ats.message.collect.convertor.LineNetTrainRecordConvertor; import club.joylink.xiannccda.ats.message.collect.convertor.LineNetTrainRemoveConvertor; import club.joylink.xiannccda.ats.message.collect.convertor.LineNetTrainUpdateConvertor; import club.joylink.xiannccda.ats.message.collect.convertor.TrainInitConvertor; @@ -20,10 +17,7 @@ import club.joylink.xiannccda.ws.LineNetMessageServer; import club.joylink.xiannccda.ws.LineTrainMessageServer; import club.joylink.xiannccda.ws.WsMessageServerManager; import jakarta.annotation.PostConstruct; -import java.util.List; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; + import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -47,8 +41,6 @@ public class LineDeviceStatusService { this.createDataConvertor(); // 添加初始化转换方法 DeviceStatusConvertorManager.addStatusConvertor(new LineNetTrainInitConvertor()); - // 列车报点信息转换方法 - DeviceStatusConvertorManager.addStatusConvertor(new LineNetTrainRecordConvertor()); // 列车更新转换方法 DeviceStatusConvertorManager.addStatusConvertor(new LineNetTrainUpdateConvertor()); // 列车删除转换方法 @@ -58,9 +50,6 @@ public class LineDeviceStatusService { wsMessageServerManager.registerMessageServer(new LineNetMessageServer()); wsMessageServerManager.registerMessageServer(new LineTrainMessageServer()); wsMessageServerManager.registerMessageServer(new LineDeviceMessageServer()); - - // 加载数据 - refreshTestData(); } private void createDataConvertor() { @@ -72,34 +61,4 @@ public class LineDeviceStatusService { DeviceStatusConvertorManager.addStatusConvertor(new TrainRecordConvertor()); DeviceStatusConvertorManager.addStatusConvertor(new TrainUpdateConvertor()); } - - public void refreshTestData() { - List allMockData = nccMockDataService.loadAllTrainInitData(); - DeviceStatusConvertorManager.doConvertor(allMockData); - int frequency = 1500, stopTime = 30000; - AtomicLong id = new AtomicLong(0); - AtomicLong resetTimes = new AtomicLong(stopTime); - Executors.newSingleThreadScheduledExecutor() - .scheduleWithFixedDelay( - () -> { - boolean isEmpty = true; - if (resetTimes.get() == stopTime) { // 代表还没有停顿,不相等说明已经进入空循环 - List updateMockData = - nccMockDataService.loadUpdateData(id, MessageId.TRAIN_RECORD.name(), 2); - DeviceStatusConvertorManager.doConvertor(updateMockData); - isEmpty = updateMockData.size() == 0; - } - if (isEmpty) { // 假数据已经用完了,开始重复使用,中间停顿30000ms - if (resetTimes.get() <= 0) { - id.set(0); - resetTimes.set(stopTime); - } else { - resetTimes.set(resetTimes.get() - frequency); - } - } - }, - frequency, - frequency, - TimeUnit.MILLISECONDS); - } } diff --git a/xian-ncc-da-message b/xian-ncc-da-message index 90b6f46..4f27cc3 160000 --- a/xian-ncc-da-message +++ b/xian-ncc-da-message @@ -1 +1 @@ -Subproject commit 90b6f4600e531c496d849163653acb80c6e933ea +Subproject commit 4f27cc3670bcb4071706bb0e66d6fdfd817e27a4