回滚创建仿真的限制

This commit is contained in:
joylink_zhangsai 2023-05-06 18:20:56 +08:00
parent 19acb558c2
commit 877372b2cd

View File

@ -196,17 +196,17 @@ public class SimulationServiceImpl implements SimulationService {
@Override
public String createSimulation(Long mapFunctionId, LoginUserInfoVO loginInfo) {
MapFunctionVO mapFunctionVO = rtsMapFunctionService.get(mapFunctionId);
List<String> userExistGroup = this.groupSimulationService.getUserRunningSimulationGroups(loginInfo.getAccountVO());
if(!CollectionUtils.isEmpty(userExistGroup)){
String group = userExistGroup.get(0);
Simulation simulation = this.groupSimulationService.getSimulationByGroup(group);
if(Objects.equals(simulation.getMapFunctionId(), mapFunctionId)){
BusinessExceptionAssertEnum.OPERATION_REPEAT.assertNotTrue(mapFunctionVO.getParamVO().getDomConfig().isHasExam(),"考试只能单独用户操作");
return group;
}else{
BusinessExceptionAssertEnum.OPERATION_REPEAT.assertNotTrue(!CollectionUtils.isEmpty(userExistGroup),"用户重复创建仿真");
}
}
// List<String> userExistGroup = this.groupSimulationService.getUserRunningSimulationGroups(loginInfo.getAccountVO());
// if(!CollectionUtils.isEmpty(userExistGroup)){
// String group = userExistGroup.get(0);
// Simulation simulation = this.groupSimulationService.getSimulationByGroup(group);
// if(Objects.equals(simulation.getMapFunctionId(), mapFunctionId)){
// BusinessExceptionAssertEnum.OPERATION_REPEAT.assertNotTrue(mapFunctionVO.getParamVO().getDomConfig().isHasExam(),"考试只能单独用户操作");
// return group;
// }else{
// BusinessExceptionAssertEnum.OPERATION_REPEAT.assertNotTrue(!CollectionUtils.isEmpty(userExistGroup),"用户重复创建仿真");
// }
// }
Long mapId = mapFunctionVO.getMapId();