diff --git a/pom.xml b/pom.xml index c3d5c70..f3e5fee 100644 --- a/pom.xml +++ b/pom.xml @@ -152,6 +152,12 @@ guava 31.1-jre + + org.apache.poi + poi-ooxml + 5.2.3 + test + diff --git a/src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java b/src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java index e72bdcc..09f0cd7 100644 --- a/src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java +++ b/src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java @@ -5,6 +5,7 @@ import club.joylink.xiannccda.alert.core.AlertManager; import club.joylink.xiannccda.configuration.protos.OccServerProto; import club.joylink.xiannccda.configuration.protos.OccServerProto.OccClientMessage; import club.joylink.xiannccda.constants.common.LineTypeEnum; +import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType; import club.joylink.xiannccda.entity.AlertRecord; import club.joylink.xiannccda.event.Listener; import club.joylink.xiannccda.repository.IAlertRecordRepository; @@ -64,16 +65,26 @@ public class AlertListenerJob implements ApplicationRunner { //不论是否mock 都保存数据库 OccClientMessage clientMessage = serverProto.getClientMessage(alertInfo.getLineId()); - for (LineTypeEnum lineType : clientMessage.getLineTypes()) { + if (alertInfo.getAlertType() == AlertType.PLATFORM_EMERG_STOP) { NccAlertInfo cloned = alertInfo.clone2(); -// NccAlertInfo cloneNcc = ObjectUtils.clone(alertInfo); - cloned.setLineType(lineType); + cloned.setLineType(LineTypeEnum.OCC); AlertRecord record = convertToRecord(cloned); alertRecordRepository.save(record); cloned.setId(record.getId()); - NccAlertMessageServer nccAlertMessageServer = NccAlertMessageServer.getInstance(lineType); + NccAlertMessageServer nccAlertMessageServer = NccAlertMessageServer.getInstance(LineTypeEnum.OCC); nccAlertMessageServer.addMsg(cloned); + } else { + for (LineTypeEnum lineType : clientMessage.getLineTypes()) { + NccAlertInfo cloned = alertInfo.clone2(); + cloned.setLineType(lineType); + AlertRecord record = convertToRecord(cloned); + alertRecordRepository.save(record); + cloned.setId(record.getId()); + NccAlertMessageServer nccAlertMessageServer = NccAlertMessageServer.getInstance(lineType); + nccAlertMessageServer.addMsg(cloned); + } } + } }); } diff --git a/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java b/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java index b5cc0c2..b0730eb 100644 --- a/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java +++ b/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java @@ -136,6 +136,9 @@ public class NccAlertInfo implements AlertInfo, Cloneable { ALL_LINE_BLUE_DISPLAY, AXLE_LED_RED_INTERLOCK_AREA, AXLE_LED_ORANGE_INTERLOCK_AREA -> { return "I"; } + case PLATFORM_EMERG_STOP -> { + return "II"; + } default -> throw new IllegalStateException("Unexpected value: " + alertType); } } 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 fdac036..67477e1 100644 --- a/src/main/java/club/joylink/xiannccda/ats/cache/LineGraphicDataRepository.java +++ b/src/main/java/club/joylink/xiannccda/ats/cache/LineGraphicDataRepository.java @@ -152,7 +152,9 @@ public class LineGraphicDataRepository { for (Integer lineId : line_code_table.rowKeySet()) { DeviceStatusData dsd = DeviceDataRepository.findDataSouce(lineId.toString(), DataTypeEnum.DEVICE); InterLockData interLock = DeviceDataRepository.findDataSouce(lineId.toString(), DataTypeEnum.INTER_LOCK); - for (MessageOrBuilder mb : line_code_table.values()) { + ; +// for (MessageOrBuilder mb : line_code_table.values()) { + for (MessageOrBuilder mb : line_code_table.row(lineId).values()) { String deviceCode = DeviceStatusDataOperate.findFieldVal(mb, "code", String.class); Integer deviceId = DeviceStatusDataOperate.findFieldVal(mb, "centralizedStationId", Integer.class); if (Objects.isNull(deviceId) || deviceId == 0) { @@ -205,8 +207,13 @@ public class LineGraphicDataRepository { if (StringUtils.isEmpty(rtuCode)) { return null; } - return Integer.parseInt(rtuCode); + try { + return Integer.parseInt(rtuCode); + } catch (Exception e) { + e.printStackTrace(); + } + return 1; } public static Optional findLayoutPlatformFromSection(Integer lineId, String sectionName) { diff --git a/src/main/java/club/joylink/xiannccda/ats/message/OccTcpClientConnection.java b/src/main/java/club/joylink/xiannccda/ats/message/OccTcpClientConnection.java index c754ca1..e69d609 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/OccTcpClientConnection.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/OccTcpClientConnection.java @@ -129,7 +129,7 @@ public class OccTcpClientConnection { } String hostPortInfo() { - return String.format("host=%s, port=%s", this.host, this.port); + return String.format("lineId=%s,host=%s, port=%s", this.client.getLineId(), this.host, this.port); } diff --git a/src/main/java/club/joylink/xiannccda/ats/message/XianOccMessagingClient.java b/src/main/java/club/joylink/xiannccda/ats/message/XianOccMessagingClient.java index 082d4f8..cfd89a0 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/XianOccMessagingClient.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/XianOccMessagingClient.java @@ -1,10 +1,8 @@ package club.joylink.xiannccda.ats.message; -import club.joylink.xiannccda.ats.message.line3.req.LoadHistoryTGDataRequest; -import club.joylink.xiannccda.ats.message.line3.req.LoadHistoryTGDataRequest.ApplyTypeEnum; +import club.joylink.xiannccda.ats.message.line3.req.LoadDeviceStatusRequest; import club.joylink.xiannccda.configuration.protos.OccServerProto.OccClientMessage; -import java.time.LocalDateTime; import java.util.LinkedList; import java.util.Objects; import java.util.concurrent.Executors; @@ -94,8 +92,9 @@ public class XianOccMessagingClient { public void requestBaseData() { if (this.rtConnection.connected && this.nrtConnection.connected && this.requestBaseDataFlag.compareAndSet(false, true)) { log.info("发送计划运行图请求 lineId[{}] host[{}] 实时接口[{}]", this.lineId, this.host, false); - LoadHistoryTGDataRequest dataRequest = new LoadHistoryTGDataRequest((short) this.lineId, LocalDateTime.now(), ApplyTypeEnum.PLAN_GRAPH); - this.send(dataRequest, false); +// LoadHistoryTGDataRequest dataRequest = new LoadHistoryTGDataRequest((short) this.lineId, LocalDateTime.now(), ApplyTypeEnum.PLAN_GRAPH); + LoadDeviceStatusRequest dataRequest = new LoadDeviceStatusRequest((short) this.lineId); + this.send(dataRequest, true); } } diff --git a/src/main/java/club/joylink/xiannccda/ats/message/changer/DeviceNameChangerManage.java b/src/main/java/club/joylink/xiannccda/ats/message/changer/DeviceNameChangerManage.java index 28b3153..93a7c0c 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/changer/DeviceNameChangerManage.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/changer/DeviceNameChangerManage.java @@ -30,6 +30,9 @@ public class DeviceNameChangerManage { public static String findMatch(NameChangerEnum nameChanger, DeviceType deviceType, String occName) { + if (nameChanger == NameChangerEnum.NONE) { + return occName; + } if (Objects.isNull(deviceType)) { log.debug("错误的设备类型 type[{}]", deviceType); return occName; diff --git a/src/main/java/club/joylink/xiannccda/ats/message/changer/NameChangerEnum.java b/src/main/java/club/joylink/xiannccda/ats/message/changer/NameChangerEnum.java index ad88a02..1f2b833 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/changer/NameChangerEnum.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/changer/NameChangerEnum.java @@ -1,6 +1,7 @@ package club.joylink.xiannccda.ats.message.changer; public enum NameChangerEnum { + NONE, //通用 UNIVERSAL, ; diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/InterLockData.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/InterLockData.java index 9cc6250..5c41a45 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/InterLockData.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/InterLockData.java @@ -20,6 +20,7 @@ import com.google.common.collect.Tables; import com.google.protobuf.GeneratedMessageV3.Builder; import com.google.protobuf.MessageOrBuilder; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; @@ -52,6 +53,9 @@ public class InterLockData extends AbstractData { private Map> findInterLockAreaConfigData(Integer lineId) { List areaConfigVOList = this.deviceAreaConfigService.getCache(lineId, AlertDeviceType.DEVICE_TYPE_RTU); + if (CollectionUtils.isEmpty(areaConfigVOList)) { + return Collections.emptyMap(); + } return areaConfigVOList.stream() .filter(d -> d.getAlertTypes().contains(AlertType.INTERLOCK_LEVEL_ONE.name())) .collect(Collectors.groupingBy(d -> AlertType.valueOf(d.getAlertTypes().get(0)))); diff --git a/src/main/java/club/joylink/xiannccda/ats/message/line3/rep/EntityParseUtil.java b/src/main/java/club/joylink/xiannccda/ats/message/line3/rep/EntityParseUtil.java index b455d2e..23813f0 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/line3/rep/EntityParseUtil.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/line3/rep/EntityParseUtil.java @@ -2,10 +2,13 @@ package club.joylink.xiannccda.ats.message.line3.rep; import club.joylink.xiannccda.ats.message.line3.MessageCons; import club.joylink.xiannccda.ats.message.line3.device.DeviceType; +import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.protobuf.Descriptors.FieldDescriptor; import com.google.protobuf.GeneratedMessageV3; import io.netty.buffer.ByteBuf; +import java.util.Arrays; +import java.util.Collections; import java.util.List; public class EntityParseUtil { @@ -30,7 +33,16 @@ public class EntityParseUtil { public static String convertStr(ByteBuf buf, int len) { byte[] data = new byte[len]; buf.readBytes(data); - return new String(data, MessageCons.STRING_CHARSET).trim(); + StringBuilder sb = new StringBuilder(); + for (byte datum : data) { + sb.append(datum).append(","); + } + System.out.println(sb.toString()); + String datas = Joiner.on(",").join(Collections.singleton(data)); + + String name = new String(data, MessageCons.STRING_CHARSET).trim(); + System.out.println(name.trim().split(" ")[0]); + return name; } public interface ReadData { diff --git a/src/main/java/club/joylink/xiannccda/ats/message/line3/req/LoadDeviceStatusRequest.java b/src/main/java/club/joylink/xiannccda/ats/message/line3/req/LoadDeviceStatusRequest.java index d20d81d..9f6e7ca 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/line3/req/LoadDeviceStatusRequest.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/line3/req/LoadDeviceStatusRequest.java @@ -47,7 +47,7 @@ public class LoadDeviceStatusRequest extends MessageRequest { private Short lineId; public LoadDeviceStatusRequest(Short lineId) { - super(MessageId.LOAD_DEVICE_STATUS, 2); + super(MessageId.LOAD_DEVICE_STATUS, 2 + 1); this.lineId = lineId; } @@ -55,5 +55,6 @@ public class LoadDeviceStatusRequest extends MessageRequest { @Override public void encode2(ByteBuf buf) { buf.writeShort(this.lineId); + buf.writeByte(1); } } diff --git a/src/main/java/club/joylink/xiannccda/ats/warn/platform/PlatformEmergStopTask.java b/src/main/java/club/joylink/xiannccda/ats/warn/platform/PlatformEmergStopTask.java new file mode 100644 index 0000000..dfd2c74 --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/ats/warn/platform/PlatformEmergStopTask.java @@ -0,0 +1,73 @@ +package club.joylink.xiannccda.ats.warn.platform; + +import club.joylink.xiannccda.alert.NccAlertInfo; +import club.joylink.xiannccda.alert.core.AlertDeviceStatusRepository; +import club.joylink.xiannccda.alert.core.AlertDeviceType; +import club.joylink.xiannccda.alert.core.AlertManager; +import club.joylink.xiannccda.alert.core.AlertMonitoringTask; +import club.joylink.xiannccda.ats.cache.LineGraphicDataRepository; +import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository; +import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository.DataTypeEnum; +import club.joylink.xiannccda.ats.message.collect.datasource.DeviceStatusData; +import club.joylink.xiannccda.configuration.protos.OccServerProto; +import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType; +import club.joylink.xiannccda.dto.protos.DeviceStatusProto; +import club.joylink.xiannccda.dto.protos.DeviceStatusProto.Platform; +import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto; +import club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.Station; +import club.joylink.xiannccda.service.AlertInfoService; +import club.joylink.xiannccda.vo.AreaConfigVO; +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 java.util.Set; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +@Slf4j +public class PlatformEmergStopTask implements AlertMonitoringTask { + + @Autowired + private AlertInfoService alertInfoService; + private final AlertDeviceStatusRepository alertDataSource = AlertDeviceStatusRepository.getInstance(); + private final AlertManager alertManager = AlertManager.getDefault(); + + @Override + public String getName() { + return "PLATFORM_EMERG_STOP_ALTER"; + } + + @Override + public void run() { + Set allLineSet = DeviceDataRepository.getAllLines(); + for (String lineIdStr : allLineSet) { + Integer lineIdInt = Integer.parseInt(lineIdStr); + DeviceStatusData deviceStatusData = DeviceDataRepository.findDataSouce(lineIdStr, DataTypeEnum.DEVICE); + List giPlatformList = LineGraphicDataRepository.getDevices(lineIdInt, LayoutGraphicsProto.Platform.class).toList(); + for (LayoutGraphicsProto.Platform giPlatform : giPlatformList) { + Map builderMap = deviceStatusData.getAllDeviceMap().get(DeviceStatusProto.Platform.getDescriptor().getName()); + if (CollectionUtils.isNotEmpty(builderMap) && Objects.nonNull(builderMap.get(giPlatform.getCode()))) { + Platform.Builder platformBuild = (Platform.Builder) builderMap.get(giPlatform.getCode()); + if (platformBuild.getEmergstop()) { + if (alertDataSource.putAlterDevice(lineIdInt, this.getName(), platformBuild.getId())) { + Integer layOutId = giPlatform.getCommon().getId(); + Station station = LineGraphicDataRepository.getDeviceByCode(lineIdInt, giPlatform.getRefStation() + "", Station.class); + + Optional optional = alertInfoService.findAreaDevice(AlertType.PLATFORM_EMERG_STOP, AlertDeviceType.DEVICE_TYPE_PLATFORM, layOutId, lineIdInt); + NccAlertInfo alertInfo = this.alertInfoService.createAlert2(optional, AlertType.PLATFORM_EMERG_STOP, platformBuild, "aaaaa", layOutId.toString(), + AlertDeviceType.DEVICE_TYPE_PLATFORM, false); + alertManager.emit(alertInfo); + } + } else { + alertDataSource.removeAlterDevice(lineIdInt, this.getName(), platformBuild.getId()); + } + } + } + } + } +} diff --git a/src/main/java/club/joylink/xiannccda/configuration/protos/OccServerProto.java b/src/main/java/club/joylink/xiannccda/configuration/protos/OccServerProto.java index ff2a4cb..3d13ec1 100644 --- a/src/main/java/club/joylink/xiannccda/configuration/protos/OccServerProto.java +++ b/src/main/java/club/joylink/xiannccda/configuration/protos/OccServerProto.java @@ -4,6 +4,7 @@ import club.joylink.xiannccda.ats.message.changer.NameChangerEnum; import club.joylink.xiannccda.constants.common.LineTypeEnum; import java.util.List; import java.util.Map; +import java.util.Set; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @@ -19,6 +20,10 @@ public class OccServerProto { return this.clientInfoMap.get(lineId); } + public Set getAllLineIds() { + return this.clientInfoMap.keySet(); + + } @Data public static class OccClientMessage { diff --git a/src/main/java/club/joylink/xiannccda/dto/mock/show/NewAlertMockDTO.java b/src/main/java/club/joylink/xiannccda/dto/mock/show/NewAlertMockDTO.java index 1e01a02..f138a47 100644 --- a/src/main/java/club/joylink/xiannccda/dto/mock/show/NewAlertMockDTO.java +++ b/src/main/java/club/joylink/xiannccda/dto/mock/show/NewAlertMockDTO.java @@ -20,6 +20,7 @@ public abstract class NewAlertMockDTO { if (alertType == AlertType.TRAIN_EB_ATP) { return MessageId.TRAIN_INDICATION_UPDATE; } + return MessageId.DEVICE_STATUS_CHANGE; } diff --git a/src/main/java/club/joylink/xiannccda/dto/mock/show/PlatformEBDTO.java b/src/main/java/club/joylink/xiannccda/dto/mock/show/PlatformEBDTO.java new file mode 100644 index 0000000..73274c8 --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/dto/mock/show/PlatformEBDTO.java @@ -0,0 +1,20 @@ +package club.joylink.xiannccda.dto.mock.show; + +import lombok.Data; + +@Data +public class PlatformEBDTO extends NewAlertMockDTO { + + @Override + public Integer deviceStatus(AlertMockStatus status) { + switch (status) { + case NORMAL -> { + return 0; + } + case ALERT -> { + return 21; + } + } + return 0; + } +} diff --git a/src/main/java/club/joylink/xiannccda/dto/protos/AlertConstProto.java b/src/main/java/club/joylink/xiannccda/dto/protos/AlertConstProto.java index 22301ed..4f58a6c 100644 --- a/src/main/java/club/joylink/xiannccda/dto/protos/AlertConstProto.java +++ b/src/main/java/club/joylink/xiannccda/dto/protos/AlertConstProto.java @@ -375,6 +375,14 @@ public final class AlertConstProto { * INTERLOCK_LEVEL_ONE = 23; */ INTERLOCK_LEVEL_ONE(23), + /** + *
+     *应急触发
+     * 
+ * + * PLATFORM_EMERG_STOP = 24; + */ + PLATFORM_EMERG_STOP(24), UNRECOGNIZED(-1), ; @@ -550,6 +558,14 @@ public final class AlertConstProto { * INTERLOCK_LEVEL_ONE = 23; */ public static final int INTERLOCK_LEVEL_ONE_VALUE = 23; + /** + *
+     *应急触发
+     * 
+ * + * PLATFORM_EMERG_STOP = 24; + */ + public static final int PLATFORM_EMERG_STOP_VALUE = 24; public final int getNumber() { @@ -598,6 +614,7 @@ public final class AlertConstProto { case 21: return AXLE_LED_ORANGE_INTERLOCK_AREA; case 22: return SWITCH_LOST_INTERLOCK_AREA; case 23: return INTERLOCK_LEVEL_ONE; + case 24: return PLATFORM_EMERG_STOP; default: return null; } } @@ -841,7 +858,7 @@ public final class AlertConstProto { "\n\020alertConst.proto\022\005alert*g\n\rAlertLocati" + "on\022\032\n\026ALERT_LOCATION_UNKNOWN\020\000\022\006\n\002QX\020\001\022\013" + "\n\007YHZ_LSQ\020\002\022\013\n\007HJM_LSQ\020\003\022\013\n\007BCT_LSQ\020\004\022\013\n" + - "\007BSQ_LSQ\020\005*\253\004\n\tAlertType\022\026\n\022ALERT_TYPE_U" + + "\007BSQ_LSQ\020\005*\304\004\n\tAlertType\022\026\n\022ALERT_TYPE_U" + "NKNOWN\020\000\022\020\n\014BLUE_DISPLAY\020\001\022\021\n\rTRAIN_DELA" + "Y_2\020\002\022\022\n\016TRAIN_DELAY_10\020\003\022\'\n#PLATFORM_DO" + "OR_WITHOUT_LOCKED_SIGNAL\020\004\022\035\n\031PLATFORM_D" + @@ -855,11 +872,12 @@ public final class AlertConstProto { "\020\023\022\037\n\033AXLE_LED_RED_INTERLOCK_AREA\020\024\022\"\n\036A" + "XLE_LED_ORANGE_INTERLOCK_AREA\020\025\022\036\n\032SWITC" + "H_LOST_INTERLOCK_AREA\020\026\022\027\n\023INTERLOCK_LEV" + - "EL_ONE\020\027*x\n\rTipTimeConfig\022\026\n\022HOLIDAYS_MO" + - "RN_PEAK\020\000\022\031\n\025HOLIDAYS_EVENING_PEAK\020\001\022\r\n\t" + - "MORN_PEAK\020\002\022\021\n\rEVENING_PEARK\020\003\022\022\n\016NORMAL" + - "_UNPEARK\020\004B4\n!club.joylink.xiannccda.dto" + - ".protosB\017AlertConstProtob\006proto3" + "EL_ONE\020\027\022\027\n\023PLATFORM_EMERG_STOP\020\030*x\n\rTip" + + "TimeConfig\022\026\n\022HOLIDAYS_MORN_PEAK\020\000\022\031\n\025HO" + + "LIDAYS_EVENING_PEAK\020\001\022\r\n\tMORN_PEAK\020\002\022\021\n\r" + + "EVENING_PEARK\020\003\022\022\n\016NORMAL_UNPEARK\020\004B4\n!c" + + "lub.joylink.xiannccda.dto.protosB\017AlertC" + + "onstProtob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, 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 4f2c35e..ced6404 100644 --- a/src/main/java/club/joylink/xiannccda/dto/protos/LayoutGraphicsProto.java +++ b/src/main/java/club/joylink/xiannccda/dto/protos/LayoutGraphicsProto.java @@ -508,6 +508,33 @@ public final class LayoutGraphicsProto { */ club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.ConcentrationDividingLineOrBuilder getConcentrationDividingLinesOrBuilder( int index); + + /** + *
+     *一键生成计轴的配置
+     * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + * @return Whether the generateAxleCountingConfig field is set. + */ + boolean hasGenerateAxleCountingConfig(); + /** + *
+     *一键生成计轴的配置
+     * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + * @return The generateAxleCountingConfig. + */ + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig getGenerateAxleCountingConfig(); + /** + *
+     *一键生成计轴的配置
+     * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder getGenerateAxleCountingConfigOrBuilder(); } /** * Protobuf type {@code graphicData.RtssGraphicStorage} @@ -1388,6 +1415,44 @@ public final class LayoutGraphicsProto { return concentrationDividingLines_.get(index); } + public static final int GENERATEAXLECOUNTINGCONFIG_FIELD_NUMBER = 21; + private club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig generateAxleCountingConfig_; + /** + *
+     *一键生成计轴的配置
+     * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + * @return Whether the generateAxleCountingConfig field is set. + */ + @java.lang.Override + public boolean hasGenerateAxleCountingConfig() { + return generateAxleCountingConfig_ != null; + } + /** + *
+     *一键生成计轴的配置
+     * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + * @return The generateAxleCountingConfig. + */ + @java.lang.Override + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig getGenerateAxleCountingConfig() { + return generateAxleCountingConfig_ == null ? club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance() : generateAxleCountingConfig_; + } + /** + *
+     *一键生成计轴的配置
+     * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + @java.lang.Override + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder getGenerateAxleCountingConfigOrBuilder() { + return generateAxleCountingConfig_ == null ? club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance() : generateAxleCountingConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1462,6 +1527,9 @@ public final class LayoutGraphicsProto { for (int i = 0; i < concentrationDividingLines_.size(); i++) { output.writeMessage(20, concentrationDividingLines_.get(i)); } + if (generateAxleCountingConfig_ != null) { + output.writeMessage(21, getGenerateAxleCountingConfig()); + } getUnknownFields().writeTo(output); } @@ -1551,6 +1619,10 @@ public final class LayoutGraphicsProto { size += com.google.protobuf.CodedOutputStream .computeMessageSize(20, concentrationDividingLines_.get(i)); } + if (generateAxleCountingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getGenerateAxleCountingConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1609,6 +1681,11 @@ public final class LayoutGraphicsProto { .equals(other.getLogicSectionsList())) return false; if (!getConcentrationDividingLinesList() .equals(other.getConcentrationDividingLinesList())) return false; + if (hasGenerateAxleCountingConfig() != other.hasGenerateAxleCountingConfig()) return false; + if (hasGenerateAxleCountingConfig()) { + if (!getGenerateAxleCountingConfig() + .equals(other.getGenerateAxleCountingConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1700,6 +1777,10 @@ public final class LayoutGraphicsProto { hash = (37 * hash) + CONCENTRATIONDIVIDINGLINES_FIELD_NUMBER; hash = (53 * hash) + getConcentrationDividingLinesList().hashCode(); } + if (hasGenerateAxleCountingConfig()) { + hash = (37 * hash) + GENERATEAXLECOUNTINGCONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGenerateAxleCountingConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1969,6 +2050,11 @@ public final class LayoutGraphicsProto { concentrationDividingLinesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00080000); + generateAxleCountingConfig_ = null; + if (generateAxleCountingConfigBuilder_ != null) { + generateAxleCountingConfigBuilder_.dispose(); + generateAxleCountingConfigBuilder_ = null; + } return this; } @@ -2182,6 +2268,11 @@ public final class LayoutGraphicsProto { ? canvas_ : canvasBuilder_.build(); } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.generateAxleCountingConfig_ = generateAxleCountingConfigBuilder_ == null + ? generateAxleCountingConfig_ + : generateAxleCountingConfigBuilder_.build(); + } } @java.lang.Override @@ -2693,6 +2784,9 @@ public final class LayoutGraphicsProto { } } } + if (other.hasGenerateAxleCountingConfig()) { + mergeGenerateAxleCountingConfig(other.getGenerateAxleCountingConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2973,6 +3067,13 @@ public final class LayoutGraphicsProto { } break; } // case 162 + case 170: { + input.readMessage( + getGenerateAxleCountingConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 170 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -7740,6 +7841,161 @@ public final class LayoutGraphicsProto { } return concentrationDividingLinesBuilder_; } + + private club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig generateAxleCountingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder> generateAxleCountingConfigBuilder_; + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + * @return Whether the generateAxleCountingConfig field is set. + */ + public boolean hasGenerateAxleCountingConfig() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + * @return The generateAxleCountingConfig. + */ + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig getGenerateAxleCountingConfig() { + if (generateAxleCountingConfigBuilder_ == null) { + return generateAxleCountingConfig_ == null ? club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance() : generateAxleCountingConfig_; + } else { + return generateAxleCountingConfigBuilder_.getMessage(); + } + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + public Builder setGenerateAxleCountingConfig(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig value) { + if (generateAxleCountingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generateAxleCountingConfig_ = value; + } else { + generateAxleCountingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + public Builder setGenerateAxleCountingConfig( + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder builderForValue) { + if (generateAxleCountingConfigBuilder_ == null) { + generateAxleCountingConfig_ = builderForValue.build(); + } else { + generateAxleCountingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + public Builder mergeGenerateAxleCountingConfig(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig value) { + if (generateAxleCountingConfigBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + generateAxleCountingConfig_ != null && + generateAxleCountingConfig_ != club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance()) { + getGenerateAxleCountingConfigBuilder().mergeFrom(value); + } else { + generateAxleCountingConfig_ = value; + } + } else { + generateAxleCountingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + public Builder clearGenerateAxleCountingConfig() { + bitField0_ = (bitField0_ & ~0x00100000); + generateAxleCountingConfig_ = null; + if (generateAxleCountingConfigBuilder_ != null) { + generateAxleCountingConfigBuilder_.dispose(); + generateAxleCountingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder getGenerateAxleCountingConfigBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getGenerateAxleCountingConfigFieldBuilder().getBuilder(); + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder getGenerateAxleCountingConfigOrBuilder() { + if (generateAxleCountingConfigBuilder_ != null) { + return generateAxleCountingConfigBuilder_.getMessageOrBuilder(); + } else { + return generateAxleCountingConfig_ == null ? + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance() : generateAxleCountingConfig_; + } + } + /** + *
+       *一键生成计轴的配置
+       * 
+ * + * .graphicData.GenerateAxleCountingConfig generateAxleCountingConfig = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder> + getGenerateAxleCountingConfigFieldBuilder() { + if (generateAxleCountingConfigBuilder_ == null) { + generateAxleCountingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder>( + getGenerateAxleCountingConfig(), + getParentForChildren(), + isClean()); + generateAxleCountingConfig_ = null; + } + return generateAxleCountingConfigBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -47098,6 +47354,861 @@ public final class LayoutGraphicsProto { } + public interface GenerateAxleCountingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:graphicData.GenerateAxleCountingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+     * 
+ * + * repeated uint32 bbConnect = 1; + * @return A list containing the bbConnect. + */ + java.util.List getBbConnectList(); + /** + *
+     *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+     * 
+ * + * repeated uint32 bbConnect = 1; + * @return The count of bbConnect. + */ + int getBbConnectCount(); + /** + *
+     *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+     * 
+ * + * repeated uint32 bbConnect = 1; + * @param index The index of the element to return. + * @return The bbConnect at the given index. + */ + int getBbConnect(int index); + + /** + *
+     *指定的道岔组不生成计轴
+     * 
+ * + * repeated uint32 noGenerateGroup = 2; + * @return A list containing the noGenerateGroup. + */ + java.util.List getNoGenerateGroupList(); + /** + *
+     *指定的道岔组不生成计轴
+     * 
+ * + * repeated uint32 noGenerateGroup = 2; + * @return The count of noGenerateGroup. + */ + int getNoGenerateGroupCount(); + /** + *
+     *指定的道岔组不生成计轴
+     * 
+ * + * repeated uint32 noGenerateGroup = 2; + * @param index The index of the element to return. + * @return The noGenerateGroup at the given index. + */ + int getNoGenerateGroup(int index); + } + /** + * Protobuf type {@code graphicData.GenerateAxleCountingConfig} + */ + public static final class GenerateAxleCountingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:graphicData.GenerateAxleCountingConfig) + GenerateAxleCountingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateAxleCountingConfig.newBuilder() to construct. + private GenerateAxleCountingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GenerateAxleCountingConfig() { + bbConnect_ = emptyIntList(); + noGenerateGroup_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GenerateAxleCountingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.internal_static_graphicData_GenerateAxleCountingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.internal_static_graphicData_GenerateAxleCountingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.class, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder.class); + } + + public static final int BBCONNECT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList bbConnect_; + /** + *
+     *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+     * 
+ * + * repeated uint32 bbConnect = 1; + * @return A list containing the bbConnect. + */ + @java.lang.Override + public java.util.List + getBbConnectList() { + return 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); + } + private int bbConnectMemoizedSerializedSize = -1; + + public static final int NOGENERATEGROUP_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList noGenerateGroup_; + /** + *
+     *指定的道岔组不生成计轴
+     * 
+ * + * repeated uint32 noGenerateGroup = 2; + * @return A list containing the noGenerateGroup. + */ + @java.lang.Override + public java.util.List + getNoGenerateGroupList() { + return 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); + } + private int noGenerateGroupMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getBbConnectList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(bbConnectMemoizedSerializedSize); + } + for (int i = 0; i < bbConnect_.size(); i++) { + output.writeUInt32NoTag(bbConnect_.getInt(i)); + } + if (getNoGenerateGroupList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(noGenerateGroupMemoizedSerializedSize); + } + for (int i = 0; i < noGenerateGroup_.size(); i++) { + output.writeUInt32NoTag(noGenerateGroup_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < bbConnect_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(bbConnect_.getInt(i)); + } + size += dataSize; + if (!getBbConnectList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + bbConnectMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < noGenerateGroup_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(noGenerateGroup_.getInt(i)); + } + size += dataSize; + if (!getNoGenerateGroupList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + noGenerateGroupMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig)) { + return super.equals(obj); + } + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig other = (club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig) obj; + + if (!getBbConnectList() + .equals(other.getBbConnectList())) return false; + if (!getNoGenerateGroupList() + .equals(other.getNoGenerateGroupList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBbConnectCount() > 0) { + hash = (37 * hash) + BBCONNECT_FIELD_NUMBER; + hash = (53 * hash) + getBbConnectList().hashCode(); + } + if (getNoGenerateGroupCount() > 0) { + hash = (37 * hash) + NOGENERATEGROUP_FIELD_NUMBER; + hash = (53 * hash) + getNoGenerateGroupList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code graphicData.GenerateAxleCountingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:graphicData.GenerateAxleCountingConfig) + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.internal_static_graphicData_GenerateAxleCountingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.internal_static_graphicData_GenerateAxleCountingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.class, club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.Builder.class); + } + + // Construct using club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bbConnect_ = emptyIntList(); + noGenerateGroup_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.internal_static_graphicData_GenerateAxleCountingConfig_descriptor; + } + + @java.lang.Override + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig getDefaultInstanceForType() { + return club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance(); + } + + @java.lang.Override + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig build() { + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig buildPartial() { + club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig result = new club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig result) { + if (((bitField0_ & 0x00000001) != 0)) { + bbConnect_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bbConnect_ = bbConnect_; + if (((bitField0_ & 0x00000002) != 0)) { + noGenerateGroup_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.noGenerateGroup_ = noGenerateGroup_; + } + + private void buildPartial0(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig) { + return mergeFrom((club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig other) { + if (other == club.joylink.xiannccda.dto.protos.LayoutGraphicsProto.GenerateAxleCountingConfig.getDefaultInstance()) return this; + if (!other.bbConnect_.isEmpty()) { + if (bbConnect_.isEmpty()) { + bbConnect_ = other.bbConnect_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBbConnectIsMutable(); + bbConnect_.addAll(other.bbConnect_); + } + onChanged(); + } + if (!other.noGenerateGroup_.isEmpty()) { + if (noGenerateGroup_.isEmpty()) { + noGenerateGroup_ = other.noGenerateGroup_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNoGenerateGroupIsMutable(); + noGenerateGroup_.addAll(other.noGenerateGroup_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int v = input.readUInt32(); + ensureBbConnectIsMutable(); + bbConnect_.addInt(v); + break; + } // case 8 + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureBbConnectIsMutable(); + while (input.getBytesUntilLimit() > 0) { + bbConnect_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } // case 10 + case 16: { + int v = input.readUInt32(); + ensureNoGenerateGroupIsMutable(); + noGenerateGroup_.addInt(v); + break; + } // case 16 + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureNoGenerateGroupIsMutable(); + while (input.getBytesUntilLimit() > 0) { + noGenerateGroup_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.IntList bbConnect_ = emptyIntList(); + private void ensureBbConnectIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bbConnect_ = mutableCopy(bbConnect_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       *需要在道岔bb连接处生成计轴的道岔id(填一个就行)
+       * 
+ * + * repeated uint32 bbConnect = 1; + * @return A list containing the bbConnect. + */ + public java.util.List + 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 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 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