From 03f9fb48071997adc21ba854e21f079d26848c0f Mon Sep 17 00:00:00 2001 From: weizhihong Date: Wed, 19 Jul 2023 14:36:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E7=BD=91=E5=9B=BE=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=89=8D=E5=81=9A=E8=AE=BE=E5=A4=87=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../message/collect/convertor/LineNetTrainComMethod.java | 8 ++++++-- xian-ncc-da-message | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) 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