|
@@ -319,10 +319,16 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
ReportResult reportResult = new ReportResult();
|
|
|
// 考生信息
|
|
|
StudentInfo studentInfo = tbStudentMapper.getStudentBySchoolIdAndStudentCode(schoolId, studentCode);
|
|
|
+ if (Objects.isNull(studentInfo)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到此考生信息");
|
|
|
+ }
|
|
|
reportResult.setStudentInfo(studentInfo);
|
|
|
|
|
|
//考试信息
|
|
|
List<ExamInfo> examInfo = tbExamStudentMapper.listExamBySchoolIdAndStudentCode(schoolId, studentCode);
|
|
|
+ if (Objects.isNull(examInfo)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到此考生的考试信息");
|
|
|
+ }
|
|
|
for (ExamInfo info : examInfo) {
|
|
|
List<CourseInfo> courseInfos = tbExamStudentMapper.listCourseByExamIdAndStudentCode(schoolId, info.getExamId(), studentCode);
|
|
|
info.setCourseInfo(courseInfos);
|
|
@@ -340,10 +346,16 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
PersonalReportResult personalReportResult = new PersonalReportResult();
|
|
|
// 考生信息
|
|
|
ExamStudentResult examStudentResult = buildExamStudentResult(schoolId, examId, studentCode, courseCode);
|
|
|
+ if (Objects.isNull(examStudentResult)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到此考生信息");
|
|
|
+ }
|
|
|
personalReportResult.setStudent(examStudentResult);
|
|
|
|
|
|
// 学院信息
|
|
|
CollegeResult collegeResult = buildCollegeResult(schoolId, examId, studentCode, courseCode);
|
|
|
+ if (Objects.isNull(collegeResult)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到考生的学院信息");
|
|
|
+ }
|
|
|
personalReportResult.setCollege(collegeResult);
|
|
|
return personalReportResult;
|
|
|
}
|