+ getBbConnectList() {
+ return ((bitField0_ & 0x00000001) != 0) ?
+ java.util.Collections.unmodifiableList(bbConnect_) : bbConnect_;
+ }
+ /**
+ *
+ *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+ *
+ *
+ * repeated uint32 bbConnect = 1;
+ * @return The count of bbConnect.
+ */
+ public int getBbConnectCount() {
+ return bbConnect_.size();
+ }
+ /**
+ *
+ *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+ *
+ *
+ * repeated uint32 bbConnect = 1;
+ * @param index The index of the element to return.
+ * @return The bbConnect at the given index.
+ */
+ public int getBbConnect(int index) {
+ return bbConnect_.getInt(index);
+ }
+ /**
+ *
+ *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+ *
+ *
+ * repeated uint32 bbConnect = 1;
+ * @param index The index to set the value at.
+ * @param value The bbConnect to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBbConnect(
+ int index, int value) {
+
+ ensureBbConnectIsMutable();
+ bbConnect_.setInt(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+ *
+ *
+ * repeated uint32 bbConnect = 1;
+ * @param value The bbConnect to add.
+ * @return This builder for chaining.
+ */
+ public Builder addBbConnect(int value) {
+
+ ensureBbConnectIsMutable();
+ bbConnect_.addInt(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+ *
+ *
+ * repeated uint32 bbConnect = 1;
+ * @param values The bbConnect to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllBbConnect(
+ java.lang.Iterable extends java.lang.Integer> values) {
+ ensureBbConnectIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, bbConnect_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+ *
+ *
+ * repeated uint32 bbConnect = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearBbConnect() {
+ bbConnect_ = emptyIntList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.IntList noGenerateGroup_ = emptyIntList();
+ private void ensureNoGenerateGroupIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ noGenerateGroup_ = mutableCopy(noGenerateGroup_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @return A list containing the noGenerateGroup.
+ */
+ public java.util.List
+ getNoGenerateGroupList() {
+ return ((bitField0_ & 0x00000002) != 0) ?
+ java.util.Collections.unmodifiableList(noGenerateGroup_) : noGenerateGroup_;
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @return The count of noGenerateGroup.
+ */
+ public int getNoGenerateGroupCount() {
+ return noGenerateGroup_.size();
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @param index The index of the element to return.
+ * @return The noGenerateGroup at the given index.
+ */
+ public int getNoGenerateGroup(int index) {
+ return noGenerateGroup_.getInt(index);
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @param index The index to set the value at.
+ * @param value The noGenerateGroup to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNoGenerateGroup(
+ int index, int value) {
+
+ ensureNoGenerateGroupIsMutable();
+ noGenerateGroup_.setInt(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @param value The noGenerateGroup to add.
+ * @return This builder for chaining.
+ */
+ public Builder addNoGenerateGroup(int value) {
+
+ ensureNoGenerateGroupIsMutable();
+ noGenerateGroup_.addInt(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @param values The noGenerateGroup to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllNoGenerateGroup(
+ java.lang.Iterable extends java.lang.Integer> values) {
+ ensureNoGenerateGroupIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, noGenerateGroup_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *指定的道岔组不生成计轴
+ *
+ *
+ * repeated uint32 noGenerateGroup = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearNoGenerateGroup() {
+ noGenerateGroup_ = emptyIntList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:graphicData.GenerateAxleCountingConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:graphicData.GenerateAxleCountingConfig)
+ private static final club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig();
+ }
+
+ public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GenerateAxleCountingConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_graphicData_RtssGraphicStorage_descriptor;
private static final
@@ -47243,6 +48354,11 @@ public final class LayoutGraphicsProto {
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_graphicData_Separator_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_graphicData_GenerateAxleCountingConfig_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_graphicData_GenerateAxleCountingConfig_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -47253,7 +48369,7 @@ public final class LayoutGraphicsProto {
static {
java.lang.String[] descriptorData = {
"\n\033stationLayoutGraphics.proto\022\013graphicDa" +
- "ta\"\361\006\n\022RtssGraphicStorage\022#\n\006canvas\030\001 \001(" +
+ "ta\"\276\007\n\022RtssGraphicStorage\022#\n\006canvas\030\001 \001(" +
"\0132\023.graphicData.Canvas\022 \n\005links\030\002 \003(\0132\021." +
"graphicData.Link\022&\n\010iscsFans\030\003 \003(\0132\024.gra" +
"phicData.IscsFan\022(\n\tPlatforms\030\004 \003(\0132\025.gr" +
@@ -47275,127 +48391,131 @@ public final class LayoutGraphicsProto {
"\0220\n\rlogicSections\030\023 \003(\0132\031.graphicData.Lo" +
"gicSection\022J\n\032concentrationDividingLines" +
"\030\024 \003(\0132&.graphicData.ConcentrationDividi" +
- "ngLine\"s\n\006Canvas\022\r\n\005width\030\001 \001(\005\022\016\n\006heigh" +
- "t\030\002 \001(\005\022\027\n\017backgroundColor\030\003 \001(\t\0221\n\021view" +
- "portTransform\030\004 \001(\0132\026.graphicData.Transf" +
- "orm\"\035\n\005Point\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\210\001\n\tT" +
- "ransform\022$\n\010position\030\001 \001(\0132\022.graphicData" +
- ".Point\022!\n\005scale\030\002 \001(\0132\022.graphicData.Poin" +
- "t\022\020\n\010rotation\030\003 \001(\002\022 \n\004skew\030\004 \001(\0132\022.grap" +
- "hicData.Point\"I\n\016ChildTransform\022\014\n\004name\030" +
- "\001 \001(\t\022)\n\ttransform\030\002 \001(\0132\026.graphicData.T" +
- "ransform\"\235\001\n\nCommonInfo\022\r\n\005oldid\030\001 \001(\t\022\023" +
- "\n\013graphicType\030\002 \001(\t\022)\n\ttransform\030\003 \001(\0132\026" +
- ".graphicData.Transform\0224\n\017childTransform" +
- "s\030\004 \003(\0132\033.graphicData.ChildTransform\022\n\n\002" +
- "id\030\005 \001(\r\"\255\001\n\004Link\022\'\n\006common\030\001 \001(\0132\027.grap" +
- "hicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\r\n\005curv" +
- "e\030\003 \001(\010\022\025\n\rsegmentsCount\030\004 \001(\005\022\021\n\tlineWi" +
- "dth\030\005 \001(\005\022\021\n\tlineColor\030\006 \001(\t\022\"\n\006points\030\007" +
- " \003(\0132\022.graphicData.Point\"\265\001\n\004Rect\022\'\n\006com" +
- "mon\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004co" +
- "de\030\002 \001(\t\022\021\n\tlineWidth\030\003 \001(\005\022\021\n\tlineColor" +
- "\030\004 \001(\t\022\r\n\005width\030\005 \001(\002\022\016\n\006height\030\006 \001(\002\022\016\n" +
- "\006radius\030\007 \001(\005\022!\n\005point\030\010 \001(\0132\022.graphicDa" +
- "ta.Point\"\212\001\n\007Polygon\022\'\n\006common\030\001 \001(\0132\027.g" +
- "raphicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\021\n\tl" +
- "ineWidth\030\003 \001(\005\022\021\n\tlineColor\030\004 \001(\t\022\"\n\006poi" +
- "nts\030\005 \003(\0132\022.graphicData.Point\"\312\002\n\031Concen" +
- "trationDividingLine\022\'\n\006common\030\001 \001(\0132\027.gr" +
- "aphicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006po" +
- "ints\030\003 \003(\0132\022.graphicData.Point\022\033\n\023oldref" +
- "LeftStationId\030\004 \001(\t\022\034\n\024oldrefRightStatio" +
- "nId\030\005 \001(\t\0224\n\017nodeConWithSecs\030\006 \003(\0132\033.gra" +
- "phicData.NodeConWithSec\022,\n$isOtherLineCo" +
- "ncentrationDividingLine\030\007 \001(\010\022\030\n\020refLeft" +
- "StationId\030\010 \001(\r\022\031\n\021refRightStationId\030\t \001" +
- "(\r\"m\n\016NodeConWithSec\022,\n\013leftSection\030\001 \001(" +
- "\0132\027.graphicData.RelatedRef\022-\n\014rightSecti" +
- "on\030\002 \001(\0132\027.graphicData.RelatedRef\"\351\001\n\010Pl" +
- "atform\022\'\n\006common\030\001 \001(\0132\027.graphicData.Com" +
- "monInfo\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\025\n\roldrefStation\030\006 \001(\t" +
- "\022\n\n\002up\030\007 \001(\010\022\027\n\017oldrefSectionId\030\010 \001(\t\022\022\n" +
- "\nrefStation\030\t \001(\r\022\024\n\014refSectionId\030\n \001(\r\022" +
- "\034\n\024centralizedStationId\030\013 \001(\r\"\340\001\n\007Statio" +
- "n\022\'\n\006common\030\001 \001(\0132\027.graphicData.CommonIn" +
- "fo\022\014\n\004code\030\002 \001(\t\022\022\n\nhasControl\030\003 \001(\010\022\035\n\025" +
- "concentrationStations\030\004 \001(\010\0225\n\017kilometer" +
- "System\030\006 \001(\0132\034.graphicData.KilometerSyst" +
- "em\022\014\n\004name\030\007 \001(\t\022\026\n\016manageStations\030\010 \003(\r" +
- "\022\016\n\006depots\030\t \001(\010\"\313\001\n\013StationLine\022\'\n\006comm" +
- "on\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004cod" +
- "e\030\002 \001(\t\022\023\n\013hasTransfer\030\003 \001(\010\022\020\n\010hideName" +
- "\030\004 \001(\010\0228\n\tcodeColor\030\005 \001(\0162%.graphicData." +
- "StationLine.stationColor\"$\n\014stationColor" +
- "\022\n\n\006orange\020\000\022\010\n\004gray\020\001\"q\n\013TrainWindow\022\'\n" +
- "\006common\030\001 \001(\0132\027.graphicData.CommonInfo\022\014" +
- "\n\004code\030\002 \001(\t\022\026\n\016oldrefDeviceId\030\003 \003(\t\022\023\n\013" +
- "refDeviceId\030\004 \003(\r\"\256\001\n\014AxleCounting\022\'\n\006co" +
+ "ngLine\022K\n\032generateAxleCountingConfig\030\025 \001" +
+ "(\0132\'.graphicData.GenerateAxleCountingCon" +
+ "fig\"s\n\006Canvas\022\r\n\005width\030\001 \001(\005\022\016\n\006height\030\002" +
+ " \001(\005\022\027\n\017backgroundColor\030\003 \001(\t\0221\n\021viewpor" +
+ "tTransform\030\004 \001(\0132\026.graphicData.Transform" +
+ "\"\035\n\005Point\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\210\001\n\tTran" +
+ "sform\022$\n\010position\030\001 \001(\0132\022.graphicData.Po" +
+ "int\022!\n\005scale\030\002 \001(\0132\022.graphicData.Point\022\020" +
+ "\n\010rotation\030\003 \001(\002\022 \n\004skew\030\004 \001(\0132\022.graphic" +
+ "Data.Point\"I\n\016ChildTransform\022\014\n\004name\030\001 \001" +
+ "(\t\022)\n\ttransform\030\002 \001(\0132\026.graphicData.Tran" +
+ "sform\"\235\001\n\nCommonInfo\022\r\n\005oldid\030\001 \001(\t\022\023\n\013g" +
+ "raphicType\030\002 \001(\t\022)\n\ttransform\030\003 \001(\0132\026.gr" +
+ "aphicData.Transform\0224\n\017childTransforms\030\004" +
+ " \003(\0132\033.graphicData.ChildTransform\022\n\n\002id\030" +
+ "\005 \001(\r\"\255\001\n\004Link\022\'\n\006common\030\001 \001(\0132\027.graphic" +
+ "Data.CommonInfo\022\014\n\004code\030\002 \001(\t\022\r\n\005curve\030\003" +
+ " \001(\010\022\025\n\rsegmentsCount\030\004 \001(\005\022\021\n\tlineWidth" +
+ "\030\005 \001(\005\022\021\n\tlineColor\030\006 \001(\t\022\"\n\006points\030\007 \003(" +
+ "\0132\022.graphicData.Point\"\265\001\n\004Rect\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\r\n\005width\030\005 \001(\002\022\016\n\006height\030\006 \001(\002\022\016\n\006ra" +
+ "dius\030\007 \001(\005\022!\n\005point\030\010 \001(\0132\022.graphicData." +
+ "Point\"\212\001\n\007Polygon\022\'\n\006common\030\001 \001(\0132\027.grap" +
+ "hicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\021\n\tline" +
+ "Width\030\003 \001(\005\022\021\n\tlineColor\030\004 \001(\t\022\"\n\006points" +
+ "\030\005 \003(\0132\022.graphicData.Point\"\312\002\n\031Concentra" +
+ "tionDividingLine\022\'\n\006common\030\001 \001(\0132\027.graph" +
+ "icData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006point" +
+ "s\030\003 \003(\0132\022.graphicData.Point\022\033\n\023oldrefLef" +
+ "tStationId\030\004 \001(\t\022\034\n\024oldrefRightStationId" +
+ "\030\005 \001(\t\0224\n\017nodeConWithSecs\030\006 \003(\0132\033.graphi" +
+ "cData.NodeConWithSec\022,\n$isOtherLineConce" +
+ "ntrationDividingLine\030\007 \001(\010\022\030\n\020refLeftSta" +
+ "tionId\030\010 \001(\r\022\031\n\021refRightStationId\030\t \001(\r\"" +
+ "m\n\016NodeConWithSec\022,\n\013leftSection\030\001 \001(\0132\027" +
+ ".graphicData.RelatedRef\022-\n\014rightSection\030" +
+ "\002 \001(\0132\027.graphicData.RelatedRef\"\351\001\n\010Platf" +
+ "orm\022\'\n\006common\030\001 \001(\0132\027.graphicData.Common" +
+ "Info\022\014\n\004code\030\002 \001(\t\022\017\n\007hasdoor\030\003 \001(\010\022\021\n\td" +
+ "irection\030\004 \001(\t\022\025\n\roldrefStation\030\006 \001(\t\022\n\n" +
+ "\002up\030\007 \001(\010\022\027\n\017oldrefSectionId\030\010 \001(\t\022\022\n\nre" +
+ "fStation\030\t \001(\r\022\024\n\014refSectionId\030\n \001(\r\022\034\n\024" +
+ "centralizedStationId\030\013 \001(\r\"\340\001\n\007Station\022\'" +
+ "\n\006common\030\001 \001(\0132\027.graphicData.CommonInfo\022" +
+ "\014\n\004code\030\002 \001(\t\022\022\n\nhasControl\030\003 \001(\010\022\035\n\025con" +
+ "centrationStations\030\004 \001(\010\0225\n\017kilometerSys" +
+ "tem\030\006 \001(\0132\034.graphicData.KilometerSystem\022" +
+ "\014\n\004name\030\007 \001(\t\022\026\n\016manageStations\030\010 \003(\r\022\016\n" +
+ "\006depots\030\t \001(\010\"\313\001\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\0228\n\tcodeColor\030\005 \001(\0162%.graphicData.Sta" +
+ "tionLine.stationColor\"$\n\014stationColor\022\n\n" +
+ "\006orange\020\000\022\010\n\004gray\020\001\"q\n\013TrainWindow\022\'\n\006co" +
"mmon\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004c" +
- "ode\030\002 \001(\t\0225\n\017kilometerSystem\030\003 \001(\0132\034.gra" +
- "phicData.KilometerSystem\0220\n\017axleCounting" +
- "Ref\030\004 \003(\0132\027.graphicData.RelatedRef\">\n\005Tr" +
- "ain\022\'\n\006common\030\001 \001(\0132\027.graphicData.Common" +
- "Info\022\014\n\004code\030\002 \001(\t\"B\n\tTrainLine\022\'\n\006commo" +
+ "ode\030\002 \001(\t\022\026\n\016oldrefDeviceId\030\003 \003(\t\022\023\n\013ref" +
+ "DeviceId\030\004 \003(\r\"\256\001\n\014AxleCounting\022\'\n\006commo" +
"n\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.grap" +
- "hicData.CommonInfo\022\014\n\004code\030\002 \001(\t\"\371\002\n\007Tur" +
- "nout\022\'\n\006common\030\001 \001(\0132\027.graphicData.Commo" +
- "nInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006pointA\030\006 \003(\0132\022.gr" +
- "aphicData.Point\022\"\n\006pointB\030\007 \003(\0132\022.graphi" +
- "cData.Point\022\"\n\006pointC\030\010 \003(\0132\022.graphicDat" +
- "a.Point\022&\n\005paRef\030\t \001(\0132\027.graphicData.Rel" +
- "atedRef\022&\n\005pbRef\030\n \001(\0132\027.graphicData.Rel" +
- "atedRef\022&\n\005pcRef\030\013 \001(\0132\027.graphicData.Rel" +
- "atedRef\0225\n\017kilometerSystem\030\r \003(\0132\034.graph" +
- "icData.KilometerSystem\022\034\n\024centralizedSta" +
- "tionId\030\016 \001(\r\">\n\017KilometerSystem\022\021\n\tkilom" +
- "eter\030\001 \001(\003\022\030\n\020coordinateSystem\030\002 \001(\t\"\320\001\n" +
- "\006Signal\022\'\n\006common\030\001 \001(\0132\027.graphicData.Co" +
- "mmonInfo\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.Ki" +
- "lometerSystem\022*\n\trefDevice\030\007 \001(\0132\027.graph" +
- "icData.RelatedRef\022\034\n\024centralizedStationI" +
- "d\030\010 \001(\r\"\246\002\n\007RunLine\022\'\n\006common\030\001 \001(\0132\027.gr" +
+ "\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" +
+ " \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\"\371\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\022\034\n\024centralizedStatio" +
+ "nId\030\016 \001(\r\">\n\017KilometerSystem\022\021\n\tkilomete" +
+ "r\030\001 \001(\003\022\030\n\020coordinateSystem\030\002 \001(\t\"\320\001\n\006Si" +
+ "gnal\022\'\n\006common\030\001 \001(\0132\027.graphicData.Commo" +
+ "nInfo\022\014\n\004code\030\002 \001(\t\022\016\n\006mirror\030\003 \001(\010\0225\n\017k" +
+ "ilometerSystem\030\006 \001(\0132\034.graphicData.Kilom" +
+ "eterSystem\022*\n\trefDevice\030\007 \001(\0132\027.graphicD" +
+ "ata.RelatedRef\022\034\n\024centralizedStationId\030\010" +
+ " \001(\r\"\246\002\n\007RunLine\022\'\n\006common\030\001 \001(\0132\027.graph" +
+ "icData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006point" +
+ "s\030\003 \003(\0132\022.graphicData.Point\022\021\n\tnameColor" +
+ "\030\004 \001(\t\022\023\n\013nameBgColor\030\005 \001(\t\022\022\n\ncontainSt" +
+ "a\030\010 \003(\t\022\030\n\020oldlinkPathLines\030\t \003(\t\022\016\n\006lin" +
+ "eId\030\n \001(\t\022\027\n\017dashPointIndexs\030\013 \003(\005\022\027\n\017gr" +
+ "ayPointIndexs\030\014 \003(\005\022\021\n\tlineColor\030\r \001(\t\022\025" +
+ "\n\rlinkPathLines\030\016 \003(\r\"\243\003\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\023\n\013oldchildren\030\010 \003(\t\022\027\n\017destinationCo" +
+ "de\030\t \001(\t\022\017\n\007turning\030\n \001(\010\022\020\n\010children\030\013 " +
+ "\003(\r\022\034\n\024centralizedStationId\030\014 \001(\r\"0\n\013Sec" +
+ "tionType\022\014\n\010Physical\020\000\022\023\n\017TurnoutPhysica" +
+ "l\020\002\"i\n\014LogicSection\022\'\n\006common\030\001 \001(\0132\027.gr" +
"aphicData.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006po" +
- "ints\030\003 \003(\0132\022.graphicData.Point\022\021\n\tnameCo" +
- "lor\030\004 \001(\t\022\023\n\013nameBgColor\030\005 \001(\t\022\022\n\ncontai" +
- "nSta\030\010 \003(\t\022\030\n\020oldlinkPathLines\030\t \003(\t\022\016\n\006" +
- "lineId\030\n \001(\t\022\027\n\017dashPointIndexs\030\013 \003(\005\022\027\n" +
- "\017grayPointIndexs\030\014 \003(\005\022\021\n\tlineColor\030\r \001(" +
- "\t\022\025\n\rlinkPathLines\030\016 \003(\r\"\243\003\n\007Section\022\'\n\006" +
- "common\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n" +
- "\004code\030\002 \001(\t\022\"\n\006points\030\003 \003(\0132\022.graphicDat" +
- "a.Point\022&\n\005paRef\030\004 \001(\0132\027.graphicData.Rel" +
- "atedRef\022&\n\005pbRef\030\005 \001(\0132\027.graphicData.Rel" +
- "atedRef\0225\n\013sectionType\030\006 \001(\0162 .graphicDa" +
- "ta.Section.SectionType\022\025\n\raxleCountings\030" +
- "\007 \003(\t\022\023\n\013oldchildren\030\010 \003(\t\022\027\n\017destinatio" +
- "nCode\030\t \001(\t\022\017\n\007turning\030\n \001(\010\022\020\n\010children" +
- "\030\013 \003(\r\022\034\n\024centralizedStationId\030\014 \001(\r\"0\n\013" +
- "SectionType\022\014\n\010Physical\020\000\022\023\n\017TurnoutPhys" +
- "ical\020\002\"i\n\014LogicSection\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\"V\n\016Kil" +
- "ometerPoint\022!\n\005point\030\001 \001(\0132\022.graphicData" +
- ".Point\022\021\n\tkilometer\030\002 \001(\003\022\016\n\006stName\030\003 \001(" +
- "\t\"\277\001\n\010PathLine\022\'\n\006common\030\001 \001(\0132\027.graphic" +
- "Data.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006points\030" +
- "\003 \003(\0132\022.graphicData.Point\022\014\n\004isUp\030\004 \001(\010\022" +
- "4\n\017kilometerPoints\030\005 \003(\0132\033.graphicData.K" +
- "ilometerPoint\022\024\n\014isKmIncrease\030\006 \001(\010\"\205\002\n\n" +
- "RelatedRef\0226\n\ndeviceType\030\001 \001(\0162\".graphic" +
- "Data.RelatedRef.DeviceType\022\r\n\005oldid\030\002 \001(" +
- "\t\0226\n\ndevicePort\030\003 \001(\0162\".graphicData.Rela" +
- "tedRef.DevicePort\022\n\n\002id\030\004 \001(\r\"I\n\nDeviceT" +
- "ype\022\013\n\007Section\020\000\022\013\n\007Turnout\020\001\022\017\n\013TrainWi" +
- "ndow\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\006comm" +
- "on\030\001 \001(\0132\027.graphicData.CommonInfo\022\014\n\004cod" +
- "e\030\002 \001(\t\022\025\n\rseparatorType\030\003 \001(\tB8\n!club.j" +
- "oylink.xiannccda.dto.protosB\023LayoutGraph" +
- "icsProtob\006proto3"
+ "ints\030\003 \003(\0132\022.graphicData.Point\"V\n\016Kilome" +
+ "terPoint\022!\n\005point\030\001 \001(\0132\022.graphicData.Po" +
+ "int\022\021\n\tkilometer\030\002 \001(\003\022\016\n\006stName\030\003 \001(\t\"\277" +
+ "\001\n\010PathLine\022\'\n\006common\030\001 \001(\0132\027.graphicDat" +
+ "a.CommonInfo\022\014\n\004code\030\002 \001(\t\022\"\n\006points\030\003 \003" +
+ "(\0132\022.graphicData.Point\022\014\n\004isUp\030\004 \001(\010\0224\n\017" +
+ "kilometerPoints\030\005 \003(\0132\033.graphicData.Kilo" +
+ "meterPoint\022\024\n\014isKmIncrease\030\006 \001(\010\"\205\002\n\nRel" +
+ "atedRef\0226\n\ndeviceType\030\001 \001(\0162\".graphicDat" +
+ "a.RelatedRef.DeviceType\022\r\n\005oldid\030\002 \001(\t\0226" +
+ "\n\ndevicePort\030\003 \001(\0162\".graphicData.Related" +
+ "Ref.DevicePort\022\n\n\002id\030\004 \001(\r\"I\n\nDeviceType" +
+ "\022\013\n\007Section\020\000\022\013\n\007Turnout\020\001\022\017\n\013TrainWindo" +
+ "w\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(\t\"H\n\032GenerateA" +
+ "xleCountingConfig\022\021\n\tbbConnect\030\001 \003(\r\022\027\n\017" +
+ "noGenerateGroup\030\002 \003(\rB8\n!club.joylink.xi" +
+ "annccda.dto.protosB\023LayoutGraphicsProtob" +
+ "\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@@ -47406,7 +48526,7 @@ public final class LayoutGraphicsProto {
internal_static_graphicData_RtssGraphicStorage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_graphicData_RtssGraphicStorage_descriptor,
- new java.lang.String[] { "Canvas", "Links", "IscsFans", "Platforms", "Stations", "Rects", "Train", "Signals", "Turnouts", "Section", "StationLines", "RunLines", "TrainLines", "PathLines", "Polygons", "TrainWindows", "AxleCountings", "Separators", "LogicSections", "ConcentrationDividingLines", });
+ new java.lang.String[] { "Canvas", "Links", "IscsFans", "Platforms", "Stations", "Rects", "Train", "Signals", "Turnouts", "Section", "StationLines", "RunLines", "TrainLines", "PathLines", "Polygons", "TrainWindows", "AxleCountings", "Separators", "LogicSections", "ConcentrationDividingLines", "GenerateAxleCountingConfig", });
internal_static_graphicData_Canvas_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_graphicData_Canvas_fieldAccessorTable = new
@@ -47575,6 +48695,12 @@ public final class LayoutGraphicsProto {
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_graphicData_Separator_descriptor,
new java.lang.String[] { "Common", "Code", "SeparatorType", });
+ internal_static_graphicData_GenerateAxleCountingConfig_descriptor =
+ getDescriptor().getMessageTypes().get(29);
+ internal_static_graphicData_GenerateAxleCountingConfig_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_graphicData_GenerateAxleCountingConfig_descriptor,
+ new java.lang.String[] { "BbConnect", "NoGenerateGroup", });
}
// @@protoc_insertion_point(outer_class_scope)
diff --git a/src/main/java/club/joylink/xiannccda/mock/message/occ/MockOccServer.java b/src/main/java/club/joylink/xiannccda/mock/message/occ/MockOccServer.java
index f4f0286..7849749 100644
--- a/src/main/java/club/joylink/xiannccda/mock/message/occ/MockOccServer.java
+++ b/src/main/java/club/joylink/xiannccda/mock/message/occ/MockOccServer.java
@@ -184,6 +184,11 @@ public class MockOccServer {
Integer stationId = DeviceStatusDataOperate.findFieldVal(mb, "centralizedStationId", Integer.class);
System.out.println(mb);
return this.findRtuStation(lineId, stationId);
+ } else if (alertType == AlertType.PLATFORM_EMERG_STOP) {
+ MessageOrBuilder mb = LineGraphicDataRepository.getDeviceByCode(lineId, deviceName);
+ System.out.println(mb);
+ Integer stationId = DeviceStatusDataOperate.findFieldVal(mb, "centralizedStationId", Integer.class);
+ return this.findRtuStation(lineId, stationId);
}
return null;
}
diff --git a/src/main/java/club/joylink/xiannccda/service/AlertMockService.java b/src/main/java/club/joylink/xiannccda/service/AlertMockService.java
index 5d15357..7a12e5b 100644
--- a/src/main/java/club/joylink/xiannccda/service/AlertMockService.java
+++ b/src/main/java/club/joylink/xiannccda/service/AlertMockService.java
@@ -12,9 +12,11 @@ import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataOperate;
import club.joylink.xiannccda.ats.message.collect.datasource.AbstractData;
import club.joylink.xiannccda.ats.message.collect.datasource.DeviceStatusData;
import club.joylink.xiannccda.ats.message.convertor.DeviceStatusConvertor;
+import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
import club.joylink.xiannccda.constants.SystemContext;
import club.joylink.xiannccda.dto.mock.show.BlueAlertMockDTO;
import club.joylink.xiannccda.dto.mock.show.NewAlertMockDTO.DeviceNameInfo;
+import club.joylink.xiannccda.dto.mock.show.PlatformEBDTO;
import club.joylink.xiannccda.dto.mock.test.AlertMockDTO;
import club.joylink.xiannccda.dto.mock.show.NewAlertMockDTO;
import club.joylink.xiannccda.dto.mock.show.OrangeAlertMockDTO;
@@ -113,6 +115,10 @@ public class AlertMockService {
}
}
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotTrue(!sb.isEmpty(), sb.toString());
+ } else if (alertType == AlertType.PLATFORM_EMERG_STOP) {
+ for (DeviceNameInfo deviceInfo : mockDTO.getDeviceInfos()) {
+ deviceInfo.setDeviceType(DeviceType.DEVICE_TYPE_PLATFORM);
+ }
}
mockDTO.setAlertType(alertType);
@@ -139,6 +145,9 @@ public class AlertMockService {
case TRAIN_EB_ATP -> {
return TrainSignlaAlertMockDTO.class;
}
+ case PLATFORM_EMERG_STOP -> {
+ return PlatformEBDTO.class;
+ }
default -> throw new IllegalStateException("Unexpected value: " + alertType);
}
}
@@ -233,6 +242,11 @@ public class AlertMockService {
return this.alertInfoService.createAlert(AlertType.TRAIN_EB_ATP, AlertDeviceType.DEVICE_TYPE_TRACK, commonInfo.getId(), track, "测试车组号", AlertDeviceType.DEVICE_TYPE_TRAIN, true);
}
+ /* case PLATFORM_EMERG_STOP -> {
+ MessageOrBuilder msg = LineGraphicDataRepository.getDeviceByCode(lineId, dto.getFrist());
+ DeviceStatusProto.Platform.Builder pb = DeviceStatusProto.Platform.newBuilder();
+ pb.setId(dto.getFrist());
+ }*/
default -> throw new IllegalStateException("Unexpected value: " + dto.getAlertType());
}
}
diff --git a/src/main/java/club/joylink/xiannccda/task/InitTask.java b/src/main/java/club/joylink/xiannccda/task/InitTask.java
index 3431a74..f818b54 100644
--- a/src/main/java/club/joylink/xiannccda/task/InitTask.java
+++ b/src/main/java/club/joylink/xiannccda/task/InitTask.java
@@ -7,6 +7,7 @@ import club.joylink.xiannccda.repository.IAuthRoleRepository;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -45,12 +46,14 @@ public class InitTask implements ApplicationRunner {
public void run(ApplicationArguments args) throws Exception {
Map initRoleMap = this.staticInitialData();
QueryWrapper qw = new QueryWrapper<>();
- qw.lambda().in(AuthRole::getName, List.of(initRoleMap.keySet()));
-// List authRoles = this.authRoleRepository.list(qw);
+ qw.lambda().in(AuthRole::getName, List.of(initRoleMap.keySet().toArray()));
+ List authRoles = this.authRoleRepository.list(qw);
+
initRoleMap.forEach((k, v) -> {
-
- v.setRoleConfigStr(JSON.toJSONString(v.tmpRoleConfig()));
- this.authRoleRepository.saveOrUpdate(v);
+ if (authRoles.stream().filter(d -> StringUtils.equals(d.getName(), k)).findFirst().isEmpty()) {
+ v.setRoleConfigStr(JSON.toJSONString(v.tmpRoleConfig()));
+ this.authRoleRepository.saveOrUpdate(v);
+ }
});
}
}
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 09223fa..8c59d96 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -21,7 +21,6 @@ occ-client:
server-host: 127.0.0.1
real-port: 2603
un-real-port: 5703
- line-id: 3
collector-data: false
monitor-handware-change: false
receiveMsgTimeout: 6
@@ -32,6 +31,20 @@ occ-client:
lineTypes:
- OCC
- NCC
+ 4:
+ nameChanger: NONE
+ server-host: 10.254.12.45
+ real-port: 3604
+ un-real-port: 3704
+ collector-data: true
+ monitor-handware-change: false
+ receiveMsgTimeout: 6
+ filterRtuIds:
+ - 10
+ - 11
+ lineTypes:
+ - OCC
+ - NCC
#故障测试
mock-alert-test: false
diff --git a/src/main/resources/application-local-test.yml b/src/main/resources/application-local-test.yml
index 1535829..3ff0d34 100644
--- a/src/main/resources/application-local-test.yml
+++ b/src/main/resources/application-local-test.yml
@@ -19,7 +19,7 @@ occ-client:
server-host: 127.0.0.1
real-port: 2603
un-real-port: 5703
- line-id: 3
+
collector-data: false
monitor-handware-change: false
receiveMsgTimeout: 6
@@ -29,6 +29,20 @@ occ-client:
lineTypes:
- OCC
- NCC
+ 4:
+ nameChanger: NONE
+ server-host: 10.254.12.45
+ real-port: 3604
+ un-real-port: 3704
+ collector-data: true
+ monitor-handware-change: false
+ receiveMsgTimeout: 6
+ filterRtuIds:
+ - 10
+ - 11
+ lineTypes:
+ - OCC
+ - NCC
#故障测试
mock-alert-test: true
#加载历史模拟数据
diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml
index 0ca32a1..9b67b68 100644
--- a/src/main/resources/application-local.yml
+++ b/src/main/resources/application-local.yml
@@ -21,7 +21,6 @@ occ-client:
server-host: 127.0.0.1
real-port: 2603
un-real-port: 5703
- line-id: 3
collector-data: false
monitor-handware-change: false
receiveMsgTimeout: 6
@@ -32,7 +31,20 @@ occ-client:
lineTypes:
- OCC
- NCC
-
+ 4:
+ nameChanger: NONE
+ server-host: 10.254.12.45
+ real-port: 3604
+ un-real-port: 3704
+ collector-data: true
+ monitor-handware-change: false
+ receiveMsgTimeout: 6
+ filterRtuIds:
+ - 10
+ - 11
+ lineTypes:
+ - OCC
+ - NCC
mock-alert-test: true
load-mock-history-data: false
diff --git a/src/main/resources/application-master.yml b/src/main/resources/application-master.yml
index b1a3ebf..fdb9895 100644
--- a/src/main/resources/application-master.yml
+++ b/src/main/resources/application-master.yml
@@ -4,6 +4,9 @@ spring:
url: jdbc:mysql://192.168.53.11:3306/xian-ncc-da?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&autoReconnect=true&maxReconnets=10&initialTimeout=10
username: root
password: joylink0503
+ #url: jdbc:mysql://127.0.0.1:3306/xian-ncc-da?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&autoReconnect=true&maxReconnets=10&initialTimeout=10
+# username: root
+# password: root
spring-doc:
packages-to-scan: club.joylink.xiannccda.controller
swagger-ui:
@@ -35,6 +38,20 @@ occ-client:
lineTypes:
- OCC
- NCC
+ 4:
+ nameChanger: NONE
+ server-host: 10.254.12.45
+ real-port: 3604
+ un-real-port: 3704
+ collector-data: true
+ monitor-handware-change: false
+ receiveMsgTimeout: 6
+ filterRtuIds:
+ - 10
+ - 11
+ lineTypes:
+ - OCC
+ - NCC
mock-alert-test: false
load-mock-history-data: false
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index b99ee4a..a2dde28 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -1,7 +1,7 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.3.233:3306/xian-ncc-da?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
+ url: jdbc:mysql://192.168.33.233:3306/xian-ncc-da?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: joylink0503
spring-doc:
@@ -32,6 +32,20 @@ occ-client:
lineTypes:
- OCC
- NCC
+ 4:
+ nameChanger: NONE
+ server-host: 10.254.12.45
+ real-port: 3604
+ un-real-port: 3704
+ collector-data: true
+ monitor-handware-change: false
+ receiveMsgTimeout: 6
+ filterRtuIds:
+ - 10
+ - 11
+ lineTypes:
+ - OCC
+ - NCC
mock-alert-test: false
load-mock-history-data: false
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
index dd40c1b..e08ea2c 100644
--- a/src/main/resources/application-test.yml
+++ b/src/main/resources/application-test.yml
@@ -28,7 +28,7 @@ occ-client:
server-host: 127.0.0.1
real-port: 2603
un-real-port: 5703
- line-id: 3
+
collector-data: false
monitor-handware-change: false
receiveMsgTimeout: 6
@@ -38,6 +38,20 @@ occ-client:
lineTypes:
- OCC
- NCC
+ 4:
+ nameChanger: NONE
+ server-host: 10.254.12.45
+ real-port: 3604
+ un-real-port: 3704
+ collector-data: true
+ monitor-handware-change: false
+ receiveMsgTimeout: 6
+ filterRtuIds:
+ - 10
+ - 11
+ lineTypes:
+ - OCC
+ - NCC
mock-alert-test: true
load-mock-history-data: false
#延时加载告警处理
diff --git a/src/test/java/club/joylink/xiannccda/device/DeviceStatusCheckTest.java b/src/test/java/club/joylink/xiannccda/device/DeviceStatusCheckTest.java
index f3f4753..b135788 100644
--- a/src/test/java/club/joylink/xiannccda/device/DeviceStatusCheckTest.java
+++ b/src/test/java/club/joylink/xiannccda/device/DeviceStatusCheckTest.java
@@ -90,10 +90,21 @@ public class DeviceStatusCheckTest {
System.out.println(s6);
}
+
+ @Test
+ public void platformEbTest() {
+ for (int i = 0; i < 999999999; i++) {
+ Platform.Builder p1 = DeviceStatusConvertor.convert(DeviceStatus.PLATFORM.class, i);
+ if (p1.getEmergstop() && !p1.getTrainberth() && !p1.getDownHold()) {
+ System.out.println(i);
+ }
+ }
+ }
+
@Test
public void platformTest() {
- Platform.Builder p1 = DeviceStatusConvertor.convert(DeviceStatus.PLATFORM.class, 2555906);
+ Platform.Builder p1 = DeviceStatusConvertor.convert(DeviceStatus.PLATFORM.class, 21);
System.out.println(p1);
System.out.println("-----------------");
Platform.Builder p2 = DeviceStatusConvertor.convert(DeviceStatus.PLATFORM.class, 2686976);
diff --git a/src/test/java/club/joylink/xiannccda/service/MockMsgTest.java b/src/test/java/club/joylink/xiannccda/service/MockMsgTest.java
index 74f6820..3b7effe 100644
--- a/src/test/java/club/joylink/xiannccda/service/MockMsgTest.java
+++ b/src/test/java/club/joylink/xiannccda/service/MockMsgTest.java
@@ -82,6 +82,7 @@ public class MockMsgTest {
@Autowired
private INccMockDataRepository iNccMockDataRepository;
+
@Test
public void insert() throws Exception {
/* List messageDataList2 = Lists.newArrayList();
diff --git a/src/test/java/club/joylink/xiannccda/util/CollectorData.java b/src/test/java/club/joylink/xiannccda/util/CollectorData.java
index 624188e..4f6c345 100644
--- a/src/test/java/club/joylink/xiannccda/util/CollectorData.java
+++ b/src/test/java/club/joylink/xiannccda/util/CollectorData.java
@@ -26,6 +26,7 @@ import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -44,6 +45,34 @@ public class CollectorData {
NccMockDataService nccMockDataService;
+ @Test
+ public void collectorTrack() {
+ Table> dataTable = this.loadData();
+ for (DeviceType dt : dataTable.rowKeySet()) {
+ Map> mapList = dataTable.row(dt);
+ if (dt == DeviceType.DEVICE_TYPE_PLATFORM) {
+ System.out.println("aaaaaaaaaaaaaaaaa");
+ }
+ mapList.forEach((k, v) -> {
+ try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("d:\\usr\\" + dt.name(), true)))) {
+ writer.write(String.format("集中站:%s \n", k));
+ List newList = new ArrayList<>();
+ StringBuilder sb = new StringBuilder();
+ for (String s : v) {
+ String[] ssss = s.split("\u0000");
+
+ newList.add(ssss[0]);
+ }
+ writer.write("\t\t" + newList.stream().sorted().collect(Collectors.joining(",")) + "\n");
+
+ writer.write("-----------------------------------\n");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ });
+ }
+ }
+
@Test
public void collector() {
diff --git a/src/test/java/club/joylink/xiannccda/util/impo/PlatformStopImportTest.java b/src/test/java/club/joylink/xiannccda/util/impo/PlatformStopImportTest.java
new file mode 100644
index 0000000..fafa8b2
--- /dev/null
+++ b/src/test/java/club/joylink/xiannccda/util/impo/PlatformStopImportTest.java
@@ -0,0 +1,190 @@
+package club.joylink.xiannccda.util.impo;
+
+import club.joylink.xiannccda.alert.core.AlertDeviceType;
+import club.joylink.xiannccda.constants.common.LineTypeEnum;
+import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType;
+import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto;
+import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.Platform;
+import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.Section;
+import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.Station;
+import club.joylink.xiannccda.entity.AlertTip;
+import club.joylink.xiannccda.entity.DeviceAreaConfig;
+import club.joylink.xiannccda.entity.PublishedGi;
+import club.joylink.xiannccda.repository.IPublishedGiRepository;
+import club.joylink.xiannccda.repository.impl.AlertTipRepository;
+import club.joylink.xiannccda.repository.impl.DeviceAreaConfigRepository;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import lombok.SneakyThrows;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+public class PlatformStopImportTest {
+
+ @Autowired
+ private DeviceAreaConfigRepository configRepository;
+ @Autowired
+ private AlertTipRepository tipRepository;
+ @Autowired
+ private IPublishedGiRepository iPublishedGiRepository;
+
+
+ private PublishedGi findGi() {
+ return this.iPublishedGiRepository.lambdaQuery().eq(PublishedGi::getLineId, lineId).one();
+ }
+
+
+ private static final Integer lineId = 3;
+
+
+ @SneakyThrows
+ public List giTest() {
+ List list = new ArrayList<>();
+ PublishedGi gi = this.findGi();
+ LayoutGraphicsProto.RtssGraphicStorage storage =
+ LayoutGraphicsProto.RtssGraphicStorage.parseFrom(gi.getProto());
+ for (Platform platform : storage.getPlatformsList()) {
+ int platFromId = platform.getCommon().getId();
+ Optional opt = storage.getStationsList().stream().filter(d -> d.getCommon().getId() == platform.getRefStation()).findFirst();
+ if (opt.isEmpty()) {
+ throw new RuntimeException(platform.getCode());
+ }
+ list.add(new AreaConfigPF(platform.getCode(), platform.getUp(), opt.get().getName(), platFromId));
+ }
+ return list;
+ }
+
+
+ @SneakyThrows
+ @Test
+ public void ImportAreaConfig() {
+ List list = this.giTest();
+ if (CollectionUtils.isEmpty(list)) {
+ throw new RuntimeException("No AreaConfig");
+ }
+ String filePath = "g:\\1.xlsx";
+ List saveList = new ArrayList<>();
+ try (FileInputStream file = new FileInputStream(new File(filePath));
+ Workbook workbook = new XSSFWorkbook(file)) {
+ Sheet sheet = workbook.getSheetAt(4);
+ String station = null;
+
+ for (int i = 2; i < sheet.getPhysicalNumberOfRows(); i++) {
+ Row row = sheet.getRow(i);
+ Cell sc = row.getCell(2);
+ Cell sx = row.getCell(3);
+ if (StringUtils.isNotEmpty(sc.getStringCellValue())) {
+ station = sc.getStringCellValue();
+ }
+ String sxStr = sx.getStringCellValue();
+ boolean isup = StringUtils.contains(sxStr, "下行") ? false : true;
+ String finalStation = station;
+ List findPf = list.stream().filter(d -> (StringUtils.contains(d.stationName, finalStation) || StringUtils.contains(finalStation, d.stationName)) && d.up == isup).toList();
+ if (CollectionUtils.isEmpty(findPf) || findPf.size() > 1) {
+ throw new RuntimeException("No AreaConfig");
+ }
+ AreaConfigPF ppff = findPf.get(0);
+ System.out.println(String.format("紧停触发-%s-%s-%s", station, sx.getStringCellValue(), ppff.platformId));
+ DeviceAreaConfig ac = new DeviceAreaConfig();
+ ac.setAreaName(String.format("紧停触发-%s-%s", station, sx.getStringCellValue()));
+ ac.setLineId(lineId);
+ ac.setData(String.valueOf(ppff.platformId));
+ ac.setDeviceType(AlertDeviceType.DEVICE_TYPE_PLATFORM);
+ ac.setAlertTypes(AlertType.PLATFORM_EMERG_STOP.name());
+ saveList.add(ac);
+ }
+ }
+ this.configRepository.saveBatch(saveList);
+ }
+
+ private List findAreaConfig() {
+ QueryWrapper qw = new QueryWrapper<>();
+ qw.lambda().eq(DeviceAreaConfig::getLineId, lineId).eq(DeviceAreaConfig::getAlertTypes, AlertType.PLATFORM_EMERG_STOP.name());
+ List list = this.configRepository.list(qw);
+ return list;
+ }
+
+ private Long findAreaConfigId(List areaConfigList, String station, boolean isup) {
+ for (DeviceAreaConfig ac : areaConfigList) {
+ String[] names = ac.getAreaName().split(StringPool.DASH);
+ String sn = names[1];
+ String upStr = names[2];
+ String upStrShort = isup ? "上行" : "下行";
+ if (StringUtils.contains(sn, station.substring(0, 2)) && StringUtils.contains(upStr, upStrShort)) {
+ return ac.getId();
+ }
+ }
+ return null;
+ }
+
+ @SneakyThrows
+ @Test
+ public void ImportAlertTip() {
+ String filePath = "g:\\1.xlsx";
+ List saveList = new ArrayList<>();
+ List areaConfigList = this.findAreaConfig();
+
+ try (FileInputStream file = new FileInputStream(new File(filePath));
+ Workbook workbook = new XSSFWorkbook(file)) {
+ Sheet sheet = workbook.getSheetAt(4);
+ String station = null;
+
+ for (int i = 2; i < sheet.getPhysicalNumberOfRows(); i++) {
+ Row row = sheet.getRow(i);
+ Cell sc = row.getCell(2);
+ Cell sx = row.getCell(3);
+ Cell m1 = row.getCell(4);
+ Cell m2 = row.getCell(5);
+
+ if (StringUtils.isNotEmpty(sc.getStringCellValue())) {
+ station = sc.getStringCellValue();
+ }
+ String sxStr = sx.getStringCellValue();
+ boolean isup = StringUtils.contains(sxStr, "下行") ? false : true;
+ Long areaId = findAreaConfigId(areaConfigList, station, isup);
+ if (Objects.isNull(areaId)) {
+ throw new RuntimeException("No AreaConfig");
+ }
+ String msg1 = m1.getStringCellValue();
+ String msg2 = m2.getStringCellValue();
+ msg1 = TestObj.formatStr(msg1);
+ msg2 = TestObj.formatStr(msg2);
+ saveList.add(TestObj.create(lineId, LineTypeEnum.OCC, AlertType.PLATFORM_EMERG_STOP.name(), msg1, msg2, areaId));
+
+ }
+ }
+ this.tipRepository.saveBatch(saveList);
+ }
+
+ private static class AreaConfigPF {
+
+ public AreaConfigPF(String platformCode, boolean up, String stationName, int platformId) {
+ this.platformCode = platformCode;
+ this.up = up;
+ this.stationName = stationName;
+ this.platformId = platformId;
+ }
+
+ private String platformCode;
+ private boolean up;
+ private String stationName;
+ private int platformId;
+ }
+
+}
diff --git a/src/test/java/club/joylink/xiannccda/util/impo/SwitchImportTest.java b/src/test/java/club/joylink/xiannccda/util/impo/SwitchImportTest.java
new file mode 100644
index 0000000..114a227
--- /dev/null
+++ b/src/test/java/club/joylink/xiannccda/util/impo/SwitchImportTest.java
@@ -0,0 +1,102 @@
+package club.joylink.xiannccda.util.impo;
+
+import club.joylink.xiannccda.constants.common.LineTypeEnum;
+import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType;
+import club.joylink.xiannccda.entity.AlertTip;
+import club.joylink.xiannccda.entity.DeviceAreaConfig;
+import club.joylink.xiannccda.repository.impl.AlertTipRepository;
+import club.joylink.xiannccda.repository.impl.DeviceAreaConfigRepository;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import lombok.SneakyThrows;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+public class SwitchImportTest {
+
+ @Autowired
+ private DeviceAreaConfigRepository configRepository;
+ @Autowired
+ private AlertTipRepository tipRepository;
+
+ private List findAreaConfig() {
+ QueryWrapper qw = new QueryWrapper<>();
+ qw.lambda().eq(DeviceAreaConfig::getLineId, lineId).eq(DeviceAreaConfig::getDeviceType, "DEVICE_TYPE_SWITCH");
+ List list = this.configRepository.list(qw);
+ return list;
+ }
+
+ private static final Integer lineId = 3;
+ private static final LineTypeEnum lineType = LineTypeEnum.OCC;
+
+ @SneakyThrows
+ @Test
+ public void testRead() {
+ String filePath = "g:\\1.xlsx";
+
+ List areaConfigList = this.findAreaConfig();
+ List saveList = new ArrayList<>();
+
+ try (FileInputStream file = new FileInputStream(new File(filePath));
+ Workbook workbook = new XSSFWorkbook(file)) {
+/* for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
+ Sheet sheet = workbook.getSheetAt(i);
+ System.out.println(sheet.getSheetName());
+ }*/
+ Sheet sheet = workbook.getSheetAt(2);
+ String newDeviceName = "";
+ for (int i = 2; i < sheet.getPhysicalNumberOfRows(); i++) {
+ Row row = sheet.getRow(i);
+ Cell cell3 = row.getCell(3);
+ Cell cell4 = row.getCell(4);
+ Cell cell5 = row.getCell(5);
+ Cell cell6 = row.getCell(6);
+
+ String dn = cell3.getStringCellValue();
+ if (StringUtils.isNotEmpty(dn)) {
+ newDeviceName = dn;
+ }
+ String fun = cell4.getStringCellValue();
+ String msg = cell5.getStringCellValue();
+ String msg2 = cell6.getStringCellValue();
+ String funType = AlertType.SWITCH_All_LOST.name();
+ if (StringUtils.contains(fun, "定位失表")) {
+ funType = AlertType.SWITCH_DW_LOST.name();
+ } else if (StringUtils.contains(fun, "反位失表")) {
+ funType = AlertType.SWITCH_FW_LOST.name();
+ }
+ String finalNewDeviceName = newDeviceName;
+ Optional optional = areaConfigList.stream().filter(d -> StringUtils.contains(d.getAreaName(), finalNewDeviceName)).findFirst();
+ if (optional.isPresent()) {
+ DeviceAreaConfig config = optional.get();
+ msg = msg.replaceAll("\n", "\\\\n");
+ msg2 = msg2.replaceAll("\n", "\\\\n");
+ msg = "\"" + msg + "\"";
+ msg2 = "\"" + msg2 + "\"";
+ saveList.add(TestObj.create(lineId, lineType, funType, msg, msg2, config.getId()));
+ } else {
+ throw new RuntimeException("");
+ }
+
+
+ }
+ }
+ this.tipRepository.saveBatch(saveList);
+ }
+
+
+}
diff --git a/src/test/java/club/joylink/xiannccda/util/impo/TestObj.java b/src/test/java/club/joylink/xiannccda/util/impo/TestObj.java
new file mode 100644
index 0000000..752e776
--- /dev/null
+++ b/src/test/java/club/joylink/xiannccda/util/impo/TestObj.java
@@ -0,0 +1,25 @@
+package club.joylink.xiannccda.util.impo;
+
+import club.joylink.xiannccda.constants.common.LineTypeEnum;
+import club.joylink.xiannccda.entity.AlertTip;
+
+public class TestObj {
+
+ public static AlertTip create(Integer lineId, LineTypeEnum lineType, String type, String msg1, String msg2, Long areaId) {
+ AlertTip tip = new AlertTip();
+ tip.setAlertType(type);
+ tip.setLineId(lineId);
+ tip.setLineType(lineType);
+ tip.setDrivingInfo(msg1);
+ tip.setSubmissionInfo(msg2);
+ tip.setAreaConfigId(areaId);
+ return tip;
+ }
+
+ public static String formatStr(String source) {
+ String msg = source.replaceAll("\n", "\\\\n");
+ msg = "\"" + msg + "\"";
+ return msg;
+ }
+
+}
diff --git a/xian-ncc-da-message b/xian-ncc-da-message
index 4f9012b..c8ca178 160000
--- a/xian-ncc-da-message
+++ b/xian-ncc-da-message
@@ -1 +1 @@
-Subproject commit 4f9012b0795f62bf352b078ebbc1b1fffa86849d
+Subproject commit c8ca17875615e4fd3483a7b15c11a1bc2f2f9cd5