caozixuan il y a 4 ans
Parent
commit
9b7dbe420b

+ 4 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/AnalyzeForReportServiceImpl.java

@@ -1281,9 +1281,6 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                     int otherCollegeTotalCount = teacherRecordOtherCollegeList.size();
                     List<TAExamCourseRecord> teacherEffectiveOtherCollegeList = teacherRecordOtherCollegeList.stream().filter(e -> !e.getAbsent()).collect(Collectors.toList());
                     int otherCollegeRealityCount = teacherEffectiveOtherCollegeList.size();
-                    if (otherCollegeRealityCount == 0) {
-                        continue;
-                    }
                     int otherCollegeAbsentCount = otherCollegeTotalCount - otherCollegeRealityCount;
 
                     // 成绩统计
@@ -1291,6 +1288,10 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                             .collect(Collectors.summarizingDouble(e -> e.getAssignedScore().doubleValue())); // 学生赋分的描述统计
                     double otherCollegeMinScoreAssign = otherCollegeDescribeStatistic.getMin();
                     double otherCollegeMaxScoreAssign = otherCollegeDescribeStatistic.getMax();
+                    if (otherCollegeRealityCount == 0) {
+                        otherCollegeMinScoreAssign = 0;
+                        otherCollegeMaxScoreAssign = 0;
+                    }
                     double otherCollegeAvgScoreAssign = otherCollegeDescribeStatistic.getAverage();
                     double otherCollegeAvgScore = teacherEffectiveOtherCollegeList.stream()
                             .collect(Collectors.summarizingDouble(e -> e.getTotalScore().doubleValue())).getAverage();

+ 1 - 1
teachcloud-report/src/test/java/com/qmth/teachcloud/report/AnalyzeForStudentServiceTest.java

@@ -89,7 +89,7 @@ public class AnalyzeForStudentServiceTest {
 
     @Test
     public void buildAnalyzeExamCourseCollegeTeacher() {
-        Long examId = 1L;
+        Long examId = 2L;
         String courseCode = null;
         System.out.println(analyzeForReportService.buildAnalyzeExamCourseCollegeTeacher(examId,courseCode));
     }