routepath 筛选异常时打印

This commit is contained in:
xzb 2022-08-24 15:56:21 +08:00
parent 41c7130489
commit a784fc278b
2 changed files with 20 additions and 1 deletions

View File

@ -248,6 +248,15 @@ public abstract class AtsRouteSelectService {
Route route = null;
for (Route temp : triggerList) {
List<SwitchElement> switchList = temp.getOverlap().getFirstPath().getSwitchList();
if(null==switchList||switchList.isEmpty()){
log.debug("==============================================================================");
log.debug("==>>异常进路code = {} name = {}",temp.getCode(),temp.getName());
log.debug("==>>异常相关所有进路:");
triggerList.forEach(r->{
log.debug("==>>进路code={} name={} , 始端信号机code={} name={}",r.getCode(),r.getName(),r.getStart().getCode(),r.getName());
});
log.debug("==============================================================================");
}
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertCollectionNotEmpty(switchList,
String.format("列车[%s]过滤进路异常:进路不是延续保护差异进路[%s]",
trainInfo.getGroupNumber(),

View File

@ -3,11 +3,12 @@ package club.joylink.rtss.simulation.cbtc.data.support;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.simulation.cbtc.data.map.*;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Getter
public class RoutePath {
@ -470,6 +471,15 @@ public class RoutePath {
// 取第一个延续保护道岔定位的
for (Route temp : triggerList) {
List<SwitchElement> switchList = temp.getOverlap().getFirstPath().getSwitchList();
if(null==switchList||switchList.isEmpty()){
log.debug("==============================================================================");
log.debug("==>>异常进路code = {} name = {}",temp.getCode(),temp.getName());
log.debug("==>>异常相关所有进路:");
triggerList.forEach(r->{
log.debug("==>>进路code={} name={} , 始端信号机code={} name={}",r.getCode(),r.getName(),r.getStart().getCode(),r.getName());
});
log.debug("==============================================================================");
}
if (switchList.get(0).isNormal()) {
route = temp;
break;