This commit is contained in:
tiger_zhou 2023-05-30 16:39:33 +08:00
commit 6cfa675ead
2 changed files with 12 additions and 8 deletions

View File

@ -143,7 +143,6 @@ public class Training2Service {
if (training2 == null || !training2.isStarted() || training2.isFinish()) {
// 结束并移除运行任务
removeTrainingJob(simulation);
trainingStatusMessage(simulation, 0);
return;
}
// 获取运行步骤
@ -276,7 +275,7 @@ public class Training2Service {
// 创建者退出则清理实训
if (simulation.getCreator().getId().equals(user.getId())) {
training2.finish();
simulation.start();
trainingStatusMessage(simulation, 0);
}
} else {
return List.of();

View File

@ -303,12 +303,17 @@ public class Simulation extends club.joylink.rtss.simulation.Simulation<Simulati
SimulationBuildParams buildParams = this.getBuildParams();
List<ConversationGroupVO> conversationGroupVOList = buildParams.getMap().getGraphDataNew()
.getConversationGroupMap().get(buildParams.getWorkParamVO().getType());
Map<Long, ConversationGroup> groupMap = conversationGroupVOList.stream().filter(ConversationGroupVO::isValid)
.map(g ->{
ConversationGroup group = new ConversationGroup(this, g);
group.initGroupType();
return group;
}).collect(Collectors.toMap(ConversationGroup::getId, group -> group));
Map<Long, ConversationGroup> groupMap = null;
if (CollectionUtils.isEmpty(conversationGroupVOList)) {
groupMap = new HashMap<>();
} else {
groupMap = conversationGroupVOList.stream().filter(ConversationGroupVO::isValid)
.map(g ->{
ConversationGroup group = new ConversationGroup(this, g);
group.initGroupType();
return group;
}).collect(Collectors.toMap(ConversationGroup::getId, group -> group));
}
overCoverConversationGroupMap(groupMap);
}