生成bug修改
This commit is contained in:
parent
7a0fe8f683
commit
72a6546297
@ -425,23 +425,31 @@ public class RunPlanGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(!inputData.hasOutAndInBound()){
|
||||
serviceTripList.getFirst().setIsOutbound(true);
|
||||
serviceTripList.getLast().setIsInbound(true);
|
||||
}
|
||||
if (inputData.hasOutAndInBound()) {
|
||||
//找最快回库交路
|
||||
RunPlanRoutingVO inboundRouting;
|
||||
if (loop) {
|
||||
inboundRouting = inboundRoutings.stream().filter(inRouting ->
|
||||
Objects.equals(inRouting.getStartStationCode(), otherLoop.getStartStationCode())/*&& Objects.equals(inRouting.getRight(), otherLoop.getRight())*/)
|
||||
Objects.equals(inRouting.getStartSectionCode(), otherLoop.getStartSectionCode())/*&& Objects.equals(inRouting.getRight(), otherLoop.getRight())*/)
|
||||
.sorted(Comparator.comparingInt(o -> o.getParkSectionCodeList().size()))
|
||||
.findFirst().orElse(null);
|
||||
} else {
|
||||
inboundRouting = inboundRoutings.stream().filter(inRouting ->
|
||||
Objects.equals(inRouting.getStartStationCode(), outRefLoop.getStartStationCode())/*&& Objects.equals(inRouting.getRight(), outRefLoop.getRight())*/)
|
||||
Objects.equals(inRouting.getStartSectionCode(), outRefLoop.getStartSectionCode())/*&& Objects.equals(inRouting.getRight(), outRefLoop.getRight())*/)
|
||||
.sorted(Comparator.comparingInt(o -> o.getParkSectionCodeList().size()))
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotTrue(Objects.isNull(inboundRouting), String.format("起始区段[%s]的入库交路不存在", loop ? mapVO.findSection(otherLoop.getStartSectionCode()).getName() : mapVO.findSection(outRefLoop.getStartSectionCode()).getName()));
|
||||
//构建回库计划
|
||||
inputData.setInboundRouting(inboundRouting);
|
||||
// inputData.setInboundRouting(inboundRouting);
|
||||
//判断回库是否从终点区段开始
|
||||
//如果不是 从上一次的车站
|
||||
|
||||
|
||||
buildServiceTrip(inputData, mapVO, inboundRouting, runLevelMap, parkTimeMap, reentryData, serviceTripList, nextTripNumber);
|
||||
}
|
||||
return serviceTripList;
|
||||
|
@ -117,7 +117,7 @@ public class RunPlanTripVO {
|
||||
|
||||
public RunPlanTripVO(RunPlanRoutingVO routingVO) {
|
||||
this.right = routingVO.getRight();
|
||||
this.destinationCode = routingVO.getDestinationCode();
|
||||
this.destinationCode = Objects.isNull(routingVO.getDestinationCode()) ? "" : routingVO.getDestinationCode();
|
||||
this.startSectionCode = routingVO.getStartSectionCode();
|
||||
this.endSectionCode = routingVO.getEndSectionCode();
|
||||
this.timeList = new ArrayList<>();
|
||||
|
@ -50,9 +50,9 @@ public class RunPlanInputData {
|
||||
private boolean outAndIn = false;
|
||||
|
||||
|
||||
/**回库交路*/
|
||||
@JsonIgnore
|
||||
private RunPlanRoutingVO inboundRouting;
|
||||
// /**回库交路*/
|
||||
// @JsonIgnore
|
||||
// private RunPlanRoutingVO inboundRouting;
|
||||
|
||||
@JsonIgnore
|
||||
public boolean multiService() {
|
||||
|
Loading…
Reference in New Issue
Block a user