修改生成大铁通过进路的逻辑

This commit is contained in:
joylink_zhangsai 2022-08-03 16:38:23 +08:00
parent d294dfafe8
commit 7d9d14086a

View File

@ -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();