| | |
| | | //查询下一题题目详情 |
| | | ExamSubjectChoicesVO detail = examSubjectChoicesService.selectExamSubjectChoicesInfo(examSubjectChoices); |
| | | //判断当前题目的答题结果 |
| | | if (examSubjectChoices.getPreSubJectId()!=null) { |
| | | if (null!=examSubjectChoices.getPreResult() && examSubjectChoices.getPreResult()!="" && !examSubjectChoices.getPreResult().equals("")) { |
| | | detail.setResult(examSubjectChoicesService.getAnswerResult(examSubjectChoices.getPreSubJectId(), examSubjectChoices.getPreResult())); |
| | | }else { |
| | | if (examSubjectChoices.getPreSubJectId() != null) { |
| | | if (null != examSubjectChoices.getPreResult() && examSubjectChoices.getPreResult() != "" && !examSubjectChoices.getPreResult().equals("")) { |
| | | detail.setResult(examSubjectChoicesService.getAnswerResult(examSubjectChoices.getPreSubJectId(), examSubjectChoices.getPreResult(), examSubjectChoices.getScoreId())); |
| | | } else { |
| | | //无 |
| | | detail.setResult(3); |
| | | } |
| | |
| | | * 修改单项题目分值 |
| | | */ |
| | | @PostMapping("/updateChoicesValue") |
| | | public R updateChoicesValue(String id,String value) { |
| | | return R.status(examSubjectChoicesService.updateChoicesValue(id,value)); |
| | | public R updateChoicesValue(String id, String value) { |
| | | return R.status(examSubjectChoicesService.updateChoicesValue(id, value)); |
| | | } |
| | | |
| | | /** |
| | | * 导入题库 |
| | | * |
| | | * @param isCovered 1 覆盖 0不覆盖 |
| | | * @return |
| | | */ |
| | |
| | | ExcelUtil.export(response, "题库导入数据模板", "题库导入数据表", list, ExamSubjectExcel.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取下一题的题目,并判断上一题的答案,且返回上一题答题结果(app 模拟考试) |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @GetMapping("/getSubjectResultInfoBySimulate") |
| | | public R<ExamSubjectChoicesVO> getSubjectResultInfoBySimulate(ExamSubjectChoicesVO examSubjectChoices) { |
| | | //查询下一题题目详情 |
| | | ExamSubjectChoicesVO detail = examSubjectChoicesService.selectExamSubjectChoicesInfo(examSubjectChoices); |
| | | //判断当前题目的答题结果 |
| | | if (examSubjectChoices.getPreSubJectId() != null) { |
| | | if (null != examSubjectChoices.getPreResult() && examSubjectChoices.getPreResult() != "" && !examSubjectChoices.getPreResult().equals("")) { |
| | | detail.setResult(examSubjectChoicesService.getAnswerResultBySimulate(examSubjectChoices.getPreSubJectId(), examSubjectChoices.getPreResult(), examSubjectChoices.getSimulateExamId())); |
| | | } else { |
| | | //无 |
| | | detail.setResult(3); |
| | | } |
| | | } |
| | | //返回 |
| | | return R.data(detail); |
| | | } |
| | | |
| | | } |