Ver Fonte

分班调整

dzx há 8 meses atrás
pai
commit
457ed97a52

+ 9 - 4
src/main/java/com/xjrsoft/module/student/controller/StudentTryReadingReportController.java

@@ -26,6 +26,7 @@ import com.xjrsoft.module.banding.service.IBandingTaskClassStudentService;
 import com.xjrsoft.module.banding.service.IBandingTaskService;
 import com.xjrsoft.module.banding.vo.BandingTaskClassPageVo;
 import com.xjrsoft.module.banding.vo.BandingTaskClassReportStatisticsVo;
+import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseGrade;
 import com.xjrsoft.module.base.service.IBaseGradeService;
 import com.xjrsoft.module.base.service.IBaseSemesterService;
@@ -69,6 +70,8 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -287,6 +290,7 @@ public class StudentTryReadingReportController {
     @GetMapping(value = "/statistics")
     @ApiOperation(value="领导统计")
     @SaCheckPermission("studentreportrecord:detail")
+    @XjrLog(value = "领导统计")
     public RT<StudentReportRecordStatisticsVo> statistics(@Valid StudentReportRecordStatisticsDto dto){
         if(dto.getGradeId() == null && (dto.getCategory() == null || dto.getCategory() == 1)){
             LambdaQueryWrapper<BaseGrade> queryWrapper = new LambdaQueryWrapper<>();
@@ -351,7 +355,7 @@ public class StudentTryReadingReportController {
         ).count());
 
         if(dto.getCategory() != null && dto.getCategory() == 3){
-            Map<String, List<StudentReportRecordPlanPageVo>> graduatedUniversityMap = dataList.stream().filter(x -> x.getReportTime() != null)
+            Map<String, List<StudentReportRecordPlanPageVo>> graduatedUniversityMap = dataList.stream().filter(x -> x.getReportTime() != null && x.getGraduateSchool() != null)
                     .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getGraduateSchool));
             List<ItemCountVo> graduatedUniversityList = new ArrayList<>();
             for (String graduatedUniversity : graduatedUniversityMap.keySet()) {
@@ -365,7 +369,7 @@ public class StudentTryReadingReportController {
             statisticsVo.setGraduatedUniversityList(graduatedUniversityList);
         }
 
-        Map<String, List<StudentReportRecordPlanPageVo>> classMap = dataList.stream().filter(x -> x.getReportTime() != null)
+        Map<String, List<StudentReportRecordPlanPageVo>> classMap = dataList.stream().filter(x -> x.getReportTime() != null && x.getClassName() != null)
                 .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassName));
         Map<String, List<StudentReportRecordPlanPageVo>> classNotMap = dataList.stream().filter(x -> x.getReportTime() == null && x.getClassName() != null)
                 .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassName));
@@ -383,7 +387,8 @@ public class StudentTryReadingReportController {
         }
         statisticsVo.setClassList(classList);
 
-        Map<String, List<StudentReportRecordPlanPageVo>> classTypeMap = dataList.stream().filter(x -> x.getReportTime() != null).collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassType));
+        Map<String, List<StudentReportRecordPlanPageVo>> classTypeMap = dataList.stream().filter(x -> x.getReportTime() != null && x.getClassType() != null)
+                .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassType));
         Map<String, List<StudentReportRecordPlanPageVo>> classTypeNotMap = dataList.stream().filter(x -> x.getReportTime() == null && x.getClassType() != null)
                 .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassType));
         List<StudentReportRecordItemVo> classTypeList = new ArrayList<>();
@@ -465,7 +470,7 @@ public class StudentTryReadingReportController {
             itemCountVo.setCount(gradeCount);
             gradeDataList.add(itemCountVo);
         }
-
+        Collections.sort(gradeDataList, Comparator.comparing(ItemCountVo::getItem));
         statisticsVo.setGradeList(gradeDataList);
 
         return RT.ok(statisticsVo);