Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1
This commit is contained in:
commit
9a3cc981de
@ -240,12 +240,12 @@ public class Training2Service {
|
||||
throw new SimulationException(SimulationExceptionType.Invalid_Operation, "无权限操作实训");
|
||||
}
|
||||
Training2 training2 = simulation.getTraining2();
|
||||
if (training2 == null) {
|
||||
throw new SimulationException(SimulationExceptionType.Invalid_Operation, "实训数据不存在");
|
||||
if (training2 != null) {
|
||||
training2.finish();
|
||||
training2.mark();
|
||||
}
|
||||
simulation.removeJob(SCORING_JOB_NAME); //移除打分监视任务
|
||||
training2.finish();
|
||||
training2.mark();
|
||||
simulation.removeJob(EXECUTE_JOB_NAME); //移除实训执行任务
|
||||
// 暂停仿真
|
||||
simulationLifeCycleService.pause(simulation);
|
||||
}
|
||||
@ -455,7 +455,10 @@ public class Training2Service {
|
||||
*/
|
||||
private void loadTraining(Simulation simulation, DraftTraining2WithBLOBs draftTraining2, LoginUserInfoVO loginUserInfoVO) {
|
||||
Training2 training2 = new Training2(draftTraining2, simulation);
|
||||
groupSimulationService.loadScenes(simulation.getId(), training2.getBgSceneJson());
|
||||
// 没有背景不做加载
|
||||
if (!StringUtils.isEmpty(training2.getBgSceneJson())) {
|
||||
groupSimulationService.loadScenes(simulation.getId(), training2.getBgSceneJson());
|
||||
}
|
||||
simulation.setTraining2(training2);
|
||||
// 如果是单操,设置为步骤指定角色
|
||||
if (Training2.Type.SINGLE.equals(training2.getType())) {
|
||||
|
@ -121,6 +121,7 @@ public class Training2 {
|
||||
this.needReloadScenes = true;
|
||||
this.started = true;
|
||||
this.mode = mode;
|
||||
this.finish = false;
|
||||
if (this.steps != null) {
|
||||
this.steps.forEach(Step2::reset);
|
||||
}
|
||||
@ -128,6 +129,7 @@ public class Training2 {
|
||||
|
||||
public boolean finish() {
|
||||
this.finish = true;
|
||||
this.needReloadScenes = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user