Эх сурвалжийг харах

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

wangliang 4 жил өмнө
parent
commit
5ede6ee959

+ 21 - 9
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ReportCommonServiceImpl.java

@@ -225,11 +225,12 @@ 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();
         }
         //过滤应届
-        List<SurveyTeacherDistributionResult> currentDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> e.getStudentCurrent() == true).collect(Collectors.toList());
+        List<SurveyTeacherDistributionResult> currentDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> e.getStudentCurrent() == true && !e.getAbsent()).collect(Collectors.toList());
         double allTotalCount = surveyTeacherDistributionResultList.size(); // 总体人数
         double currentTotalCount = currentDistributionResultList.size(); // 应届人数
 
@@ -264,14 +265,25 @@ public class ReportCommonServiceImpl implements ReportCommonService {
                 currentCountAfter = (int) currentDistributionResultList.stream()
                         .filter(e -> minValue < e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
             } else if ("[".equals(minSign) && ")".equals(maxSign)) {
-                allCountBefore = (int) surveyTeacherDistributionResultList.stream()//赋分前
-                        .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue > e.getTotalScore().doubleValue()).count();
-                allCountAfter = (int) surveyTeacherDistributionResultList.stream()
-                        .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
-                currentCountBefore = (int) currentDistributionResultList.stream()//赋分前
-                        .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue > e.getTotalScore().doubleValue()).count();
-                currentCountAfter = (int) currentDistributionResultList.stream()
-                        .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
+                if (maxValue == 100) {
+                    allCountBefore = (int) surveyTeacherDistributionResultList.stream()//赋分前
+                            .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue >= e.getTotalScore().doubleValue()).count();
+                    allCountAfter = (int) surveyTeacherDistributionResultList.stream()
+                            .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
+                    currentCountBefore = (int) currentDistributionResultList.stream()//赋分前
+                            .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue >= e.getTotalScore().doubleValue()).count();
+                    currentCountAfter = (int) currentDistributionResultList.stream()
+                            .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
+                } else {
+                    allCountBefore = (int) surveyTeacherDistributionResultList.stream()//赋分前
+                            .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue > e.getTotalScore().doubleValue()).count();
+                    allCountAfter = (int) surveyTeacherDistributionResultList.stream()
+                            .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
+                    currentCountBefore = (int) currentDistributionResultList.stream()//赋分前
+                            .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue > e.getTotalScore().doubleValue()).count();
+                    currentCountAfter = (int) currentDistributionResultList.stream()
+                            .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
+                }
             } else if ("[".equals(minSign) && "]".equals(maxSign)) {
                 allCountBefore = (int) surveyTeacherDistributionResultList.stream()//赋分前
                         .filter(e -> minValue <= e.getTotalScore().doubleValue() && maxValue >= e.getTotalScore().doubleValue()).count();

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

@@ -47,7 +47,7 @@ public class TAExamCourseCollegeTeacherServiceImpl extends ServiceImpl<TAExamCou
         if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
             return taExamCourseCollegeTeacherMapper.listClassRank(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, courseCode, inspectCollegeId, collegeIds, column, Objects.nonNull(order) ? order.name() : null);
         } else {
-            return taExamCourseCollegeTeacherMapper.listClassRank(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, courseCode, inspectCollegeId, Arrays.asList(sysUser.getOrgId()), column, Objects.nonNull(order) ? order.name() : null);
+            return taExamCourseCollegeTeacherMapper.listClassRank(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, courseCode, inspectCollegeId, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null, column, Objects.nonNull(order) ? order.name() : null);
         }
     }
 
@@ -69,7 +69,7 @@ public class TAExamCourseCollegeTeacherServiceImpl extends ServiceImpl<TAExamCou
         if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
             return taExamCourseCollegeTeacherMapper.listAllTeacherClassRank(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, teachCollegeId, courseCode, teacherId, collegeIds, column, Objects.nonNull(order) ? order.name() : null);
         } else {
-            return taExamCourseCollegeTeacherMapper.listAllTeacherClassRank(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, teachCollegeId, courseCode, teacherId, Arrays.asList(sysUser.getOrgId()), column, Objects.nonNull(order) ? order.name() : null);
+            return taExamCourseCollegeTeacherMapper.listAllTeacherClassRank(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, teachCollegeId, courseCode, teacherId, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null, column, Objects.nonNull(order) ? order.name() : null);
         }
     }
 

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java

