|
@@ -251,9 +251,9 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
|
|
|
// 更新试卷结构参数的云阅卷试卷结构
|
|
|
List<ExamPaperStructure> examPaperStructureList = examPaperStructureService.list(new QueryWrapper<ExamPaperStructure>()
|
|
|
.lambda()
|
|
|
- .eq(ExamPaperStructure::getSchoolId,schoolId)
|
|
|
- .eq(ExamPaperStructure::getPaperNumber,paperNumber));
|
|
|
- if (examPaperStructureList.size() != 1){
|
|
|
+ .eq(ExamPaperStructure::getSchoolId, schoolId)
|
|
|
+ .eq(ExamPaperStructure::getPaperNumber, paperNumber));
|
|
|
+ if (examPaperStructureList.size() != 1) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("知学知考试卷结构异常");
|
|
|
}
|
|
|
ExamPaperStructure examPaperStructure = examPaperStructureList.get(0);
|
|
@@ -261,7 +261,17 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
|
|
|
String examId = String.valueOf(examPaperStructure.getThirdRelateId());
|
|
|
// 科目代码(课程代码+卷型+课程序号)
|
|
|
String subjectCode = examPaperStructure.getCourseCode().concat(examPaperStructure.getPaperType()).concat(examPaperStructure.getSequence());
|
|
|
- String cloudInfoJson = cloudMarkingTaskUtils.queryPaperStructure(schoolId, examId, subjectCode, examPaperStructure.getPaperType());
|
|
|
+
|
|
|
+ String paperType = null;
|
|
|
+ String examPaperObj = examPaperStructure.getObjectiveStructure();
|
|
|
+ if (SystemConstant.strNotNull(examPaperObj)) {
|
|
|
+ List<Question> examPaperObjList = JSON.parseArray(examPaperObj, Question.class);
|
|
|
+ if (examPaperObjList != null && examPaperObjList.size() > 0) {
|
|
|
+ paperType = examPaperStructure.getPaperType();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String cloudInfoJson = cloudMarkingTaskUtils.queryPaperStructure(schoolId, examId, subjectCode,paperType);
|
|
|
examPaperStructure.setCloudInfoJson(cloudInfoJson);
|
|
|
examPaperStructure.setStructureChange(false);
|
|
|
examPaperStructureService.updateById(examPaperStructure);
|
|
@@ -269,8 +279,8 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
|
|
|
// 更新grade_paper_struct
|
|
|
this.remove(new QueryWrapper<GradePaperStruct>()
|
|
|
.lambda()
|
|
|
- .eq(GradePaperStruct::getSchoolId,schoolId)
|
|
|
- .eq(GradePaperStruct::getPaperNumber,paperNumber));
|
|
|
+ .eq(GradePaperStruct::getSchoolId, schoolId)
|
|
|
+ .eq(GradePaperStruct::getPaperNumber, paperNumber));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -310,7 +320,7 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
|
|
|
examPaperObjList = questionTypeListMap.get(QuestionType.OBJECTIVE);
|
|
|
examPaperSubList = questionTypeListMap.get(QuestionType.SUBJECTIVE);
|
|
|
comparison = "云阅卷";
|
|
|
- code = SystemConstant.PAPER_STRUCT_EXCEPTION_CODE;
|
|
|
+ code = ExceptionResultEnum.PAPER_STRUCT_EXCEPTION.getCode();
|
|
|
} else {
|
|
|
// 当云阅卷试卷结构同步结果没有时与知学知考对比
|
|
|
String examPaperObj = examPaperStructure.getObjectiveStructure();
|
|
@@ -334,7 +344,7 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
|
|
|
return Stream.of(cell);
|
|
|
}).collect(Collectors.toList());
|
|
|
if (!Question.matchTwoQuestionList(examPaperObjList, gradePaperObjList)) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception(code,"试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(code, "试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
|
|
|
"】的分析试卷结构和 [" + comparison + "] 试卷结构在【" + QuestionType.OBJECTIVE.getDesc() + "】上不一致");
|
|
|
}
|
|
|
|
|
@@ -349,7 +359,7 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
|
|
|
return Stream.of(cell);
|
|
|
}).collect(Collectors.toList());
|
|
|
if (!Question.matchTwoQuestionList(examPaperSubList, gradePaperSubList)) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception(code,"试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(code, "试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
|
|
|
"】的分析试卷结构和 [" + comparison + "] 试卷结构在【" + QuestionType.SUBJECTIVE.getDesc() + "】上不一致");
|
|
|
}
|
|
|
|