|
@@ -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();
|