From cec67bc20b1e472cfbea7bba94b12d56480aae0a Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 7 Jul 2021 18:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=A4=B4=E7=A0=81=E8=BD=A6=E6=97=B6=E7=9A=84=E8=BD=A6=E6=AC=A1?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/ATS/service/AtsTrainService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java index 0dc783504..28d13e031 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java @@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.time.LocalTime; import java.time.temporal.ChronoUnit; @@ -201,7 +202,7 @@ public class AtsTrainService { throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, String.format("不存在追踪的列车[%s]", groupNumber)); } - if (repository.getConfig().isCheckDirectionWhenSetHead()) { + if (StringUtils.hasText(tripNumber) && repository.getConfig().isCheckDirectionWhenSetHead()) { boolean tripRight; char c = tripNumber.charAt(0); switch (c) {