【实训控制权转换增加背景判断】

This commit is contained in:
weizhihong 2022-12-30 16:34:31 +08:00
parent 4faff6bb77
commit 9364dc4ced

View File

@ -25,10 +25,12 @@ import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
import club.joylink.rtss.simulation.cbtc.onboard.ATO.SpeedCurve; import club.joylink.rtss.simulation.cbtc.onboard.ATO.SpeedCurve;
import club.joylink.rtss.simulation.cbtc.onboard.ATO.service.ATOService; import club.joylink.rtss.simulation.cbtc.onboard.ATO.service.ATOService;
import club.joylink.rtss.simulation.cbtc.onboard.ATP.ATPService; import club.joylink.rtss.simulation.cbtc.onboard.ATP.ATPService;
import club.joylink.rtss.simulation.cbtc.training2.Training2;
import club.joylink.rtss.vo.client.operation.DriveParamVO; import club.joylink.rtss.vo.client.operation.DriveParamVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -504,8 +506,9 @@ public class SimulationRobotService {
if (simulation.getScript() != null && simulation.getScript().isBgSet()) { if (simulation.getScript() != null && simulation.getScript().isBgSet()) {
return; return;
} }
// 实训场景模式处于编制状态的实训不做自动转换处理 // 实训场景模式已设置背景处于编制状态的实训不做自动转换处理
if (simulation.getTraining2() != null && simulation.getTraining2().isScene() && !simulation.getTraining2().isRunning()) { Training2 training2 = simulation.getTraining2();
if (training2 != null && training2.isScene() && StringUtils.hasText(training2.getBgSceneJson()) && !training2.isRunning()) {
return; return;
} }
Map<SimulationMember, List<Station>> collect = simulation.getRepository().getStationList().stream() Map<SimulationMember, List<Station>> collect = simulation.getRepository().getStationList().stream()