dzx vor 8 Monaten
Ursprung
Commit
84127e2264

+ 1 - 0
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassServiceImpl.java

@@ -445,6 +445,7 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
             one.setName(baseClass.getName());
             one.setCreateUserId(StpUtil.getLoginIdAsLong());
             one.setStatus(0);
+            one.setBaseClassId(baseClass.getId());
             insList.add(one);
         }
         if(!insList.isEmpty()){

+ 4 - 0
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java

@@ -184,6 +184,10 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
         );
         //2、查询所有班级信息
         List<BandingTaskClass> classList = taskClassMapper.getListOrderByAsc(bandingTask.getId());
+        List<BandingTaskClass> nullNumberClass = classList.stream().filter(x -> x.getNumber() == null).collect(Collectors.toList());
+        if(!nullNumberClass.isEmpty()){
+            throw new MyException("班级配置中有班级未设置人数,无法自动分班");
+        }
         if(!classList.isEmpty()){
             //清除数据
             List<Long> classIds = classList.stream().map(BandingTaskClass::getId).collect(Collectors.toList());

+ 3 - 2
src/main/java/com/xjrsoft/module/student/controller/StudentTryReadingReportController.java

@@ -363,7 +363,7 @@ public class StudentTryReadingReportController {
 
         Map<String, List<StudentReportRecordPlanPageVo>> classMap = dataList.stream().filter(x -> x.getReportTime() != null)
                 .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassName));
-        Map<String, List<StudentReportRecordPlanPageVo>> classNotMap = dataList.stream().filter(x -> x.getReportTime() == null)
+        Map<String, List<StudentReportRecordPlanPageVo>> classNotMap = dataList.stream().filter(x -> x.getReportTime() == null && x.getClassName() != null)
                 .collect(Collectors.groupingBy(StudentReportRecordPlanPageVo::getClassName));
         List<StudentReportRecordItemVo> classList = new ArrayList<>();
         for (String className : classMap.keySet()) {
@@ -380,7 +380,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>> classTypeNotMap = dataList.stream().filter(x -> x.getReportTime() == 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<>();
         for (String classType : classTypeMap.keySet()) {
             classTypeList.add(