|
@@ -1200,6 +1200,36 @@ public class ExamController extends ControllerSupport {
|
|
examOrgSettingsRepo.deleteByExamIdAndOrgId(examId, orgId);
|
|
examOrgSettingsRepo.deleteByExamIdAndOrgId(examId, orgId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "学习中心禁考", notes = "")
|
|
|
|
+ @PutMapping("setOrgExamLimited/{ids}")
|
|
|
|
+ public List<String> setOrgExamLimited(@PathVariable String ids) {
|
|
|
|
+ List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ List<String> ret = Lists.newArrayList();
|
|
|
|
+ for (Long cur : orgSettingsIds) {
|
|
|
|
+ ExamOrgSettingsEntity entity = examOrgSettingsRepo.findOne(cur);
|
|
|
|
+ entity.setExamLimit(true);
|
|
|
|
+ examOrgSettingsRepo.save(entity);
|
|
|
|
+ ret.add(entity.getExamId() + ":" + entity.getOrgId());
|
|
|
|
+ }
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "学习中心开考", notes = "")
|
|
|
|
+ @PutMapping("setOrgExamNotLimited/{ids}")
|
|
|
|
+ public List<String> setOrgExamNotLimited(@PathVariable String ids) {
|
|
|
|
+ List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ List<String> ret = Lists.newArrayList();
|
|
|
|
+ for (Long cur : orgSettingsIds) {
|
|
|
|
+ ExamOrgSettingsEntity entity = examOrgSettingsRepo.findOne(cur);
|
|
|
|
+ entity.setExamLimit(false);
|
|
|
|
+ examOrgSettingsRepo.save(entity);
|
|
|
|
+ ret.add(entity.getExamId() + ":" + entity.getOrgId());
|
|
|
|
+ }
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 方法注释
|
|
* 方法注释
|
|
*
|
|
*
|