From 9364dc4ced42ecd2d7e232ebdc7b14d6773c4031 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Fri, 30 Dec 2022 16:34:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AE=9E=E8=AE=AD=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=9D=83=E8=BD=AC=E6=8D=A2=E5=A2=9E=E5=8A=A0=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/robot/SimulationRobotService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java index 83c615ad2..bbb9cb486 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java @@ -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.service.ATOService; 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.util.*; import java.util.stream.Collectors; @@ -504,8 +506,9 @@ public class SimulationRobotService { if (simulation.getScript() != null && simulation.getScript().isBgSet()) { 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; } Map> collect = simulation.getRepository().getStationList().stream()