仿真基础信息增加联动道岔数据
This commit is contained in:
parent
df4ea3ed59
commit
47a9e54e16
@ -17,7 +17,6 @@ import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus;
|
||||
import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO;
|
||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||
import club.joylink.rtss.simulation.cbtc.script.ScriptBO;
|
||||
import club.joylink.rtss.simulation.cbtc.vo.SimulationWorkParamVO;
|
||||
import club.joylink.rtss.simulation.vo.SimulationInfoVO;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -264,14 +263,6 @@ public class SimulationV1Controller {
|
||||
this.groupSimulationService.planOver(group);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 清除仿真
|
||||
// */
|
||||
// @DeleteMapping("/{group}/clear")
|
||||
// public void clearSimulation(@PathVariable String group, @RequestAttribute AccountVO user) {
|
||||
// this.groupSimulationService.clearSimulation(group, user);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 退出仿真(主要是非房主用户退出综合演练用)
|
||||
*/
|
||||
@ -317,22 +308,6 @@ public class SimulationV1Controller {
|
||||
return this.groupSimulationService.getSimulationMembers(group);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 仿真暂停
|
||||
// */
|
||||
// @PutMapping(path = "/{group}/pause")
|
||||
// public void pause(@PathVariable String group) {
|
||||
// groupSimulationService.pauseSimulation(group);
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 仿真恢复运行
|
||||
// */
|
||||
// @PutMapping(path = "/{group}/resume")
|
||||
// public void resume(@PathVariable String group) {
|
||||
// groupSimulationService.resumeSimulation(group);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取仿真设备故障列表
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
package club.joylink.rtss.simulation.cbtc.data.vo;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
||||
import club.joylink.rtss.simulation.cbtc.vo.SimulationWorkParamVO;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.runplan.RunPlanVO;
|
||||
@ -11,9 +12,7 @@ import lombok.Setter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@ -58,6 +57,8 @@ public class SimulationVO {
|
||||
|
||||
private SimulationWorkParamVO paramVO;
|
||||
|
||||
private Map<String, String> linkSwitchMap;
|
||||
|
||||
public static SimulationVO buildBasicInfo(Simulation simulation) {
|
||||
MapVO map = simulation.getBuildParams().getMap();
|
||||
MapVO mapVO = new MapVO();
|
||||
@ -75,6 +76,16 @@ public class SimulationVO {
|
||||
creator.setName(user.getName());
|
||||
creator.setNickname(user.getNickname());
|
||||
SimulationWorkParamVO workParamVO = simulation.getBuildParams().getWorkParamVO();
|
||||
Map<String, String> linkSwitchMap = new HashMap<>();
|
||||
if (simulation.getRepository().getConfig().isSwitchLossChain()) {
|
||||
List<Switch> switchList = simulation.getRepository().getSwitchList();
|
||||
switchList.forEach(aSwitch -> {
|
||||
Switch linkedSwitch = aSwitch.queryLinkedSwitch();
|
||||
if (linkedSwitch != null) {
|
||||
linkSwitchMap.put(aSwitch.getCode(), linkedSwitch.getCode());
|
||||
}
|
||||
});
|
||||
}
|
||||
return SimulationVO.builder()
|
||||
.group(simulation.getId())
|
||||
.map(mapVO)
|
||||
@ -91,6 +102,7 @@ public class SimulationVO {
|
||||
.error(simulation.isError())
|
||||
.delTime(simulation.getDelBaseTime())
|
||||
.paramVO(workParamVO)
|
||||
.linkSwitchMap(linkSwitchMap)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user