|
@@ -9,9 +9,11 @@ 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.TBDimension;
|
|
|
+import com.qmth.teachcloud.report.business.entity.TBExamCourse;
|
|
|
import com.qmth.teachcloud.report.business.entity.TBPaper;
|
|
|
import com.qmth.teachcloud.report.business.enums.GradeScopeEnum;
|
|
|
import com.qmth.teachcloud.report.business.enums.PiecewiseScopeEnum;
|
|
|
+import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
|
|
|
import com.qmth.teachcloud.report.business.service.*;
|
|
|
import com.qmth.teachcloud.report.business.utils.AnalyzeScopeUtil;
|
|
|
import com.qmth.teachcloud.report.business.utils.MathUtil;
|
|
@@ -68,6 +70,9 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
@Resource
|
|
|
TAExamCourseService taExamCourseService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TBExamCourseService tbExamCourseService;
|
|
|
+
|
|
|
/**
|
|
|
* 学院学科报表查询科目信息
|
|
|
*
|
|
@@ -233,10 +238,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
@Override
|
|
|
public List<SurveyTeacherGradeDistributionResult> surveyTeacherDistribution(Long examId, String courseCode, Long collegeId) {
|
|
|
List<SurveyTeacherDistributionResult> surveyTeacherDistributionResultList = taExamCourseRecordService.surveyTeacherDistribution(examId, courseCode);
|
|
|
- surveyTeacherDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> !e.getAbsent()).collect(Collectors.toList());
|
|
|
- if (surveyTeacherDistributionResultList.size() < 1) {
|
|
|
- throw ExceptionResultEnum.DATA_ERROR.exception();
|
|
|
+ if (Objects.isNull(surveyTeacherDistributionResultList) || surveyTeacherDistributionResultList.size() == 0) {
|
|
|
+ return null;
|
|
|
}
|
|
|
+ surveyTeacherDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> !e.getAbsent()).collect(Collectors.toList());
|
|
|
//过滤应届
|
|
|
List<SurveyTeacherDistributionResult> currentDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> e.getStudentCurrent() == true && !e.getAbsent()).collect(Collectors.toList());
|
|
|
double allTotalCount = surveyTeacherDistributionResultList.size(); // 总体人数
|
|
@@ -504,14 +509,23 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
public SurveyTeacherExamCourseResult findAvgScore(Long schoolId, String courseCode, Long examId) {
|
|
|
//取总体和应届平均分
|
|
|
QueryWrapper<TAExamCourse> taExamCourseQueryWrapper = new QueryWrapper<>();
|
|
|
+ QueryWrapper<TBExamCourse> tbExamCourseQueryWrapper = new QueryWrapper<>();
|
|
|
if (Objects.nonNull(schoolId)) {
|
|
|
taExamCourseQueryWrapper.lambda().eq(TAExamCourse::getSchoolId, schoolId);
|
|
|
+ tbExamCourseQueryWrapper.lambda().eq(TBExamCourse::getSchoolId, schoolId);
|
|
|
}
|
|
|
if (Objects.nonNull(examId)) {
|
|
|
taExamCourseQueryWrapper.lambda().eq(TAExamCourse::getExamId, examId);
|
|
|
+ tbExamCourseQueryWrapper.lambda().eq(TBExamCourse::getExamId, examId);
|
|
|
}
|
|
|
if (Objects.nonNull(courseCode)) {
|
|
|
taExamCourseQueryWrapper.lambda().eq(TAExamCourse::getCourseCode, courseCode);
|
|
|
+ tbExamCourseQueryWrapper.lambda().eq(TBExamCourse::getCourseCode, courseCode);
|
|
|
+ }
|
|
|
+ tbExamCourseQueryWrapper.lambda().eq(TBExamCourse::getPublishStatus, PublishStatusEnum.PUBLISH);
|
|
|
+ TBExamCourse tbExamCourse = tbExamCourseService.getOne(tbExamCourseQueryWrapper);
|
|
|
+ if (Objects.isNull(tbExamCourse)) {
|
|
|
+ return null;
|
|
|
}
|
|
|
TAExamCourse taExamCourse = taExamCourseService.getOne(taExamCourseQueryWrapper);
|
|
|
BigDecimal bigDecimal = new BigDecimal(1);
|