Bladeren bron

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

tags/正式3.14.0
雍文秀 4 maanden geleden
bovenliggende
commit
df60571dd5

+ 8
- 2
sapi/src/main/java/com/xhkjedu/sapi/service/system/SchoolService.java Bestand weergeven

@@ -322,6 +322,12 @@ public class SchoolService {
322 322
                             stusupnum = 0;
323 323
                         }
324 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 331
                             String cIds = xnbList.stream().map(c -> c.getClassid().toString()).collect(Collectors.joining(","));
326 332
                             List<TClassStudent> studentList = new ArrayList<>();
327 333
                             for (TClassStudent cs : cStudents) {
@@ -554,8 +560,8 @@ public class SchoolService {
554 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 565
                     if (N_Utils.isListNotEmpty(bystudents)) {
560 566
                         stusupnum = userMapper.batchUpdateState(bystudents, 1);//修改学生状态
561 567
                     }

+ 0
- 1
scommons/src/main/java/com/xhkjedu/utils/N_Utils.java Bestand weergeven

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

Laden…
Annuleren
Opslaan