瀏覽代碼

Merge branch 'dev_v2.1.0' into release_v2.1.0
merge

wangliang 4 年之前
父節點
當前提交
e1ad92af36

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

@@ -1217,7 +1217,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 List<TAExamCourseCollegeTeacher> rankTempList = new ArrayList<>();
                 // 该考查学院维度下授课教师
                 Set<Long> teacherIdSet = dataSource.stream()
-                        .filter(e -> inspectCollegeId.equals(e.getInspectCollegeId()))
+                        .filter(e -> inspectCollegeId.equals(e.getInspectCollegeId()) && e.getStudentCurrent() && !e.getAbsent())
                         .map(TAExamCourseRecord::getTeacherId)
                         .collect(Collectors.toSet());
 
@@ -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));
     }