|
@@ -39,12 +39,13 @@ import cn.com.qmth.examcloud.service.examwork.dao.ExamRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.api.bean.CourseGroupBean;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.CourseGroupRelationRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.CourseGroupRepo;
|
|
|
-import cn.com.qmth.examcloud.service.examwork.dao.ExamSetting4OrgRepo;
|
|
|
+import cn.com.qmth.examcloud.service.examwork.dao.ExamOrgRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamStudentRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.Exam;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.CourseGroup;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.CourseGroupRelation;
|
|
|
-import cn.com.qmth.examcloud.service.examwork.entity.ExamSetting4Org;
|
|
|
+import cn.com.qmth.examcloud.service.examwork.entity.ExamOrg;
|
|
|
+import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgPK;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamStudent;
|
|
|
import cn.com.qmth.examcloud.service.examwork.enums.ExamType;
|
|
|
import cn.com.qmth.examcloud.service.examwork.service.ExamService;
|
|
@@ -74,7 +75,7 @@ public class ExamApi extends ControllerSupport {
|
|
|
CourseGroupRepo courseGroupRepo;
|
|
|
|
|
|
@Autowired
|
|
|
- ExamSetting4OrgRepo examSetting4OrgRepo;
|
|
|
+ ExamOrgRepo examOrgRepo;
|
|
|
|
|
|
@Autowired
|
|
|
CourseGroupRelationRepo courseGroupRelationRepo;
|
|
@@ -387,34 +388,43 @@ public class ExamApi extends ControllerSupport {
|
|
|
courseGroupRelationRepo.save(relationList);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "删除课程组", notes = "删除特殊考试设置")
|
|
|
+ @ApiOperation(value = "删除课程组", notes = "")
|
|
|
@DeleteMapping("/exam/courseGroup/{id}")
|
|
|
public void deleteSpecificExam(@PathVariable Long id, HttpServletRequest request) {
|
|
|
courseGroupRepo.delete(id);
|
|
|
courseGroupRelationRepo.deleteByGroupId(id);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "查询考试相关的学习中心设置", notes = "查询考试相关的学习中心设置")
|
|
|
- @GetMapping("/exam/examSetting4OrgList/{examId}/{curPage}/{pageSize}")
|
|
|
- public List<?> getExamSetting4OrgList(@PathVariable Long examId, @PathVariable Integer curPage,
|
|
|
+ @ApiOperation(value = "查询考试相关的学习中心设置", notes = "")
|
|
|
+ @GetMapping("/exam/getExamOrgList/{examId}/{curPage}/{pageSize}")
|
|
|
+ public List<?> getExamOrgList(@PathVariable Long examId, @PathVariable Integer curPage,
|
|
|
@PathVariable Integer pageSize) {
|
|
|
Pageable pageable = new PageRequest(curPage, pageSize, Sort.Direction.DESC, "updateTime");
|
|
|
- List<ExamSetting4Org> allByExamId = examSetting4OrgRepo.findAllByExamId(examId, pageable);
|
|
|
+ List<ExamOrg> allByExamId = examOrgRepo.findAllByExamId(examId, pageable);
|
|
|
return allByExamId;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "新增考试相关的学习中心设置", notes = "新增考试相关的学习中心设置")
|
|
|
- @PostMapping("/exam/examSetting4Org")
|
|
|
- public ExamSetting4Org addExamSetting4Org(@RequestBody ExamSetting4Org examSetting4Org) {
|
|
|
- ExamSetting4Org ret = examSetting4OrgRepo.save(examSetting4Org);
|
|
|
+ @ApiOperation(value = "新增考试相关的学习中心设置", notes = "")
|
|
|
+ @PostMapping("/exam/examOrg")
|
|
|
+ public ExamOrg addExamOrg(@RequestBody ExamOrg examOrg) {
|
|
|
+ ExamOrg ret = examOrgRepo.save(examOrg);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "更新考试相关的学习中心设置", notes = "更新考试相关的学习中心设置")
|
|
|
- @PutMapping("/exam/examSetting4Org")
|
|
|
- public ExamSetting4Org updateExamSetting4Org(@RequestBody ExamSetting4Org examSetting4Org) {
|
|
|
- ExamSetting4Org ret = examSetting4OrgRepo.save(examSetting4Org);
|
|
|
+ @ApiOperation(value = "更新考试相关的学习中心设置", notes = "")
|
|
|
+ @PutMapping("/exam/examOrg")
|
|
|
+ public ExamOrg updateExamOrg(@RequestBody ExamOrg examOrg) {
|
|
|
+ ExamOrg ret = examOrgRepo.save(examOrg);
|
|
|
return ret;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "删除考试相关的学习中心设置", notes = "")
|
|
|
+ @DeleteMapping("/exam/examOrg/{examId}/{orgId}")
|
|
|
+ public void deleteExamOrg(@PathVariable Long examId, @PathVariable Long orgId) {
|
|
|
+ ExamOrg examOrg = new ExamOrg();
|
|
|
+ examOrg.setExamId(examId);
|
|
|
+ examOrg.setOrgId(orgId);
|
|
|
+ examOrgRepo.delete(examOrg);
|
|
|
+ }
|
|
|
|
|
|
}
|