运行图校验修改 宁波三导入备车变更车次回库外加一个服务车次
This commit is contained in:
parent
6aee4ce7e9
commit
bf109450e5
@ -799,7 +799,7 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
if(Objects.isNull(trips.get(trips.size() - 1).getIsInbound()) || !trips.get(trips.size() - 1).getIsInbound()){
|
||||
errorList.add(String.format("服务号[%s]最后一班车次[%s]不是回库", s, trips.get(trips.size() - 1).getTripNumber()));
|
||||
}
|
||||
LocalTime overTime = trips.get(trips.size() - 1).getEndTime();
|
||||
LocalTime overTime = trips.get(trips.size() - 1).getEndTime().plusHours(OFFSET_TIME_HOURS);
|
||||
//服务最后一班车次时间 <2:00
|
||||
if (overTime.isAfter(LocalTime.of(2, 0)) && overTime.isBefore(LocalTime.of(4, 0))) {
|
||||
errorList.add(String.format("服务号[%s]最后一班车次结束时间[%s]太晚,应不晚于次日02:00", s, overTime));
|
||||
@ -888,6 +888,10 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
continue;
|
||||
}
|
||||
Float distance = stationSpacingMap.get(tripTime.getSectionCode() + "-" + nextTripTime.getSectionCode());
|
||||
MapSectionNewVO startSection = map.findSection(tripTime.getSectionCode());
|
||||
if (startSection.isReentryTrack() && !startSection.isStandTrack()){
|
||||
continue;
|
||||
}
|
||||
if (Objects.isNull(distance)) {
|
||||
errorList.add(String.format("服务号[%s]车次号[%s]从车站[%s]至车站[%s]缺少站间距离数据", s, trip.getTripNumber(), map.findStation(tripTime.getStationCode()).getName(), map.findStation(nextTripTime.getStationCode()).getName()));
|
||||
continue;
|
||||
@ -983,8 +987,8 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
cur.getServiceNumber(), cur.getTripNumber(), map.findStation(cur.getStationCode()).getName()));
|
||||
return;
|
||||
}
|
||||
if (ChronoUnit.SECONDS.between(pre.getDepartureTime(), cur.getArrivalTime()) < 60) {
|
||||
errorList.add(String.format("相邻车次[%s-%s] 与 车次[%s-%s]行车至车站[%s]时运行间隔太小不安全,应不小于1分钟",
|
||||
if (ChronoUnit.SECONDS.between(pre.getDepartureTime(), cur.getArrivalTime()) < 45) {
|
||||
errorList.add(String.format("相邻车次[%s-%s] 与 车次[%s-%s]行车至车站[%s]时运行间隔太小不安全,应不小于45秒",
|
||||
pre.getServiceNumber(), pre.getTripNumber(),
|
||||
cur.getServiceNumber(), cur.getTripNumber(),map.findStation(cur.getStationCode()).getName()));
|
||||
return;
|
||||
|
@ -10,6 +10,8 @@ import club.joylink.rtss.vo.client.runplan.RunPlanTripVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -30,11 +32,30 @@ public class NingBoLine3RunPlanNew implements IRunPlanStrategyNew {
|
||||
public void importDataCheckAndPreHandle(List<RunPlanImport> runPlanImportList, List<MapStationNewVO> stationList, String upDirection) {
|
||||
Map<String, MapStationNewVO> stationMap = stationList.stream().collect(
|
||||
Collectors.toMap(MapStationNewVO::getRunPlanName, Function.identity()));
|
||||
//增加36203回库到奉化22:00
|
||||
RunPlanImport newTrip = new RunPlanImport();
|
||||
newTrip.setCode("36401");
|
||||
List<RunPlanArrivalTime> newArrivalList = new ArrayList<>();
|
||||
newTrip.setArrivalList(newArrivalList);
|
||||
RunPlanArrivalTime tripTime = new RunPlanArrivalTime();
|
||||
tripTime.setStationName("金海路");
|
||||
tripTime.setArriveTime(LocalTime.of(5,5,43));
|
||||
tripTime.setDepartureTime(LocalTime.of(21,59,30));
|
||||
RunPlanArrivalTime tripTime2 = new RunPlanArrivalTime();
|
||||
tripTime2.setStationName("奉化停车场");
|
||||
tripTime2.setArriveTime(LocalTime.of(22,0));
|
||||
tripTime2.setDepartureTime(LocalTime.of(22,0));
|
||||
newArrivalList.add(tripTime);
|
||||
newArrivalList.add(tripTime2);
|
||||
runPlanImportList.add(newTrip);
|
||||
runPlanImportList.forEach(runPlanImport -> {
|
||||
this.analyzeAndConvertCode(runPlanImport, upDirection);
|
||||
List<RunPlanArrivalTime> arrivalList = runPlanImport.getArrivalList();
|
||||
if(runPlanImport.getCode().equals("36301")){
|
||||
arrivalList.remove(0);
|
||||
}
|
||||
handleStationAndTime(stationMap, arrivalList);
|
||||
if(Arrays.asList("36102", "36203","36301").contains(runPlanImport.getCode())){
|
||||
if(Arrays.asList("36102", "36203","36401","36301").contains(runPlanImport.getCode())){
|
||||
runPlanImport.setBackup(true);
|
||||
}
|
||||
});
|
||||
@ -120,6 +141,9 @@ public class NingBoLine3RunPlanNew implements IRunPlanStrategyNew {
|
||||
case "体育馆":
|
||||
tripVO.setStartSectionCode("T442");//T4107
|
||||
break;
|
||||
case "樱花公园":
|
||||
tripVO.setStartSectionCode("T442");//T4107
|
||||
break;
|
||||
}
|
||||
|
||||
//Y316双休日
|
||||
@ -183,6 +207,9 @@ public class NingBoLine3RunPlanNew implements IRunPlanStrategyNew {
|
||||
// case "体育馆":
|
||||
// tripVO.setStartSectionCode("T442");//T4107
|
||||
// break;
|
||||
// case "樱花公园":
|
||||
// tripVO.setStartSectionCode("T442");//T4107
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
@ -207,15 +234,19 @@ public class NingBoLine3RunPlanNew implements IRunPlanStrategyNew {
|
||||
|
||||
//通用
|
||||
if("奉化停车场".equals(stationVO.getRunPlanName())){
|
||||
if(runPlanImport.isBackup() && runPlanImport.getCode().equals("36203")){
|
||||
if(runPlanImport.isBackup() && (runPlanImport.getCode().equals("36203") ||runPlanImport.getCode().equals("36401"))){
|
||||
timeVO.setSectionCode("T60"); //T2101
|
||||
}else{
|
||||
timeVO.setSectionCode("T62"); //T2102
|
||||
}
|
||||
return;
|
||||
}
|
||||
if("金海路".equals(stationVO.getRunPlanName()) && runPlanImport.getCode().equals("36401")){
|
||||
timeVO.setSectionCode("T4"); //T2101
|
||||
return;
|
||||
}
|
||||
|
||||
// // Y316工作日
|
||||
// Y316工作日
|
||||
// if("高塘桥".equals(stationVO.getRunPlanName())){
|
||||
// if(Arrays.asList("36203","30603","30803").contains(runPlanImport.getCode())){
|
||||
// timeVO.setSectionCode("T273");//T3015
|
||||
|
@ -2,6 +2,7 @@ package club.joylink.rtss.vo.client.runplan;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user