|
@@ -7,14 +7,13 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.app.controller.v1;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.app.model.Result;
|
|
|
import cn.com.qmth.examcloud.app.service.ExamAdminService;
|
|
|
-import cn.com.qmth.examcloud.app.service.OnLineExamService;
|
|
|
-import cn.com.qmth.examcloud.app.service.QuestionPoolService;
|
|
|
-import cn.com.qmth.examcloud.app.service.UpYunService;
|
|
|
+import cn.com.qmth.examcloud.app.service.NetExamService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* 在线练习相关接口
|
|
@@ -28,11 +27,110 @@ public class PracticeExamRestController {
|
|
|
@Autowired
|
|
|
private ExamAdminService examAdminService;
|
|
|
@Autowired
|
|
|
- private QuestionPoolService questionPoolService;
|
|
|
- @Autowired
|
|
|
- private OnLineExamService onLineExamService;
|
|
|
- @Autowired
|
|
|
- private UpYunService upYunService;
|
|
|
+ private NetExamService netExamService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取某考生的“考试批次”列表接口")
|
|
|
+ @RequestMapping(value = "/exam/practice/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getPracticeExamList(@RequestHeader String key, @RequestHeader String token, @RequestParam String studentId) throws Exception {
|
|
|
+ return examAdminService.getPracticeExamList(key, token, studentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取某考试批次下的课程列表接口")
|
|
|
+ @RequestMapping(value = "/exam/practice/course/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getPracticeExamCourseList(@RequestHeader String key, @RequestHeader String token, @RequestParam String examId) throws Exception {
|
|
|
+ return netExamService.getPracticeExamCourseList(key, token, examId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前练习的剩余作答时间接口")
|
|
|
+ @RequestMapping(value = "/exam/record/heartbeat", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordHeartbeat(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId) throws Exception {
|
|
|
+ return netExamService.getExamRecordHeartbeat(key, token, examRecordId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "考生“开始练习”接口")
|
|
|
+ @RequestMapping(value = "/exam/record/start", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result startPracticeExamRecord(@RequestHeader String key, @RequestHeader String token, @RequestParam String examStudentId) throws Exception {
|
|
|
+ return netExamService.startPracticeExamRecord(key, token, examStudentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前练习的试卷大题结构信息接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/struct/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordPaperStructList(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId) throws Exception {
|
|
|
+ return netExamService.getExamRecordPaperStructList(key, token, examRecordId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前练习的考试基本信息接口")
|
|
|
+ @RequestMapping(value = "/exam/info/{examId}", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamInfo(@RequestHeader String key, @RequestHeader String token, @PathVariable Long examId) throws Exception {
|
|
|
+ return examAdminService.getExamInfo(key, token, examId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前练习的试卷试题列表接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/question/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordPaperQuestionList(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId) throws Exception {
|
|
|
+ return netExamService.getExamRecordPaperQuestionList(key, token, examRecordId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取考生作答的某个试题的详细信息接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/question/detail/{questionId}", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result questionDetail(@RequestHeader String key, @RequestHeader String token, @PathVariable String questionId) throws Exception {
|
|
|
+ return netExamService.getExamRecordPaperQuestionDetail(key, token, questionId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "保存或更新考生作答的某个试题答案接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/question/answer/update", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result updateExamRecordPaperQuestionAnswer(@RequestHeader String key, @RequestHeader String token, @RequestParam String examQuestionId,
|
|
|
+ @RequestParam String studentAnswer) throws Exception {
|
|
|
+ return netExamService.updateExamRecordPaperQuestionAnswer(key, token, examQuestionId, studentAnswer);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "当前练习的交卷接口")
|
|
|
+ @RequestMapping(value = "/exam/record/submit", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result submitPracticeExamRecord(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId) throws Exception {
|
|
|
+ return netExamService.submitPracticeExamRecord(key, token, examRecordId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "检查考生当前是否有正在进行的练习记录接口")
|
|
|
+ @RequestMapping(value = "/exam/record/online/check", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result checkOnlineExamRecord(@RequestHeader String key, @RequestHeader String token) throws Exception {
|
|
|
+ return netExamService.checkOnlineExamRecord(key, token);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前考生的当前课程练习统计信息接口")
|
|
|
+ @RequestMapping(value = "/exam/record/practice/course/total", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordPracticeTotalInfo(@RequestHeader String key, @RequestHeader String token, @RequestParam String examStudentId) throws Exception {
|
|
|
+ return netExamService.getExamRecordPracticeTotalInfo(key, token, examStudentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前考生的当前课程的历史练习记录接口")
|
|
|
+ @RequestMapping(value = "/exam/record/practice/course/history/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordPracticeHistoryList(@RequestHeader String key, @RequestHeader String token, @RequestParam String examStudentId) throws Exception {
|
|
|
+ return netExamService.getExamRecordPracticeHistoryList(key, token, examStudentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取成绩报告的答题情况统计接口")
|
|
|
+ @RequestMapping(value = "/exam/record/total", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordTotalInfo(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId) throws Exception {
|
|
|
+ return netExamService.getExamRecordTotalInfo(key, token, examRecordId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取作答的题列表接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/question/detail/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordQuestionDetailList(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId) throws Exception {
|
|
|
+ return netExamService.getExamRecordQuestionDetailList(key, token, examRecordId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取当前试题的音频已播放次数接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/question/get/playtimes", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result getExamRecordQuestionAudioPlayTimes(@RequestHeader String key, @RequestHeader String token, @RequestParam String questionId) throws Exception {
|
|
|
+ return netExamService.getExamRecordQuestionAudioPlayTimes(key, token, questionId);
|
|
|
+ }
|
|
|
|
|
|
+ @ApiOperation(value = "更新当前试题的音频已播放次数接口")
|
|
|
+ @RequestMapping(value = "/exam/record/paper/question/update/playtimes", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Result updateExamRecordQuestionAudioPlayTimes(@RequestHeader String key, @RequestHeader String token,
|
|
|
+ @RequestParam String questionId, @RequestParam String mediaName) throws Exception {
|
|
|
+ return netExamService.updateExamRecordQuestionAudioPlayTimes(key, token, questionId, mediaName);
|
|
|
+ }
|
|
|
|
|
|
}
|