Browse Source

学年升级虚拟班学生未升级完善

tags/正式3.14.0
雍文秀 4 months ago
parent
commit
df60571dd5

+ 8
- 2
sapi/src/main/java/com/xhkjedu/sapi/service/system/SchoolService.java View File

322
                             stusupnum = 0;
322
                             stusupnum = 0;
323
                         }
323
                         }
324
                         if (N_Utils.isListNotEmpty(xnbList)) {
324
                         if (N_Utils.isListNotEmpty(xnbList)) {
325
+                            classIds = classes.stream().filter(c -> c.getClasstype().equals(2)).map(c -> c.getClassid().toString()).collect(Collectors.joining(","));
326
+                            cStudents = classMapper.listStudentByClassIds(classIds);//要升级的学生列表
327
+                            cTeachers = classMapper.listTeacherByClassIds(classIds);//要升级的教师列表
328
+                            groups = classMapper.listGroupByClassIds(classIds);//要升级的全体分组列表
329
+                            groupIds = groups.stream().map(g -> g.getGroupid().toString()).collect(Collectors.joining(","));
330
+                            gStudents = classMapper.listStudentByGroupIds(groupIds);//要升级的学生列表
325
                             String cIds = xnbList.stream().map(c -> c.getClassid().toString()).collect(Collectors.joining(","));
331
                             String cIds = xnbList.stream().map(c -> c.getClassid().toString()).collect(Collectors.joining(","));
326
                             List<TClassStudent> studentList = new ArrayList<>();
332
                             List<TClassStudent> studentList = new ArrayList<>();
327
                             for (TClassStudent cs : cStudents) {
333
                             for (TClassStudent cs : cStudents) {
554
                         stuyupnum = bystudents.size();
560
                         stuyupnum = bystudents.size();
555
                     }
561
                     }
556
 
562
 
557
-                    classsxznum = classMapper.updateClassState(1, xzClassIds);//修改班级状态
558
-                    classsxnnum = classMapper.updateClassState(1, xnClassIds);//修改班级状态
563
+                    if(N_Utils.isNotEmpty(xzClassIds)) classsxznum = classMapper.updateClassState(1, xzClassIds);//修改班级状态
564
+                    if(N_Utils.isNotEmpty(xnClassIds)) classsxnnum = classMapper.updateClassState(1, xnClassIds);//修改班级状态
559
                     if (N_Utils.isListNotEmpty(bystudents)) {
565
                     if (N_Utils.isListNotEmpty(bystudents)) {
560
                         stusupnum = userMapper.batchUpdateState(bystudents, 1);//修改学生状态
566
                         stusupnum = userMapper.batchUpdateState(bystudents, 1);//修改学生状态
561
                     }
567
                     }

+ 0
- 1
scommons/src/main/java/com/xhkjedu/utils/N_Utils.java View File

25
 import java.util.stream.Collectors;
25
 import java.util.stream.Collectors;
26
 import java.util.stream.IntStream;
26
 import java.util.stream.IntStream;
27
 
27
 
28
-import static jdk.nashorn.internal.objects.Global.Infinity;
29
 
28
 
30
 /**
29
 /**
31
  * @author WN
30
  * @author WN

Loading…
Cancel
Save