|
@@ -51,6 +51,34 @@
|
51
|
51
|
</if>
|
52
|
52
|
order by c.gradeid,c.classtype,c.classorder,c.classid desc
|
53
|
53
|
</select>
|
|
54
|
+ <!--获取班级学生列表-->
|
|
55
|
+ <resultMap id="gradeClassResult" type="java.util.Map">
|
|
56
|
+ <result property="gradeid" column="gradeid"/>
|
|
57
|
+ <collection property="classes" ofType="java.util.Map" javaType="java.util.List">
|
|
58
|
+ <result property="classid" column="classid"/>
|
|
59
|
+ <result property="classname" column="classname"/>
|
|
60
|
+ <result property="classnum" column="classnum"/>
|
|
61
|
+ <result property="classtype" column="classtype"/>
|
|
62
|
+ <collection property="students" ofType="java.util.Map" javaType="java.util.List">
|
|
63
|
+ <result property="studentid" column="studentid"/>
|
|
64
|
+ <result property="username" column="username"/>
|
|
65
|
+ </collection>
|
|
66
|
+ </collection>
|
|
67
|
+ </resultMap>
|
|
68
|
+ <select id="listClassStu" resultMap="gradeClassResult">
|
|
69
|
+ select c.gradeid,c.classid,c.classname,c.classnum,c.classtype,c.classorder,c.year,c.schoolyear
|
|
70
|
+ ,cs.studentid,u.username
|
|
71
|
+ from t_class c left join t_class_student cs on c.classid=cs.classid
|
|
72
|
+ left join t_user u on cs.studentid = u.userid
|
|
73
|
+ where c.schoolid=#{schoolid} and c.year=#{year} and c.classstate=1 and c.classnum>0
|
|
74
|
+ <if test="classtype!=null and classtype!=0">
|
|
75
|
+ and c.classtype=#{classtype}
|
|
76
|
+ </if>
|
|
77
|
+ <if test="classtype==null or classtype==0">
|
|
78
|
+ and c.classtype <![CDATA[ < ]]>5
|
|
79
|
+ </if>
|
|
80
|
+ order by c.gradeid,c.classtype,c.classorder,c.classid desc
|
|
81
|
+ </select>
|
54
|
82
|
|
55
|
83
|
<!--教师设置权限班级-->
|
56
|
84
|
<select id="listClassForTeacher" resultMap="gradeResult">
|