大赛管理功能

This commit is contained in:
tiger_zhou 2024-03-12 09:37:21 +08:00
parent 352c44a280
commit 5f2c1133ca
2 changed files with 19 additions and 11 deletions

View File

@ -972,6 +972,8 @@ public class Training2Service {
if (!simulation.getTraining2().isJumpStep(step) && !step.getSimulationMember().isRobot()) {
applicationContext.publishEvent(
new SimulationTrainingAudioEvent(this, simulation, step, simOperation2, doCompletion));
/*
取消 发送请重试语音
if (!doCompletion) {
Operation.Type operationType;
HashMap<String, Object> params = new HashMap<>(event.getParams());
@ -997,7 +999,7 @@ public class Training2Service {
params.put("content", compose.getMessage());
atsOperationDispatcher.execute(simulation, member, operationType.name(), params);
}
}
}*/
}
}

View File

@ -7,6 +7,9 @@ import club.joylink.rtss.simulation.cbtc.training2.Step2;
import club.joylink.rtss.simulation.cbtc.training2.Training2;
import lombok.Getter;
/**
* 发送实训当前阶段完成情况
*/
@Getter
public class SimulationTrainingAudioEvent extends AbstractSimulationEvent {
@ -14,9 +17,12 @@ public class SimulationTrainingAudioEvent extends AbstractSimulationEvent {
private Operation2.SimCommand2 operation2;
/**
* 结果是否匹配
*/
private boolean matchResult;
public SimulationTrainingAudioEvent(Object source, Simulation simulation,Step2 step, Operation2.SimCommand2 operation2, boolean matchResult) {
public SimulationTrainingAudioEvent(Object source, Simulation simulation, Step2 step, Operation2.SimCommand2 operation2, boolean matchResult) {
super(source, simulation);
this.step = step;
this.operation2 = operation2;