【删除实训仿真暂停操作】
This commit is contained in:
parent
8d3d31c94f
commit
7bc5c11e5d
@ -298,8 +298,6 @@ public class Training2Service {
|
||||
if (result) {
|
||||
checkStepCompletionAndSendNext(step, simulation); // 直接检查步骤是否完成
|
||||
}
|
||||
// 恢复前端运行
|
||||
pauseOrStartSimulation(simulation, false);
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
@ -342,8 +340,6 @@ public class Training2Service {
|
||||
if (!Step2.StepStatus.isCompletion(operation.getStatus())) {
|
||||
operation.doOperated(); //操作过后
|
||||
tryCompleteOperation(simulation, step, operation); // 尝试完成
|
||||
// 恢复前端运行
|
||||
pauseOrStartSimulation(simulation, false);
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
@ -393,8 +389,6 @@ public class Training2Service {
|
||||
// 发送操作完成信息
|
||||
applicationContext.publishEvent(new SimulationOperationErrorEvent(this, simulation, operation2, step));
|
||||
}
|
||||
// 操作完成后,如果是测验模式则仿真启动
|
||||
pauseOrStartSimulation(simulation, false);
|
||||
// 检查是否要计算指标
|
||||
if (!CollectionUtils.isEmpty(training2.getIndexList())) {
|
||||
training2.getIndexList().stream()
|
||||
@ -630,7 +624,6 @@ public class Training2Service {
|
||||
}
|
||||
return true;
|
||||
} else { // 非机器人,暂停仿真等待用户操作
|
||||
pauseOrStartSimulation(simulation, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -669,23 +662,6 @@ public class Training2Service {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停、恢复实训
|
||||
*/
|
||||
private void pauseOrStartSimulation(Simulation simulation, boolean isPause) {
|
||||
Training2 training2 = simulation.getTraining2();
|
||||
if (training2 == null) {
|
||||
return;
|
||||
}
|
||||
if (!ScriptBO.Mode.TEST_MODE.equals(training2.getMode())) {
|
||||
if (isPause) {
|
||||
simulation.onlyPause();
|
||||
} else {
|
||||
simulation.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除实训任务
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user