Browse Source

未分班学生列表优化

tags/正式版本
雍文秀 2 years ago
parent
commit
34966b6340

+ 4
- 0
suser/src/main/java/com/xhkjedu/suser/service/gradeclass/ClassStudentService.java View File

@@ -996,6 +996,10 @@ public class ClassStudentService {
996 996
     }
997 997
 
998 998
     public List<ClassStudentVo> listNoClassStu(TClassStudent student) {
999
+        if(N_Utils.isEmpty(student.getFieldname())) {
1000
+            student.setFieldname("studentname");
1001
+            student.setFieldorder("asc");
1002
+        }
999 1003
         setOrderField(student);
1000 1004
         setYear(student);
1001 1005
         return classStudentMapper.listNoClassStu(student);

+ 4
- 4
suser/src/main/resources/mapper/gradeclass/ClassStudentMapper.xml View File

@@ -78,11 +78,11 @@
78 78
         select u.username studentname,u.studentno,u.usersex,u.userid studentid,u.loginname,u.createtime,
79 79
         u.bindmac,u.mac,u.userstate,u.usertime,u.headpic,u.userlock,u.examno
80 80
         ,(case when u.userphone='' then userphone else concat(left(u.userphone,3),'****',right(u.userphone,4)) end)userphone
81
-        from t_user u left join
82
-        (select cs1.studentid,cs1.createtime from t_class_student cs1
81
+        from t_user u
82
+        where u.schoolid=#{student.schoolid} and u.usertype=2 and u.userid not in(
83
+        select cs1.studentid from t_class_student cs1
83 84
         left join t_class c on cs1.classid=c.classid where c.schoolid=#{student.schoolid} and c.year=#{student.year}
84
-        and c.classtype=1 and c.classstate=1) cs on u.userid=cs.studentid
85
-        where u.schoolid=#{student.schoolid} and u.usertype=2 and cs.studentid is null
85
+        and c.classtype=1 and c.classstate=1)
86 86
         <if test="student.userlock!=null and student.userlock!=0">
87 87
             and u.userlock=#{student.userlock}
88 88
         </if>

Loading…
Cancel
Save