Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
8161216321
@ -12,6 +12,7 @@ import club.joylink.rtss.services.runplan.IRunPlanUserConfigService;
|
||||
import club.joylink.rtss.simulation.cbtc.GroupSimulationService;
|
||||
import club.joylink.rtss.simulation.cbtc.build.RunPlanBuilder;
|
||||
import club.joylink.rtss.simulation.cbtc.build.SimulationBuilder;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MapElement;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -746,7 +747,12 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
}
|
||||
tripVO.setServiceNumber(serviceNumber);
|
||||
tripVO.setTripNumber(tripVO.getDirectionCode() + tripNumber);
|
||||
tripConfig.getArriveConfigList().stream().map(RunPlanTripTimeVO::new).forEach(timeVO -> tripVO.getTimeList().add(timeVO));
|
||||
tripConfig.getArriveConfigList().stream().map(RunPlanTripTimeVO::new).sorted(Comparator.comparing(RunPlanTripTimeVO::getArrivalTime)).forEach(timeVO -> tripVO.getTimeList().add(timeVO));
|
||||
|
||||
if (Objects.equals(tripVO.getEndSectionCode(), (new LinkedList<> (tripVO.getTimeList())).getLast().getSectionCode())) {
|
||||
tripVO.setEndTime(tripConfig.getEndTime().minusHours(SimulationConstants.RUN_DIAGRAM_TRANS_TIME));
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(runPlanVO.getTripList())) {
|
||||
runPlanVO.setTripList(new ArrayList<>());
|
||||
}
|
||||
@ -915,13 +921,17 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
return errorList;
|
||||
}
|
||||
MapVO map = this.iMapService.getMapDetail(planVO.getMapId());
|
||||
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map);
|
||||
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapData(map);
|
||||
BusinessExceptionAssertEnum.DATA_ERROR.assertCollectionEmpty(buildResult.getErrMsgList(),
|
||||
"地图基础数据校验不通过");
|
||||
Map<String, MapElement> deviceMap = buildResult.getDeviceMap();
|
||||
RunPlanBuilder.RunPlanBuildResult runPlanBuildResult =
|
||||
RunPlanBuilder.buildRunDiagram(deviceMap, planVO);
|
||||
//先屏蔽掉数据检查
|
||||
if(runPlanBuildResult.getErrMsgList().isEmpty()){
|
||||
List<String> errMsgList = SimulationBuilder.checkRunPlanAndBuildLostRoutePaths(runPlanBuildResult.getServerTripMap(),
|
||||
buildResult.getRoutePathMap());
|
||||
return errMsgList;
|
||||
}
|
||||
return runPlanBuildResult.getErrMsgList();
|
||||
}
|
||||
|
||||
|
@ -333,8 +333,10 @@ public class RunPlanGenerator {
|
||||
otherTripRunTime = otherTripRunTime + parkTime + runTime;
|
||||
}
|
||||
if (same ? true :
|
||||
(temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + inboundTripRunTime).isBefore(inputData.getOverTime())
|
||||
&& temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + outRefTripRunTime + otherTripRunTime + inboundTripRunTime).getHour()>3)) {
|
||||
(temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + inboundTripRunTime).isBefore(inputData.getOverTime()) &&
|
||||
(temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2).getHour()<3
|
||||
|| temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + outRefTripRunTime + otherTripRunTime + inboundTripRunTime).getHour()>3))
|
||||
) {
|
||||
//构建环路车次
|
||||
boolean loop = false;
|
||||
do {
|
||||
@ -352,7 +354,8 @@ public class RunPlanGenerator {
|
||||
}
|
||||
}
|
||||
while (temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + inboundTripRunTime).isBefore(inputData.getOverTime())
|
||||
&& temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + outRefTripRunTime + otherTripRunTime + inboundTripRunTime).getHour()>3);
|
||||
&&
|
||||
(temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2).getHour()<3||temp.getLastStationDepartTime().plusSeconds(inputData.getReentryTime()/2 + outRefTripRunTime + otherTripRunTime + inboundTripRunTime).getHour()>3));
|
||||
}
|
||||
//构建回库计划
|
||||
buildServiceTrips(inputData, mapVO, inboundRouting, false, runLevelMap, parkTimeMap, userReentryData, serviceTripList, temp);
|
||||
|
@ -144,7 +144,7 @@ public class SimulationBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
private static List<String> checkRunPlanAndBuildLostRoutePaths(Map<String, List<TripPlan>> serverTripMap,
|
||||
public static List<String> checkRunPlanAndBuildLostRoutePaths(Map<String, List<TripPlan>> serverTripMap,
|
||||
Map<String, List<RoutePath>> routePathMap) {
|
||||
Map<String, String> errMsgMap = new HashMap<>();
|
||||
for (List<TripPlan> tripPlanList : serverTripMap.values()) {
|
||||
|
Loading…
Reference in New Issue
Block a user