| | |
| | | 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.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | |
| | | public R<IPage<ExamPaperVO>> list(@ApiIgnore @RequestParam Map<String, Object> exam, Query query) { |
| | | IPage<ExamPaper> pages = examPaperService.page(Condition.getPage(query), Condition.getQueryWrapper(exam, ExamPaper.class)); |
| | | return R.data(ExamPaperWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/pages") |
| | | public R<IPage<ExamPaperVO>> page(ExamPaperVO exam, Query query) { |
| | | IPage<ExamPaperVO> pages = examPaperService.selectExamPaperPage(Condition.getPage(query), exam); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 随机生成考试题目 |
| | | */ |
| | | @GetMapping("/queryRandomSubject") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "考试题目绑定", notes = "传入exam") |
| | | public R<List> queryRandomSubject(@ApiParam(value = "主键集合") ExamPaper exam) { |
| | | List<ExamPaperSubjectVO> subject = examPaperService.queryRandomSubject(exam); |
| | | return R.data(subject); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 返回当前时间 |
| | | */ |
| | | @GetMapping("/getdate") |
| | |
| | | |
| | | return R.status(examPaperService.UnbindSubject(paperid,subjectid)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询考生考试信息 |
| | | * @param userId 用户id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getExamDetail") |
| | | public R getExamDetail(String userId){ |
| | | return R.data(examPaperService.getExamDetail(userId)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |