|
@@ -1,8 +1,8 @@
|
|
|
package cn.com.qmth.examcloud.core.oe.admin.api.controller;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.commons.helpers.QuestionOptionHelper;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.base.utils.Check;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordQuestionsRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamQuestionEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordQuestionsEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataSyncService;
|
|
@@ -34,7 +34,6 @@ import java.util.stream.Collectors;
|
|
|
* @author chenken
|
|
|
* @date 2018年10月12日 上午9:48:47
|
|
|
* @company QMTH
|
|
|
- * @description ExamRecordQuestionsController.java
|
|
|
*/
|
|
|
@Api(tags = "考试结束后-作答记录接口")
|
|
|
@RestController
|
|
@@ -43,9 +42,6 @@ public class ExamRecordQuestionsController extends ControllerSupport {
|
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(ExamRecordQuestionsController.class);
|
|
|
|
|
|
- @Autowired
|
|
|
- private ExamRecordQuestionsRepo examRecordQuestionsRepo;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ExamRecordQuestionsService examRecordQuestionsService;
|
|
|
|
|
@@ -80,9 +76,7 @@ public class ExamRecordQuestionsController extends ControllerSupport {
|
|
|
for (ExamQuestionEntity examQuestion : examQuestions) {
|
|
|
if (QuestionType.isObjective(examQuestion.getQuestionType())) {
|
|
|
// 客观题得分
|
|
|
- if (examQuestion.getStudentAnswer() != null && examQuestion.getCorrectAnswer() != null
|
|
|
- // && QuestionOptionHelper.isEqualAnswer(examQuestion.getCorrectAnswer(), examQuestion.getStudentAnswer())) {
|
|
|
- && examQuestion.getStudentAnswer().equals(examQuestion.getCorrectAnswer())) {
|
|
|
+ if (QuestionOptionHelper.isEqualAnswer(examQuestion.getCorrectAnswer(), examQuestion.getStudentAnswer())) {
|
|
|
examQuestion.setStudentScore(examQuestion.getQuestionScore());
|
|
|
} else {
|
|
|
examQuestion.setStudentScore(0d);
|