diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java index 6d27527..13368e3 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/collect/convertor/LineNetTrainComMethod.java @@ -4,6 +4,7 @@ import club.joylink.xiannccda.ats.cache.LineGraphicDataRepository; import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataOperate; import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataRepository; import club.joylink.xiannccda.ats.message.collect.datasource.DeviceStatusData; +import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage; import club.joylink.xiannccda.ats.message.line3.device.DeviceType; import club.joylink.xiannccda.dto.protos.WsMessageProto; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; @@ -54,8 +55,11 @@ public abstract class LineNetTrainComMethod { if (!DeviceType.DEVICE_TYPE_TRACK.equals(type) && !DeviceType.DEVICE_TYPE_SWITCH.equals(type)) { return; } + // 转换成程序中的名称 + String convertName = DeviceNameChangerManage.findMatch(type, deviceName); // 获取到当前区段公里标 - List kmList = LineGraphicDataRepository.getKilometerCodeList(obj.getLineId(), deviceName); + List kmList = + LineGraphicDataRepository.getKilometerCodeList(obj.getLineId(), convertName); if (CollectionUtils.isNotEmpty(kmList)) { long kilometer; if (obj.getDir() == 1) { // 下行取大值 @@ -67,7 +71,7 @@ public abstract class LineNetTrainComMethod { } obj.setKilometerCode(kilometer); } else { - log.warn(String.format("设备%s没有公里标信息", deviceName)); + log.warn(String.format("设备%s没有公里标信息", convertName)); } } } diff --git a/xian-ncc-da-message b/xian-ncc-da-message index eb0ad6e..90b6f46 160000 --- a/xian-ncc-da-message +++ b/xian-ncc-da-message @@ -1 +1 @@ -Subproject commit eb0ad6e4305642b6619f5e97d1498ad5dc5a6d42 +Subproject commit 90b6f4600e531c496d849163653acb80c6e933ea