Browse Source

集团校教师列表

tags/正式3.10.0
雍文秀 1 year ago
parent
commit
2304bd4507

+ 16
- 0
suser/src/main/java/com/xhkjedu/suser/controller/gradeclass/GradeController.java View File

@@ -86,6 +86,22 @@ public class GradeController {
86 86
         return new ResultVo(0,"获取教师列表成功",list);
87 87
     }
88 88
 
89
+    /**
90
+     * @Description 集团校教师列表
91
+     * @Param [tGrade]
92
+     * @Author ywx
93
+     * @Date 2023/7/21 16:16
94
+     * @return com.xhkjedu.vo.ResultVo
95
+     **/
96
+    @PostMapping("/list_jtteacher")
97
+    public ResultVo listJtTeacher(@RequestBody TGrade tGrade) {
98
+        Integer schoolid = tGrade.getSchoolid();
99
+        N_Utils.validation(new Object[]{schoolid, "学校id", 1});
100
+        List<Map<String, String>> list = gradeService.listJtTeacher(schoolid);
101
+        return new ResultVo(0, "获取集团校教师列表成功", list);
102
+    }
103
+
104
+
89 105
     /*
90 106
     * @Description 集团校管理班级
91 107
     * @Author WN

+ 3
- 0
suser/src/main/java/com/xhkjedu/suser/mapper/gradeclass/GradeMapper.java View File

@@ -40,4 +40,7 @@ public interface GradeMapper extends TkMapper<TGrade> {
40 40
 
41 41
     //教师设置集团学校班级权限列表
42 42
     List<Map> listTeacherJtClasses(@Param("schoolid")Integer schoolid, @Param("teacherid")Integer teacherid, @Param("year") Integer year);
43
+
44
+    //集团校教师
45
+    List<Map<String, String>> listJtTeacher(@Param("schoolid") Integer schoolid,@Param("year") Integer year);
43 46
 }

+ 12
- 0
suser/src/main/java/com/xhkjedu/suser/service/gradeclass/GradeService.java View File

@@ -126,4 +126,16 @@ public class GradeService {
126 126
         }
127 127
         return list;
128 128
     }
129
+
130
+    /**
131
+     * @Description 集团校教师列表
132
+     * @Param [schoolid]
133
+     * @Author ywx
134
+     * @Date 2023/7/21 16:17
135
+     * @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
136
+     **/
137
+    public List<Map<String, String>> listJtTeacher(Integer schoolid) {
138
+        Integer year = schoolMapper.getYearById(schoolid);
139
+        return gradeMapper.listJtTeacher(schoolid, year);
140
+    }
129 141
 }

+ 29
- 0
suser/src/main/resources/mapper/gradeclass/GradeMapper.xml View File

@@ -76,6 +76,35 @@
76 76
         where c.schoolid=#{schoolid} and c.year=#{year} and c.classstate=1 and u.usertype=1 and u.userstate=1 and c.classtype in (1,2)
77 77
         order by c.gradeid,c.classtype,c.classorder,s.subjectorder,convert(u.username using gbk)
78 78
     </select>
79
+    <!--集团校教师-->
80
+    <resultMap id="jtTeacherResult" type="java.util.Map">
81
+        <result property="schoolid" column="schoolid"/>
82
+        <result property="schoolname" column="schoolname"/>
83
+        <collection property="grades" ofType="java.util.Map" javaType="java.util.List">
84
+            <result property="gradeid" column="gradeid"/>
85
+            <collection property="subjects" ofType="java.util.Map" javaType="java.util.List">
86
+                <result property="subjectid" column="subjectid"/>
87
+                <result property="subjectname" column="subjectname"/>
88
+                <collection property="teachers" ofType="java.util.Map" javaType="java.util.List">
89
+                    <result property="teacherid" column="teacherid"/>
90
+                    <result property="teachername" column="teachername"/>
91
+                </collection>
92
+            </collection>
93
+        </collection>
94
+    </resultMap>
95
+    <select id="listJtTeacher" resultMap="jtTeacherResult">
96
+        select s1.schoolid,s1.schoolname,c.gradeid,s.subjectid,s.subjectname
97
+        ,u.userid as teacherid,u.username as teachername
98
+        from t_school_friend sf left join t_school s1 on sf.fschoolid=s1.schoolid
99
+        left join t_class c on s1.schoolid=c.schoolid
100
+        left join t_teacher_powersb ts on c.schoolid=ts.schoolid
101
+        left join t_subject s on ts.subjectid=s.subjectid
102
+        left join t_class_teacher ct on c.classid=ct.classid and ts.teacherid=ct.teacherid
103
+        left join t_user u on ct.teacherid=u.userid
104
+        where sf.schoolid=#{schoolid} and c.year=#{year} and c.classstate=1 and u.usertype=1 and u.userstate=1 and c.classtype in (1,2)
105
+        group by u.userid
106
+        order by s.schoolid,c.gradeid,c.classtype,c.classorder,s.subjectorder,convert(u.username using gbk)
107
+    </select>
79 108
 
80 109
     <!--集团校班级-->
81 110
     <resultMap id="listJtClassMap" type="java.util.Map">

Loading…
Cancel
Save