|
@@ -238,10 +238,10 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
sql.append(" and exam_stage_id=" + query.getExamStageId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getStudentCode())) {
|
|
|
- sql.append(" and student_code LIKE '%" + query.getStudentCode() + "%'");
|
|
|
+ sql.append(" and student_code LIKE '" + query.getStudentCode() + "%'");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getStudentName())) {
|
|
|
- sql.append(" and student_name LIKE '%" + query.getStudentName() + "%'");
|
|
|
+ sql.append(" and student_name LIKE '" + query.getStudentName() + "%'");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getIdentityNumber())) {
|
|
|
sql.append(" and identity_number LIKE '" + query.getIdentityNumber() + "%'");
|
|
@@ -314,10 +314,10 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
sql.append(" and exam_stage_id=" + query.getExamStageId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getStudentCode())) {
|
|
|
- sql.append(" and student_code LIKE '%" + query.getStudentCode() + "%'");
|
|
|
+ sql.append(" and student_code LIKE '" + query.getStudentCode() + "%'");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getStudentName())) {
|
|
|
- sql.append(" and student_name LIKE '%" + query.getStudentName() + "%'");
|
|
|
+ sql.append(" and student_name LIKE '" + query.getStudentName() + "%'");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getIdentityNumber())) {
|
|
|
sql.append(" and identity_number LIKE '" + query.getIdentityNumber() + "%'");
|
|
@@ -692,10 +692,10 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
|
|
|
//超过可考次数,始终为可考次数+1
|
|
|
if (usedExamNum > canExamTimes) {
|
|
|
- return canExamTimes;
|
|
|
+ return canExamTimes + 1;
|
|
|
}
|
|
|
|
|
|
- return usedExamNum;
|
|
|
+ return usedExamNum + 1;
|
|
|
}
|
|
|
|
|
|
private boolean isExamRecordEnded(ExamRecordData examRecordData) {
|
|
@@ -740,7 +740,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
// 所有客观题的试题ID列表
|
|
|
List<ExamQuestionEntity> examQuestions = examRecordQuestion.getExamQuestionEntities();
|
|
|
Set<String> objectiveQuestionIds = examQuestions.stream()
|
|
|
- .filter(e -> isObjective(e.getQuestionType()))
|
|
|
+ .filter(e -> QuestionType.isObjective(e.getQuestionType()))
|
|
|
.map(ExamQuestionEntity::getQuestionId)
|
|
|
.collect(Collectors.toSet());
|
|
|
|
|
@@ -757,7 +757,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
for (ExamQuestionEntity e : questionUnits) {
|
|
|
- if (isObjective(e.getQuestionType())) {
|
|
|
+ if (QuestionType.isObjective(e.getQuestionType())) {
|
|
|
totalObjective++;
|
|
|
}
|
|
|
}
|
|
@@ -784,7 +784,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
|
|
|
for (int i = 0; i < questionUnits.size(); i++) {
|
|
|
ExamQuestionEntity curQuestion = questionUnits.get(i);
|
|
|
- if (!isObjective(curQuestion.getQuestionType())) {
|
|
|
+ if (!QuestionType.isObjective(curQuestion.getQuestionType())) {
|
|
|
// 跳过套题内主观题
|
|
|
continue;
|
|
|
}
|
|
@@ -844,17 +844,4 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 是否为客观题
|
|
|
- */
|
|
|
- public static boolean isObjective(QuestionType type) {
|
|
|
- if (type == null) {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- return QuestionType.SINGLE_CHOICE == type
|
|
|
- || QuestionType.MULTIPLE_CHOICE == type
|
|
|
- || QuestionType.TRUE_OR_FALSE == type;
|
|
|
- }
|
|
|
-
|
|
|
}
|