|
@@ -475,10 +475,12 @@ public class ClassStudentService {
|
475
|
475
|
Integer studentid = u.getUserid();
|
476
|
476
|
Integer oldclassid = classStudentMapper.getClassIdByStuId(studentid);//获取学生行政班id
|
477
|
477
|
Integer classid = user.getClassid();
|
478
|
|
- if (!classid.equals(oldclassid) && 2 == u.getUsertype() && schoolid == u.getSchoolid()) {
|
479
|
|
- if (1 != u.getUserstate()) {
|
480
|
|
- delUsers.add(u);
|
481
|
|
- }
|
|
478
|
+ if (1 != u.getUserstate()) {
|
|
479
|
+ delUsers.add(u);
|
|
480
|
+ } else {
|
|
481
|
+ studentsExisted.add(u);
|
|
482
|
+ }
|
|
483
|
+ if (!classid.equals(oldclassid)) {
|
482
|
484
|
//要添加的班级
|
483
|
485
|
setStudents(classid, schoolid, createid, user.getGroupid(), classStudents, groupStudents, studentid);//处理班级加入学生
|
484
|
486
|
List<Map> courses = listCourseByClassId(courseMap, classid);
|
|
@@ -513,8 +515,6 @@ public class ClassStudentService {
|
513
|
515
|
}
|
514
|
516
|
handleDelClassCourse2(delStudentList, changeCourseidList, courses2, studentid);//处理关联的直播课以及需要删除学生的直播班id
|
515
|
517
|
}
|
516
|
|
- } else {//本班学生信息
|
517
|
|
- studentsExisted.add(u);
|
518
|
518
|
}
|
519
|
519
|
}
|
520
|
520
|
}
|
|
@@ -660,13 +660,15 @@ public class ClassStudentService {
|
660
|
660
|
Integer classnum = student.getClassnum();//本班级学生数量
|
661
|
661
|
if (2 != u.getUsertype() || schoolid != u.getSchoolid() || 0 == student.getXznum()) {
|
662
|
662
|
usersNotExisted.add(u);
|
663
|
|
- } else if (0 == classnum && 2 == u.getUsertype() && schoolid == u.getSchoolid()) {
|
|
663
|
+ } else {
|
664
|
664
|
if (1 != u.getUserstate()) {
|
665
|
665
|
delUsers.add(u);
|
666
|
666
|
}
|
667
|
|
- setStudents(classid, schoolid, createid, user.getGroupid(), classStudents, groupStudents, studentid);//处理班级加入学生
|
668
|
|
- List<Map> courses = listCourseByClassId(courseMap, classid);
|
669
|
|
- handleAddClassCourse(classStudents, groupStudents, changeCourseidList, courses, studentid);//处理班级加入学生中关联的直播课加入学生
|
|
667
|
+ if (0 == classnum) {
|
|
668
|
+ setStudents(classid, schoolid, createid, user.getGroupid(), classStudents, groupStudents, studentid);//处理班级加入学生
|
|
669
|
+ List<Map> courses = listCourseByClassId(courseMap, classid);
|
|
670
|
+ handleAddClassCourse(classStudents, groupStudents, changeCourseidList, courses, studentid);//处理班级加入学生中关联的直播课加入学生
|
|
671
|
+ }
|
670
|
672
|
}
|
671
|
673
|
}
|
672
|
674
|
}
|