@@ -105,7 +105,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
             return taExamCourseMapper.surveyAspointsList(iPage, schoolId, examId, courseCode, Objects.nonNull(publishStatus) ? publishStatus.name() : null, Objects.nonNull(semester) ? semester.name() : null, collegeIds, column, Objects.nonNull(order) ? order.name() : null);
         } else {
-            return taExamCourseMapper.surveyAspointsList(iPage, schoolId, examId, courseCode, Objects.nonNull(publishStatus) ? publishStatus.name() : null, Objects.nonNull(semester) ? semester.name() : null, Arrays.asList(sysUser.getOrgId()), column, Objects.nonNull(order) ? order.name() : null);
+            return taExamCourseMapper.surveyAspointsList(iPage, schoolId, examId, courseCode, Objects.nonNull(publishStatus) ? publishStatus.name() : null, Objects.nonNull(semester) ? semester.name() : null, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null, column, Objects.nonNull(order) ? order.name() : null);
         }
     }
 

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamTotalServiceImpl.java

@@ -58,7 +58,7 @@ public class TAExamTotalServiceImpl extends ServiceImpl<TAExamTotalMapper, TAExa
         if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
             return taExamTotalMapper.getCourseSummary(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, collegeIds, column, Objects.nonNull(order) ? order.name() : null);
         } else {
-            return taExamTotalMapper.getCourseSummary(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, Arrays.asList(sysUser.getOrgId()), column, Objects.nonNull(order) ? order.name() : null);
+            return taExamTotalMapper.getCourseSummary(page, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null, column, Objects.nonNull(order) ? order.name() : null);
         }
     }
 

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamCourseServiceImpl.java

@@ -112,7 +112,7 @@ public class TBExamCourseServiceImpl extends ServiceImpl<TBExamCourseMapper, TBE
         if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
             return tbExamCourseMapper.findCourseList(schoolId, examId, inspect, collegeIds);
         } else {
-            return tbExamCourseMapper.findCourseList(schoolId, examId, inspect, Arrays.asList(sysUser.getOrgId()));
+            return tbExamCourseMapper.findCourseList(schoolId, examId, inspect, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null);
         }
     }
 

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamStudentServiceImpl.java

@@ -147,7 +147,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
         if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
             listPage = tbExamStudentMapper.listTeachCollegeResult(page, schoolId, semester, examId, courseCode, current, inspectCollegeId, orgId, teacherId, studentParam, collegeIds, column, Objects.nonNull(order) ? order.name() : null);
         } else {
-            listPage = tbExamStudentMapper.listTeachCollegeResult(page, schoolId, semester, examId, courseCode, current, inspectCollegeId, orgId, teacherId, studentParam, Arrays.asList(sysUser.getOrgId()), column, Objects.nonNull(order) ? order.name() : null);
+            listPage = tbExamStudentMapper.listTeachCollegeResult(page, schoolId, semester, examId, courseCode, current, inspectCollegeId, orgId, teacherId, studentParam, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null, column, Objects.nonNull(order) ? order.name() : null);
         }
         for (TeachCollegeResult record : listPage.getRecords()) {
             String tmp = record.getSemester();

+ 2 - 1
teachcloud-report-business/src/main/resources/mapper/TAExamCourseRecordMapper.xml

@@ -129,7 +129,8 @@
             taecr.score_level as scoreLevel,
             taecr.rank_level as rankLevel,
             taecr.col_rank as colRank,
-            taecr.student_current as studentCurrent
+            taecr.student_current as studentCurrent,
+            tbes.absent
         FROM
             t_a_exam_course_record taecr
         join t_b_exam_record tber on