【大铁发车行驶至目标地区时,判断是否可以继续行驶】
【行车日志初始化BUG修复】 【行车计划修改日期报错修改】
This commit is contained in:
parent
40e94ba1a8
commit
fed97fa2a6
@ -72,7 +72,8 @@ public class CtcZoneOperateHandler {
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.CTC_ZONE_SAVE_PLAN_TIME)
|
||||
public CtcRunPlanParam savePlanTime(Simulation simulation, String stationCode, String runPlanCode, String planTime, StationDirection.ReceiveAndDeliverModel model) {
|
||||
return ctcZoneService.savePlanTime(simulation, stationCode, runPlanCode, LocalDateTime.parse(planTime), model);
|
||||
LocalDateTime t = LocalDateTime.parse(planTime.replace(" ", "T"));
|
||||
return ctcZoneService.savePlanTime(simulation, stationCode, runPlanCode, t, model);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -373,7 +373,8 @@ public class CTCLogicLoop {
|
||||
changeMap.put(k, Boolean.TRUE);
|
||||
}
|
||||
});
|
||||
if (!Objects.equals(simulation.getCtcRepository().isRunPlanSendOut(), changeMap.isEmpty())) {
|
||||
// 为空时
|
||||
if (!Objects.equals(simulation.getCtcRepository().getRunPlanSendOut(), changeMap.isEmpty()) || !changeMap.isEmpty()) {
|
||||
simulation.getCtcRepository().setRunPlanSendOut(changeMap.isEmpty());
|
||||
sendCtcMessage(simulation.getId(), changeMap, WebSocketMessageType.SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND
|
||||
, simulation.getSimulationUserIds());
|
||||
|
@ -95,7 +95,7 @@ public class CtcRepository {
|
||||
/**
|
||||
* 是否需要发送计划消息
|
||||
*/
|
||||
private boolean runPlanSendOut;
|
||||
private Boolean runPlanSendOut;
|
||||
/******************************************* 以上为车站终端数据:车站为单位 *******************************************/
|
||||
|
||||
/**
|
||||
@ -126,6 +126,7 @@ public class CtcRepository {
|
||||
this.ctcZoneRepository.reset();
|
||||
this.ctcEffectRepository.reset();
|
||||
this.ctcManageRepository.reset();
|
||||
this.runPlanSendOut = null;
|
||||
// this.runPlanStatusVOMap.clear();
|
||||
this.allRunPlanList.clear();
|
||||
this.simulationRunPlanMap.clear();
|
||||
|
@ -577,7 +577,16 @@ public class CommandBO {
|
||||
List<Step> steps = command.getStepByType(Step.StepType.DRIVE);
|
||||
Step driveStep = steps.get(0);
|
||||
if (train.isStopAtThePosition(driveStep.getTargetPosition())) { //如果列车已经停到目标位置
|
||||
boolean isRight = train.isRight(); // 列车运行方向
|
||||
Section section = train.getHeadPosition().getSection(); // 列车车头所在区段
|
||||
Section targetSection = getTargetSection(isRight, section);
|
||||
if (Objects.equals(section, targetSection)) {
|
||||
command.getTargetMember().setCommand(null);
|
||||
} else {
|
||||
SectionPosition targetPosition = new SectionPosition(targetSection, targetSection.getStopPointByDirection(isRight));
|
||||
driveStep.setTargetPosition(targetPosition);
|
||||
return driveStep;
|
||||
}
|
||||
} else {
|
||||
return driveStep;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user