From 7d9d14086a77d44dac66b9e2f5e2839cb6451947 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 3 Aug 2022 16:38:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90=E5=A4=A7?= =?UTF-8?q?=E9=93=81=E9=80=9A=E8=BF=87=E8=BF=9B=E8=B7=AF=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/draftData/DraftMapRouteServiceImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/rtss/services/draftData/DraftMapRouteServiceImpl.java b/src/main/java/club/joylink/rtss/services/draftData/DraftMapRouteServiceImpl.java index e6c74f4fc..a7b019c31 100644 --- a/src/main/java/club/joylink/rtss/services/draftData/DraftMapRouteServiceImpl.java +++ b/src/main/java/club/joylink/rtss/services/draftData/DraftMapRouteServiceImpl.java @@ -20,6 +20,7 @@ import club.joylink.rtss.vo.map.graph.MapSignalButtonVO; import club.joylink.rtss.vo.map.logic.MapRouteNewVO; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -30,6 +31,7 @@ import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; +@Slf4j @Service public class DraftMapRouteServiceImpl implements DraftMapRouteService { @@ -499,8 +501,12 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService { } Section next = section.getNextSection(right); if (next == null) { - BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(section.isSwitchTrack() && section.getNextSection(!right) != null, - String.format("信号机[%s]未找到终端信号机", signal.getCode())); + if (!section.isSwitchTrack() || section.getNextSection(!right) == null) { + log.info(signal.debugStr() + "未找到通过进路的末端信号机"); + return; + } +// BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(section.isSwitchTrack() && section.getNextSection(!right) != null, +// String.format("信号机[%s]未找到终端信号机", signal.getCode())); Switch relSwitch = section.getRelSwitch(); if (relSwitch.isA(section)) { next = relSwitch.getB();