|
@@ -10,6 +10,7 @@ import com.qmth.teachcloud.common.util.ServletUtil;
|
|
|
import com.qmth.teachcloud.report.business.bean.result.*;
|
|
|
import com.qmth.teachcloud.report.business.entity.TAExamCourse;
|
|
|
import com.qmth.teachcloud.report.business.entity.TAExamCourseRecord;
|
|
|
+import com.qmth.teachcloud.report.business.entity.TBExam;
|
|
|
import com.qmth.teachcloud.report.business.entity.TBPaper;
|
|
|
import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
|
|
|
import com.qmth.teachcloud.report.business.enums.SemesterEnum;
|
|
@@ -17,6 +18,7 @@ import com.qmth.teachcloud.report.business.mapper.TAExamCourseMapper;
|
|
|
import com.qmth.teachcloud.report.business.mapper.TAExamCourseRecordMapper;
|
|
|
import com.qmth.teachcloud.report.business.service.ReportCommonService;
|
|
|
import com.qmth.teachcloud.report.business.service.TAExamCourseService;
|
|
|
+import com.qmth.teachcloud.report.business.service.TBExamService;
|
|
|
import com.qmth.teachcloud.report.business.service.TBPaperService;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -52,6 +54,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
@Resource
|
|
|
TAExamCourseService taExamCourseService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TBExamService tbExamService;
|
|
|
+
|
|
|
/**
|
|
|
* 开课课程考试总览列表接口
|
|
|
*
|
|
@@ -164,6 +169,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
if (Objects.isNull(sysUser)) {
|
|
|
throw ExceptionResultEnum.NOT_LOGIN.exception();
|
|
|
}
|
|
|
+ // 考试概况
|
|
|
+ TeachCourseSurveyResult teachCourseSurveyResult = this.getTeachCourseSurveyInfo(semester, examId, courseCode);
|
|
|
+
|
|
|
//取总体和应届平均分
|
|
|
SurveyTeacherExamCourseResult surveyTeacherExamCourseResult = reportCommonService.findAvgScore(schoolId, courseCode, examId);
|
|
|
|
|
@@ -171,7 +179,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
List<SurveyTeacherGradeDistributionResult> surveyTeacherGradeDistributionResultList = reportCommonService.surveyTeacherDistribution(examId, courseCode, sysUser.getOrgId());
|
|
|
//查找题目信息
|
|
|
QuestionListResult questionListResult = reportCommonService.findQuestionInfo(examId, courseCode, sysUser.getOrgId());
|
|
|
- return new SurveyTeacherViewResult(surveyTeacherGradeDistributionResultList, questionListResult, surveyTeacherExamCourseResult);
|
|
|
+ return new SurveyTeacherViewResult(surveyTeacherGradeDistributionResultList, questionListResult, surveyTeacherExamCourseResult,teachCourseSurveyResult);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -307,9 +315,29 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
return trialCalculationResult;
|
|
|
}
|
|
|
|
|
|
-// @Override
|
|
|
-// public TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode) {
|
|
|
-// Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
-// return taExamCourseMapper.getOverview(schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, courseCode);
|
|
|
-// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取开课课程考试课程总览
|
|
|
+ * @param semester 学期
|
|
|
+ * @param examId 考试id
|
|
|
+ * @param courseCode 课程编号
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ private TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode) {
|
|
|
+ TBExam tbExam = tbExamService.getById(examId);
|
|
|
+
|
|
|
+ TAExamCourse taExamCourse = this.getOne(new QueryWrapper<TAExamCourse>().lambda().eq(TAExamCourse::getExamId,examId).eq(TAExamCourse::getCourseCode,courseCode));
|
|
|
+ TeachCourseSurveyResult teachCourseSurveyResult = new TeachCourseSurveyResult();
|
|
|
+ teachCourseSurveyResult.setExamTime(tbExam.getExamTime());
|
|
|
+ teachCourseSurveyResult.setCourseCode(taExamCourse.getCourseCode());
|
|
|
+ teachCourseSurveyResult.setCourseName(taExamCourse.getCourseName());
|
|
|
+ teachCourseSurveyResult.setFullScore(taExamCourse.getTotalScore());
|
|
|
+ teachCourseSurveyResult.setRealityCount(taExamCourse.getRealityCount());
|
|
|
+ teachCourseSurveyResult.setInspectCollegeCount(taExamCourse.getInspectCollegeCount());
|
|
|
+ teachCourseSurveyResult.setAbsentCount(taExamCourse.getAbsentCount());
|
|
|
+ teachCourseSurveyResult.setCoefficient(taExamCourse.getCoefficient());
|
|
|
+ teachCourseSurveyResult.setTeachCollegeName(taExamCourse.getTeachCollegeName());
|
|
|
+ teachCourseSurveyResult.setInspectCollegeNames(taExamCourse.getInspectCollegeNames());
|
|
|
+ return teachCourseSurveyResult;
|
|
|
+ }
|
|
|
}
|