|
@@ -68,22 +68,29 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
|
|
|
ExamType examType = ExamType.strToEnum(getExamResp.getExamBean().getExamType());
|
|
|
|
|
|
List<ExamRecordForMarkingEntity> examRecordForMarkingList;
|
|
|
- if (StringUtils.isEmpty(batchNum)){
|
|
|
+
|
|
|
+ GetExamPropertyReq getExamPropertyReq = new GetExamPropertyReq();
|
|
|
+ getExamPropertyReq.setExamId(examId);
|
|
|
+ getExamPropertyReq.setKey("MARKING_TYPE");
|
|
|
+ GetExamPropertyResp getExamPropertyResp = examCloudService.getExamProperty(getExamPropertyReq);
|
|
|
+
|
|
|
+ String markingType = getExamPropertyResp.getValue();
|
|
|
+ if (StringUtils.isEmpty(batchNum)) {
|
|
|
examRecordForMarkingList =
|
|
|
examRecordForMarkingRepo.findByExamIdAndCourseIdAndExamStudentIds(examId, courseId, examStudentIds);
|
|
|
- }else {
|
|
|
- examRecordForMarkingList =
|
|
|
- examRecordForMarkingRepo.findByExamIdAndCourseIdAndExamStudentIdsAndBatchNum(examId, courseId, examStudentIds,batchNum);
|
|
|
+ } else {
|
|
|
+ if (markingType.equals(MarkingType.OBJECT_SCORE_MAX.name())
|
|
|
+ || markingType.equals(MarkingType.LAST_SUBMIT.name())) {
|
|
|
+ examRecordForMarkingList =
|
|
|
+ examRecordForMarkingRepo.findByExamIdAndCourseIdAndExamStudentIds(examId, courseId, examStudentIds);
|
|
|
+ } else {
|
|
|
+ examRecordForMarkingList =
|
|
|
+ examRecordForMarkingRepo.findByExamIdAndCourseIdAndExamStudentIdsAndBatchNum(examId, courseId, examStudentIds, batchNum);
|
|
|
+ }
|
|
|
}
|
|
|
if (examType == ExamType.OFFLINE) {
|
|
|
return examRecordForMarkingList;
|
|
|
} else if (examType == ExamType.ONLINE) {
|
|
|
- GetExamPropertyReq getExamPropertyReq = new GetExamPropertyReq();
|
|
|
- getExamPropertyReq.setExamId(examId);
|
|
|
- getExamPropertyReq.setKey("MARKING_TYPE");
|
|
|
- GetExamPropertyResp getExamPropertyResp = examCloudService.getExamProperty(getExamPropertyReq);
|
|
|
-
|
|
|
- String markingType = getExamPropertyResp.getValue();
|
|
|
if (markingType.equals(MarkingType.ALL.name())) {
|
|
|
return examRecordForMarkingList;
|
|
|
} else if (markingType.equals(MarkingType.OBJECT_SCORE_MAX.name())) {
|
|
@@ -153,8 +160,7 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
|
|
|
|
|
|
/**
|
|
|
* 客观分最高
|
|
|
- *
|
|
|
- * @param examRecordForMarkingList
|
|
|
+ * @param examRecordForMarkingAllList
|
|
|
* @return
|
|
|
*/
|
|
|
private List<ExamRecordForMarkingEntity> queryStudentPapersByObjectScoreMax(List<ExamRecordForMarkingEntity> examRecordForMarkingAllList) {
|