【删除实训仿真暂停操作】

This commit is contained in:
weizhihong 2022-09-16 15:57:36 +08:00
parent 8d3d31c94f
commit 7bc5c11e5d

View File

@ -298,8 +298,6 @@ public class Training2Service {
if (result) { if (result) {
checkStepCompletionAndSendNext(step, simulation); // 直接检查步骤是否完成 checkStepCompletionAndSendNext(step, simulation); // 直接检查步骤是否完成
} }
// 恢复前端运行
pauseOrStartSimulation(simulation, false);
} }
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -342,8 +340,6 @@ public class Training2Service {
if (!Step2.StepStatus.isCompletion(operation.getStatus())) { if (!Step2.StepStatus.isCompletion(operation.getStatus())) {
operation.doOperated(); //操作过后 operation.doOperated(); //操作过后
tryCompleteOperation(simulation, step, operation); // 尝试完成 tryCompleteOperation(simulation, step, operation); // 尝试完成
// 恢复前端运行
pauseOrStartSimulation(simulation, false);
} }
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -393,8 +389,6 @@ public class Training2Service {
// 发送操作完成信息 // 发送操作完成信息
applicationContext.publishEvent(new SimulationOperationErrorEvent(this, simulation, operation2, step)); applicationContext.publishEvent(new SimulationOperationErrorEvent(this, simulation, operation2, step));
} }
// 操作完成后,如果是测验模式则仿真启动
pauseOrStartSimulation(simulation, false);
// 检查是否要计算指标 // 检查是否要计算指标
if (!CollectionUtils.isEmpty(training2.getIndexList())) { if (!CollectionUtils.isEmpty(training2.getIndexList())) {
training2.getIndexList().stream() training2.getIndexList().stream()
@ -630,7 +624,6 @@ public class Training2Service {
} }
return true; return true;
} else { // 非机器人暂停仿真等待用户操作 } else { // 非机器人暂停仿真等待用户操作
pauseOrStartSimulation(simulation, true);
return false; 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();
}
}
}
/** /**
* 移除实训任务 * 移除实训任务
*/ */