浏览代码

bug修复

wangliang 4 年之前
父节点
当前提交
ae0f3f8b65

+ 4 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ReportCommonServiceImpl.java

@@ -240,6 +240,9 @@ public class ReportCommonServiceImpl implements ReportCommonService {
     public List<SurveyTeacherGradeDistributionResult> surveyTeacherDistribution(Long examId, String courseCode, Long collegeId, boolean filter) {
         List<SurveyTeacherGradeDistributionResult> surveyTeacherGradeDistributionResultList = new ArrayList<>();
         List<SurveyTeacherDistributionResult> surveyTeacherDistributionResultList = taExamCourseRecordService.surveyTeacherDistribution(examId, courseCode, filter);
+        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());
@@ -531,8 +534,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
             tbExamCourseQueryWrapper.lambda().eq(TBExamCourse::getPublishStatus, PublishStatusEnum.PUBLISH);
             TBExamCourse tbExamCourse = tbExamCourseService.getOne(tbExamCourseQueryWrapper);
             if (Objects.isNull(tbExamCourse)) {
-                BigDecimal bigDecimal = new BigDecimal(0);
-                return new SurveyTeacherExamCourseResult(bigDecimal, bigDecimal, bigDecimal, bigDecimal);
+                return null;
             }
         }
         TAExamCourse taExamCourse = taExamCourseService.getOne(taExamCourseQueryWrapper);