Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
15d7ebd7f1
@ -4,8 +4,7 @@ import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.vo.CtcRunPlanParam;
|
||||
import club.joylink.rtss.simulation.cbtc.CTC.data.vo.CtcRunPlanVO;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.StationDirection;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.*;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@ -281,9 +280,10 @@ public class CtcEffectRepository {
|
||||
/**
|
||||
* 阶段计划数据
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class CtcStageRunPlanRepository {
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class CtcStageRunPlanRepository {
|
||||
/**
|
||||
* 车站编码
|
||||
*/
|
||||
@ -292,7 +292,7 @@ public class CtcEffectRepository {
|
||||
/**
|
||||
* 当前数据版本
|
||||
*/
|
||||
private AtomicInteger version;
|
||||
private AtomicInteger version = new AtomicInteger(0);
|
||||
|
||||
/**
|
||||
* 最近变更时间
|
||||
@ -353,9 +353,10 @@ public class CtcEffectRepository {
|
||||
return new CtcStageRunPlanVO(this);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class CtcStageRunPlanVO {
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class CtcStageRunPlanVO {
|
||||
private String stationCode;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
@ -385,7 +386,7 @@ public class CtcEffectRepository {
|
||||
/**
|
||||
* 当前数据版本
|
||||
*/
|
||||
protected AtomicInteger version;
|
||||
protected AtomicInteger version = new AtomicInteger(0);
|
||||
|
||||
/**
|
||||
* 最近变更时间
|
||||
@ -418,8 +419,7 @@ public class CtcEffectRepository {
|
||||
/**
|
||||
* 车站股道数据
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Data
|
||||
public static class StationTrackSectionRepository extends AbstractWorkspaceRepository<TrackSection> {
|
||||
/**
|
||||
* 保存
|
||||
@ -446,8 +446,7 @@ public class CtcEffectRepository {
|
||||
/**
|
||||
* 车站出入口
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Data
|
||||
public static class StationDoorRepository extends AbstractWorkspaceRepository<StationDirection> {
|
||||
private final Map<String, StationDirection> trackSectionMap = new ConcurrentHashMap<>();
|
||||
|
||||
@ -465,10 +464,8 @@ public class CtcEffectRepository {
|
||||
/**
|
||||
* 固定进路信息
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Data
|
||||
public static class StationRunPlanRepository extends AbstractWorkspaceRepository<CtcRunPlanParam> {
|
||||
|
||||
/**
|
||||
* 保存运行计划
|
||||
*
|
||||
@ -498,10 +495,6 @@ public class CtcEffectRepository {
|
||||
return this.dataMap.containsKey(code);
|
||||
}
|
||||
|
||||
public StationRunPlanRepository() {
|
||||
this.version = new AtomicInteger(0);
|
||||
}
|
||||
|
||||
public List<CtcRunPlanParam> getAllRunPlanParam() {
|
||||
return this.dataMap.values().stream().collect(Collectors.toList());
|
||||
}
|
||||
|
@ -205,10 +205,15 @@ public class CtcStationRunPlanLog {
|
||||
this.transfinite = paramInfo.getTransfinite();
|
||||
}
|
||||
this.runPlanTaskItemMap = new HashMap<>(RunPlanTask.values().length); // 运行计划任务
|
||||
RunPlanTask.getOptionKeyList().forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO)));
|
||||
RunPlanTask.getOptionKeyList().stream().filter(k -> !RunPlanTask.NO.equals(k))
|
||||
.forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO)));
|
||||
paramInfo.getRunPlanTaskMap().forEach((k, v) -> {
|
||||
if (v != null && v > 0) {
|
||||
if (v != null && v > 0 && !RunPlanTask.NO.equals(k)) {
|
||||
if (this.runPlanTaskItemMap.containsKey(k.getOptionKey())) {
|
||||
this.runPlanTaskItemMap.get(k.getOptionKey()).setType(k);
|
||||
} else {
|
||||
this.runPlanTaskItemMap.put(k.getOptionKey(), new RunPlanTaskItem(k));
|
||||
}
|
||||
}
|
||||
});
|
||||
// 删除状态
|
||||
@ -648,7 +653,7 @@ public class CtcStationRunPlanLog {
|
||||
if (paramInfo.arriveAndDepartElectrical()) { // 存在指定电力设置,则获取指定
|
||||
Boolean electrical = arrive ? paramInfo.getArriveElectrical() : paramInfo.getDepartElectrical();
|
||||
runPlanItem.setElectrical(electrical);
|
||||
} else {
|
||||
} else if (paramInfo.getElectrical() != null) {
|
||||
runPlanItem.setElectrical(paramInfo.getElectrical());
|
||||
}
|
||||
// 超限等级
|
||||
|
@ -2,8 +2,9 @@ package club.joylink.rtss.simulation.cbtc.CTC.data.vo;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.vo.CtcRunPlanParam;
|
||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcStationRunPlanLog;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@ -11,8 +12,9 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 阶段对比
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CtcRunPlanVO {
|
||||
/**
|
||||
* 车站编码
|
||||
@ -90,8 +92,9 @@ public class CtcRunPlanVO {
|
||||
return new CtcRunPlanStatusVO(this);
|
||||
}
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class CtcRunPlanStatusVO {
|
||||
/**
|
||||
* 车站编码
|
||||
|
@ -69,6 +69,8 @@ public class StorageSimulation {
|
||||
simulation.setPlanRunning(this.planRunning);
|
||||
simulation.setPlanLoaded(planLoaded);
|
||||
repository.recover2Simulation(simulation, simulation.getRepository());
|
||||
if (ctcDataRepository != null) {
|
||||
ctcDataRepository.recover2Simulation(simulation, simulation.getCtcRepository());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package club.joylink.rtss.simulation.cbtc.data.storage.plan;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcEffectRepository;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CTC生效区数据
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StorageCtcEffectData {
|
||||
|
||||
/**
|
||||
|
@ -4,8 +4,7 @@ import club.joylink.rtss.simulation.cbtc.ATS.operation.vo.CtcRunPlanParam;
|
||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcRepository;
|
||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcStationRunPlanLog;
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
@ -98,9 +97,13 @@ public class StorageCtcRunPlanLog {
|
||||
if (sign != null) {
|
||||
ctcStationRunPlanLog.setSign(sign);
|
||||
}
|
||||
if (this.departItemOtherInfo != null) {
|
||||
this.departItemOtherInfo.convertToObj(ctcStationRunPlanLog.getDepartRunPlan());
|
||||
}
|
||||
if (this.arriveItemOtherInfo != null) {
|
||||
this.arriveItemOtherInfo.convertToObj(ctcStationRunPlanLog.getArriveRunPlan());
|
||||
}
|
||||
}
|
||||
|
||||
private void setDepartAndArrive(CtcRunPlanParam ctcRunPlanParam, CtcStationRunPlanLog.RunPlanItem runPlanItem, boolean arrive) {
|
||||
if (runPlanItem != null) {
|
||||
@ -166,9 +169,10 @@ public class StorageCtcRunPlanLog {
|
||||
}
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private class ItemOtherInfo {
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class ItemOtherInfo {
|
||||
/**
|
||||
* 实际时间
|
||||
*/
|
||||
|
@ -42,6 +42,8 @@ public class StorageCtcZoneData {
|
||||
* @return
|
||||
*/
|
||||
public void convert(CtcZoneRepository repository) {
|
||||
if (stationRunPlanMap != null) {
|
||||
stationRunPlanMap.forEach((k, v) -> repository.getStationRunPlanMap().put(k, v));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,12 @@ public class MemberManager {
|
||||
if (simulation.getRepository().getConfig().isRailway()) {
|
||||
// this.addRole(simulation, SimulationMember.Type.RAIL_CTC, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_ASSISTANT, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_MASTER, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_SIGNALER, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_PASSENGER, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_SWITCH_MAN, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_FACILITATOR, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_WORKER, null, station);
|
||||
}
|
||||
}
|
||||
// 司机
|
||||
|
@ -113,32 +113,70 @@ public class SimulationMember extends club.joylink.rtss.simulation.SimulationMem
|
||||
* 仿真成员岗位
|
||||
*/
|
||||
public enum Type {
|
||||
/** 中心调度员 */
|
||||
/**
|
||||
* 中心调度员
|
||||
*/
|
||||
DISPATCHER,
|
||||
/** 工电调度 */
|
||||
/**
|
||||
* 工电调度
|
||||
*/
|
||||
ELECTRIC_DISPATCHER,
|
||||
/** 车辆段调度 */
|
||||
/**
|
||||
* 车辆段调度
|
||||
*/
|
||||
DEPOT_DISPATCHER,
|
||||
/** 车站值班员 */
|
||||
/**
|
||||
* 车站值班员
|
||||
*/
|
||||
STATION_SUPERVISOR,
|
||||
/** 司机 */
|
||||
/**
|
||||
* 司机
|
||||
*/
|
||||
DRIVER,
|
||||
/** 通号 */
|
||||
/**
|
||||
* 通号
|
||||
*/
|
||||
MAINTAINER,
|
||||
/** 车辆段信号楼 */
|
||||
/**
|
||||
* 车辆段信号楼
|
||||
*/
|
||||
DEPOT_SIGNAL_BUILDING,
|
||||
/** 停车场信号楼 */
|
||||
/**
|
||||
* 停车场信号楼
|
||||
*/
|
||||
PARKING_LOT_SIGNAL_BUILDING,
|
||||
/** 上级部门 */
|
||||
/**
|
||||
* 上级部门
|
||||
*/
|
||||
PARENT_DEPARTMENT,
|
||||
/** 派班员 */
|
||||
/**
|
||||
* 派班员
|
||||
*/
|
||||
SCHEDULING,
|
||||
/**
|
||||
* 大铁CTC
|
||||
*/
|
||||
RAIL_CTC,
|
||||
/** 车站助理 */
|
||||
STATION_ASSISTANT
|
||||
/**
|
||||
* 车站助理
|
||||
*/
|
||||
STATION_ASSISTANT,
|
||||
/*** 车站站长 */
|
||||
STATION_MASTER,
|
||||
/**
|
||||
* 车站信号员
|
||||
*/
|
||||
STATION_SIGNALER,
|
||||
/**
|
||||
* 车站客运员
|
||||
*/
|
||||
STATION_PASSENGER,
|
||||
/*** 车站扳道员 */
|
||||
STATION_SWITCH_MAN,
|
||||
/*** 车站引导员 */
|
||||
STATION_FACILITATOR,
|
||||
/*** 车站工务工*/
|
||||
STATION_WORKER,
|
||||
}
|
||||
|
||||
public enum Gender {
|
||||
|
Loading…
Reference in New Issue
Block a user