车站实训修改

This commit is contained in:
DU 2021-02-02 10:29:53 +08:00
parent cfac9c6d9f
commit 12b6bca36a

View File

@ -22,10 +22,7 @@ public class StationGeneratorNew implements GeneratorNew {
public List<TrainingNewVO> generate(GenerateConfig config, Simulation simulation, OperateDefinitionVO operateDefinitionVO) { public List<TrainingNewVO> generate(GenerateConfig config, Simulation simulation, OperateDefinitionVO operateDefinitionVO) {
List<TrainingNewVO> trainingVOList = new ArrayList<>(); List<TrainingNewVO> trainingVOList = new ArrayList<>();
//找到所有有控制模式的车站 //找到所有有控制模式的车站
List<Station> stationList = simulation.getRepository().getStationList() List<Station> stationList = simulation.getRepository().getStationList();
.stream()
.filter(station -> station.isHasControlMode())
.collect(Collectors.toList());
//对每个站根据实训设置场景 //对每个站根据实训设置场景
for (Station station : stationList) { for (Station station : stationList) {
switch (Operation.Type.valueOf (operateDefinitionVO.getOperateType())) { switch (Operation.Type.valueOf (operateDefinitionVO.getOperateType())) {