Merge remote-tracking branch 'origin/test' into simulation-ATS-restruct

This commit is contained in:
walker-sheng 2021-07-07 18:07:52 +08:00
commit 6a91cfe698

View File

@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.time.LocalTime; import java.time.LocalTime;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
@ -204,7 +205,7 @@ public class AtsTrainService {
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
String.format("不存在追踪的列车[%s]", groupNumber)); String.format("不存在追踪的列车[%s]", groupNumber));
} }
if (repository.getConfig().isCheckDirectionWhenSetHead()) { if (StringUtils.hasText(tripNumber) && repository.getConfig().isCheckDirectionWhenSetHead()) {
boolean tripRight; boolean tripRight;
char c = tripNumber.charAt(0); char c = tripNumber.charAt(0);
switch (c) { switch (c) {