修改数据构建bug
This commit is contained in:
parent
99ecac0318
commit
d7b42ef478
|
@ -7,7 +7,6 @@ import club.joylink.rtss.simulation.cbtc.data.map.*;
|
|||
import club.joylink.rtss.simulation.cbtc.data.support.SectionPosition;
|
||||
import club.joylink.rtss.simulation.cbtc.data.support.StationTurnBackStrategyOption;
|
||||
import club.joylink.rtss.simulation.cbtc.data.vr.*;
|
||||
import club.joylink.rtss.vo.map.MapCISwitchVO;
|
||||
import club.joylink.rtss.vo.map.MapGraphDataNewVO;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import club.joylink.rtss.vo.map.RealLineConfigVO;
|
||||
|
@ -1077,16 +1076,16 @@ public class MapDeviceBuilder {
|
|||
if (Objects.equals(sectionVO.getType(), BusinessConsts.Section.SectionType.Type02)) { // 逻辑区段
|
||||
Float startOffset = sectionVO.getLogicSectionStartOffset();
|
||||
Float endOffset = sectionVO.getLogicSectionEndOffset();
|
||||
section.setLen(sectionVO.getLengthFact());
|
||||
if ((Objects.isNull(sectionVO.getLengthFact()) || sectionVO.getLengthFact() <= 0) &&
|
||||
if ((Objects.isNull(sectionVO.getLengthFact()) || sectionVO.getLengthFact() <= 0) ||
|
||||
(Objects.isNull(startOffset) || Objects.isNull(endOffset))) {
|
||||
errMsgList.add(String.format("逻辑区段[%s(%s)]既没有设置实际长度且所在物理区段起始/终止偏移量也未设置",
|
||||
errMsgList.add(String.format("逻辑区段[%s(%s)]没有设置实际长度或所在物理区段起始/终止偏移量未设置",
|
||||
section.getName(), section.getCode()));
|
||||
} else {
|
||||
float max = Math.max(startOffset, endOffset);
|
||||
float min = Math.min(startOffset, endOffset);
|
||||
section.setMaxOffset(max);
|
||||
section.setMinOffset(min);
|
||||
section.setLen(sectionVO.getLengthFact());
|
||||
}
|
||||
}
|
||||
// 所属设备集中站
|
||||
|
|
|
@ -316,7 +316,7 @@ public class Stand extends MayOutOfOrderDevice {
|
|||
}
|
||||
|
||||
public String debugStr() {
|
||||
return String.format("%s-%s-%s(%s)", this.station.getName(),
|
||||
return String.format("%s-%s-%s(%s)", station == null ? null : station.getName(),
|
||||
this.isRight() ? "右行" : "左行", this.getName(), this.getCode());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue