大赛管理功能

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

View File

@ -7,19 +7,25 @@ import club.joylink.rtss.simulation.cbtc.training2.Step2;
import club.joylink.rtss.simulation.cbtc.training2.Training2; import club.joylink.rtss.simulation.cbtc.training2.Training2;
import lombok.Getter; import lombok.Getter;
/**
* 发送实训当前阶段完成情况
*/
@Getter @Getter
public class SimulationTrainingAudioEvent extends AbstractSimulationEvent { public class SimulationTrainingAudioEvent extends AbstractSimulationEvent {
private Step2 step; private Step2 step;
private Operation2.SimCommand2 operation2; private Operation2.SimCommand2 operation2;
private boolean matchResult; /**
* 结果是否匹配
*/
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); super(source, simulation);
this.step = step; this.step = step;
this.operation2 = operation2; this.operation2 = operation2;
this.matchResult = matchResult; this.matchResult = matchResult;
} }
} }