diff --git a/src/main/java/club/joylink/rtss/services/training2/Training2Service.java b/src/main/java/club/joylink/rtss/services/training2/Training2Service.java index b0dfb9e71..dfa057d1b 100644 --- a/src/main/java/club/joylink/rtss/services/training2/Training2Service.java +++ b/src/main/java/club/joylink/rtss/services/training2/Training2Service.java @@ -193,7 +193,6 @@ public class Training2Service { simulationLoadTraining(group, draftTraining2, loginUserInfoVO); } - /** * 开启实训 */ @@ -209,7 +208,7 @@ public class Training2Service { if (training2 == null) { throw new SimulationException(SimulationExceptionType.Invalid_Operation, "实训数据不存在"); } - if (training2.isNeedReloadScenes()) { + if (training2.isNeedReloadScenes() && !StringUtils.isEmpty(training2.getBgSceneJson())) { simulation.pause(); // 先暂停 groupSimulationService.loadScenes(simulation.getId(), training2.getBgSceneJson()); } @@ -496,10 +495,6 @@ public class Training2Service { * 检验实训数据是否合规 */ private Consumer trainingDataValid = (training) -> { - if (!StringUtils.hasText(training.getBgSceneJson())) { - throw new SimulationException(SimulationExceptionType.Invalid_Operation - , String.format("实训{id:[%s]}没有背景", training.getId())); - } if (!StringUtils.hasText(training.getPlayerIdJson())) { throw new SimulationException(SimulationExceptionType.Invalid_Operation , String.format("实训{id:[%s]}没有参训角色", training.getId())); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/training2/Step2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/training2/Step2.java index 1f7177803..d46d01a2a 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/training2/Step2.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/training2/Step2.java @@ -239,14 +239,14 @@ public class Step2 { * 是否失败 */ public static boolean isFail(StepStatus status) { - return status != null && status.type.equals(FAIL); + return status != null && status.equals(FAIL); } /** * 是在运行状态 */ public static boolean isRunning(StepStatus status) { - return status != null && status.type.equals(RUNNING); + return status != null && status.equals(RUNNING); } }