| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.simulateexam.entity.SimulateExamRecord; |
| | | import org.springblade.modules.simulateexam.service.SimulateExamRecordService; |
| | | import org.springblade.modules.simulateexam.vo.SimulateExamRecordVO; |
| | | import org.springblade.modules.simulateexam.vo.SimulateExamScoreVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(simulateExamRecordService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 首次点击开始考试,创建模拟考试 |
| | | * @param simulateExamRecord 模拟考试记录对象信息 |
| | | * @return |
| | | */ |
| | | @PostMapping("/beginExam") |
| | | public R beginExam(@RequestBody SimulateExamRecord simulateExamRecord) { |
| | | return R.data(simulateExamRecordService.insertSimulateExamRecord(simulateExamRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 考试暂停后继续,1查询所有的答题信息,2查询所有的已答信息 3其他信息 |
| | | * @param simulateExamRecord 必须包含 模拟考试id, type 1: 继续考试 2: 放弃之前的考试,重新生成题目考试 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSimulateExamRefreshInfo") |
| | | public R getSimulateExamRefreshInfo(SimulateExamRecordVO simulateExamRecord){ |
| | | return R.data(simulateExamRecordService.getSimulateExamRefreshInfo(simulateExamRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 答题途中暂停考试 |
| | | * @param simulateExamRecord 模拟考试记录对象信息 |
| | | * @return |
| | | */ |
| | | @PostMapping("/pauseExam") |
| | | public R pauseExam(@RequestBody SimulateExamRecord simulateExamRecord) { |
| | | return R.data(simulateExamRecordService.pauseExam(simulateExamRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 模拟考试开始页面,查询是否有暂停中的模拟考试 |
| | | * @param simulateExamRecord 模拟考试记录对象信息(必须包含 idCardNo) |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSimulateExamRecordInfo") |
| | | public R getSimulateExamRecordInfo(SimulateExamRecord simulateExamRecord) { |
| | | return R.data(simulateExamRecordService.getSimulateExamRecordInfo(simulateExamRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 提交考试 |
| | | * |
| | | * @param simulateExamScore 模拟考试成绩信息对象 |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveSimulateExam") |
| | | public R saveSimulateExam(@RequestBody SimulateExamScoreVO simulateExamScore) { |
| | | return R.data(simulateExamRecordService.saveSimulateExam(simulateExamScore)); |
| | | } |
| | | } |