|
@@ -3,8 +3,8 @@
|
3
|
3
|
<mapper namespace="com.xhkjedu.suser.mapper.gradeclass.ClassTeacherMapper">
|
4
|
4
|
<!--班级教师列表-->
|
5
|
5
|
<select id="findAll" resultType="com.xhkjedu.suser.vo.gradeclass.ClassTeacherVo">
|
6
|
|
- select u.userid teacherid,u.username teachername,u.usersex,u.loginname,u.usertype,u.createtime,u.usertime,u.userlock
|
7
|
|
- ,(case when u.userphone='' then userphone else concat(left(u.userphone,3),'****',right(u.userphone,4)) end)userphone
|
|
6
|
+ select u.userid as teacherid,u.username as teachername,u.usersex,u.loginname,u.usertype,u.createtime,u.usertime,u.userlock
|
|
7
|
+ ,(if(u.userphone='', userphone, concat(left(u.userphone,3),'****',right(u.userphone,4)))) as userphone
|
8
|
8
|
,(select s.subjectname from t_teacher_powersb ts left join t_subject_book sb on ts.lsbid=sb.lsbid
|
9
|
9
|
left join t_subject s on sb.subjectid=s.subjectid
|
10
|
10
|
where ts.teacherid=u.userid limit 1)subjectname
|
|
@@ -61,14 +61,14 @@
|
61
|
61
|
</select>
|
62
|
62
|
<!--前年份教师任教分组学生-->
|
63
|
63
|
<resultMap id="teacherClass" type="java.util.Map">
|
64
|
|
- <result property="classid" column="classid"></result>
|
65
|
|
- <result property="classname" column="classname"></result>
|
66
|
|
- <result property="gradeid" column="gradeid"></result>
|
67
|
|
- <result property="classnum" column="classnum"></result>
|
|
64
|
+ <result property="classid" column="classid"/>
|
|
65
|
+ <result property="classname" column="classname"/>
|
|
66
|
+ <result property="gradeid" column="gradeid"/>
|
|
67
|
+ <result property="classnum" column="classnum"/>
|
68
|
68
|
<collection property="students" ofType="java.util.Map" javaType="java.util.List">
|
69
|
|
- <result property="studentid" column="studentid"></result>
|
70
|
|
- <result property="studentname" column="studentname"></result>
|
71
|
|
- <result property="headpic" column="headpic"></result>
|
|
69
|
+ <result property="studentid" column="studentid"/>
|
|
70
|
+ <result property="studentname" column="studentname"/>
|
|
71
|
+ <result property="headpic" column="headpic"/>
|
72
|
72
|
</collection>
|
73
|
73
|
</resultMap>
|
74
|
74
|
<!--获取作业学生列表-->
|
|
@@ -81,12 +81,12 @@
|
81
|
81
|
</select>
|
82
|
82
|
<!--获取作业教师列表-->
|
83
|
83
|
<resultMap id="paperTeacher" type="java.util.Map">
|
84
|
|
- <result property="classid" column="classid"></result>
|
85
|
|
- <result property="classname" column="classname"></result>
|
86
|
|
- <result property="gradeid" column="gradeid"></result>
|
|
84
|
+ <result property="classid" column="classid"/>
|
|
85
|
+ <result property="classname" column="classname"/>
|
|
86
|
+ <result property="gradeid" column="gradeid"/>
|
87
|
87
|
<collection property="teachers" ofType="java.util.Map" javaType="java.util.List">
|
88
|
|
- <result property="teacherid" column="teacherid"></result>
|
89
|
|
- <result property="teachername" column="teachername"></result>
|
|
88
|
+ <result property="teacherid" column="teacherid"/>
|
|
89
|
+ <result property="teachername" column="teachername"/>
|
90
|
90
|
</collection>
|
91
|
91
|
</resultMap>
|
92
|
92
|
<select id="listPaperTeacher" resultMap="paperTeacher">
|
|
@@ -126,14 +126,14 @@
|
126
|
126
|
</select>
|
127
|
127
|
|
128
|
128
|
<resultMap id="gradeClass" type="com.xhkjedu.suser.vo.gradeclass.GradeVo">
|
129
|
|
- <result property="gradeid" column="gradeid"></result>
|
130
|
|
- <result property="gradename" column="gradename"></result>
|
|
129
|
+ <result property="gradeid" column="gradeid"/>
|
|
130
|
+ <result property="gradename" column="gradename"/>
|
131
|
131
|
<collection property="classes" ofType="com.xhkjedu.suser.vo.gradeclass.ClassVo">
|
132
|
|
- <result property="gradeid" column="gradeid"></result>
|
133
|
|
- <result property="classid" column="classid"></result>
|
134
|
|
- <result property="classname" column="classname"></result>
|
135
|
|
- <result property="classnum" column="classnum"></result>
|
136
|
|
- <result property="classtype" column="classtype"></result>
|
|
132
|
+ <result property="gradeid" column="gradeid"/>
|
|
133
|
+ <result property="classid" column="classid"/>
|
|
134
|
+ <result property="classname" column="classname"/>
|
|
135
|
+ <result property="classnum" column="classnum"/>
|
|
136
|
+ <result property="classtype" column="classtype"/>
|
137
|
137
|
</collection>
|
138
|
138
|
</resultMap>
|
139
|
139
|
|
|
@@ -219,4 +219,25 @@
|
219
|
219
|
where ct.teacherid=#{role.teacherid} and c2.year=#{role.year} and c2.classstate=1 and c2.classtype=1 limit 1)
|
220
|
220
|
order by c.classtype,c.classorder,c.classname
|
221
|
221
|
</select>
|
|
222
|
+ <!--教师权限班级学生-->
|
|
223
|
+ <select id="listClassStu" resultMap="teacherClass">
|
|
224
|
+ select c.gradeid,c.classid,c.classname,c.classnum
|
|
225
|
+ ,cs.studentid,u.username studentname,u.headpic
|
|
226
|
+ from t_class_teacher ct left join t_class c on ct.classid=c.classid
|
|
227
|
+ left join t_class_student cs on c.classid = cs.classid
|
|
228
|
+ left join t_user u on cs.studentid=u.userid
|
|
229
|
+ where ct.teacherid=#{role.teacherid} and c.year=#{role.year} and c.classstate=1
|
|
230
|
+ and c.schoolid=#{role.schoolid}
|
|
231
|
+ <if test="role.classtype!=null and role.classtype!=0">
|
|
232
|
+ <if test="role.classtype!=11">and c.classtype=#{role.classtype}</if>
|
|
233
|
+ <if test="role.classtype==11">and c.classtype in(1,2)</if>
|
|
234
|
+ </if>
|
|
235
|
+ <if test="role.classtype==null or role.classtype==0">
|
|
236
|
+ and c.classtype!=99
|
|
237
|
+ </if>
|
|
238
|
+ <if test="role.gradeid!=null and role.gradeid!=0">
|
|
239
|
+ and c.gradeid=#{role.gradeid}
|
|
240
|
+ </if>
|
|
241
|
+ order by c.gradeid,c.classtype,c.classorder,c.classname,convert(u.username using gbk)
|
|
242
|
+ </select>
|
222
|
243
|
</mapper>
|