Browse Source

Merge remote-tracking branch 'cloud-schoolapi/ywx'

tags/正式版本
王宁 2 years ago
parent
commit
9303e1dd65

+ 25
- 8
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/EBaseController.java View File

13
 import com.xhkjedu.sexam.service.notice.NoticeService;
13
 import com.xhkjedu.sexam.service.notice.NoticeService;
14
 import com.xhkjedu.sexam.vo.exam.EBaseVo;
14
 import com.xhkjedu.sexam.vo.exam.EBaseVo;
15
 import com.xhkjedu.sexam.vo.exam.ExamVo;
15
 import com.xhkjedu.sexam.vo.exam.ExamVo;
16
+import com.xhkjedu.sexam.vo.system.UserVo;
16
 import com.xhkjedu.utils.N_Utils;
17
 import com.xhkjedu.utils.N_Utils;
17
 import com.xhkjedu.utils.PageUtil;
18
 import com.xhkjedu.utils.PageUtil;
18
 import com.xhkjedu.vo.PageResult;
19
 import com.xhkjedu.vo.PageResult;
178
         if (exam.getWwcnum() != 0) return new ResultVo(1, "还有考试试卷未设置完成");
179
         if (exam.getWwcnum() != 0) return new ResultVo(1, "还有考试试卷未设置完成");
179
         if (exam.getExamstate() != 0) return new ResultVo(0, "发布成功");
180
         if (exam.getExamstate() != 0) return new ResultVo(0, "发布成功");
180
 
181
 
181
-        List<Map> students = eBaseService.listStuByExamId(examid);//获取考生
182
+        List<UserVo> students = eBaseService.listStuByExamId(examid);//获取考生
182
         eBaseService.updateExamStateStart(examid, examcomm, students);//发布考试
183
         eBaseService.updateExamStateStart(examid, examcomm, students);//发布考试
183
 
184
 
184
         if (notice == 2 && msg == 2) return new ResultVo(0, "发布成功");
185
         if (notice == 2 && msg == 2) return new ResultVo(0, "发布成功");
190
         String noticetitle = examname + "-考试公告";
191
         String noticetitle = examname + "-考试公告";
191
         List<Map> classes = eBaseService.listClass(examid);
192
         List<Map> classes = eBaseService.listClass(examid);
192
         String classids = classList.stream().map(c -> c.getClassid().toString()).collect(Collectors.joining(","));
193
         String classids = classList.stream().map(c -> c.getClassid().toString()).collect(Collectors.joining(","));
193
-        List<Map> teachers = eBaseService.listTeacherByClassIds(classids);//获取考试班级任教老师
194
+        List<UserVo> teachers = eBaseService.listTeacherByClassIds(classids);//获取考试班级任教老师
194
         if (notice == 1) {
195
         if (notice == 1) {
195
             for (Map s : classes) {
196
             for (Map s : classes) {
196
                 TNoticeClass nt = new TNoticeClass();
197
                 TNoticeClass nt = new TNoticeClass();
204
             n.setClasses(classList);
205
             n.setClasses(classList);
205
             noticeList.add(n);
206
             noticeList.add(n);
206
 
207
 
207
-            for (Map t : teachers) {
208
+            for (UserVo t : teachers) {
208
                 TNoticeTeacher nt = new TNoticeTeacher();
209
                 TNoticeTeacher nt = new TNoticeTeacher();
209
-                nt.setTeacherid((Integer) t.get("teacherid"));
210
+                nt.setTeacherid(t.getUserid());
210
                 teacherList.add(nt);
211
                 teacherList.add(nt);
211
             }
212
             }
212
             TNotice n2 = new TNotice();
213
             TNotice n2 = new TNotice();
218
         }
219
         }
219
         if (msg == 1) {
220
         if (msg == 1) {
220
             String msgtxt = noticetitle + "\n" + examcomm;
221
             String msgtxt = noticetitle + "\n" + examcomm;
221
-            List<String> userphones = students.stream().filter(s -> N_Utils.isNotEmpty(s.get("userphone")))
222
-                    .map(s -> s.get("userphone").toString()).collect(Collectors.toList());
222
+            List<String> userphones = students.stream().filter(s -> N_Utils.isNotEmpty(s.getUserphone()))
223
+                    .map(s -> s.getUserphone()).collect(Collectors.toList());
223
             for (String userphone : userphones) {
224
             for (String userphone : userphones) {
224
                 TMsg m = new TMsg();
225
                 TMsg m = new TMsg();
225
                 m.setMsgtxt(msgtxt);
226
                 m.setMsgtxt(msgtxt);
226
                 m.setUserphone(userphone);
227
                 m.setUserphone(userphone);
227
                 msgList.add(m);
228
                 msgList.add(m);
228
             }
229
             }
229
-            userphones = teachers.stream().filter(s -> N_Utils.isNotEmpty(s.get("userphone")))
230
-                    .map(s -> s.get("userphone").toString()).collect(Collectors.toList());
230
+            userphones = teachers.stream().filter(s -> N_Utils.isNotEmpty(s.getUserphone()))
231
+                    .map(s -> s.getUserphone()).collect(Collectors.toList());
231
             for (String userphone : userphones) {
232
             for (String userphone : userphones) {
232
                 TMsg m = new TMsg();
233
                 TMsg m = new TMsg();
233
                 m.setMsgtxt(msgtxt);
234
                 m.setMsgtxt(msgtxt);
354
         eBaseService.setSubjectTeacher(subject);
355
         eBaseService.setSubjectTeacher(subject);
355
         return new ResultVo(0, "设置成功");
356
         return new ResultVo(0, "设置成功");
356
     }
357
     }
358
+
359
+    /**
360
+     * 考试设置状态
361
+     *
362
+     * @return com.xhkjedu.vo.ResultVo
363
+     * @Param [eBase]
364
+     * @Author ywx
365
+     * @Date 2022/7/28 9:37
366
+     **/
367
+    @PostMapping("/get_set")
368
+    public ResultVo getSetState(@RequestBody EBase eBase) {
369
+        Integer examid = eBase.getExamid();
370
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
371
+        Map map = eBaseService.getSetState(examid);
372
+        return new ResultVo(0, "获取考试设置状态成功", map);
373
+    }
357
 }
374
 }

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/EBaseMapper.java View File

35
 
35
 
36
     //根据考试id获取考试状态信息
36
     //根据考试id获取考试状态信息
37
     EBaseVo getExamStateById(@Param("examid") Integer examid);
37
     EBaseVo getExamStateById(@Param("examid") Integer examid);
38
+
39
+    //考试设置状态
40
+    Map getSetState(@Param("examid") Integer examid);
38
 }
41
 }

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/EClassMapper.java View File

35
 
35
 
36
     //按班设置教师列表
36
     //按班设置教师列表
37
     List<Map> listClassTeacher(@Param("classids") String classids, @Param("subjectid") String subjectid);
37
     List<Map> listClassTeacher(@Param("classids") String classids, @Param("subjectid") String subjectid);
38
+
39
+    //获取考试班级数量
40
+    Integer getClassNumByExamId(@Param("examid") Integer examid);
38
 }
41
 }

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/ESubjectInvigilateMapper.java View File

12
     void delByEsId(@Param("esid") Integer esid);
12
     void delByEsId(@Param("esid") Integer esid);
13
 
13
 
14
     //监考设置列表
14
     //监考设置列表
15
-    List<Map> listSubject(@Param("examid") Integer examid);
15
+    List<Map> listSubject(@Param("examid") Integer examid, @Param("classnum") Integer classnum);
16
 
16
 
17
     //考试监考人
17
     //考试监考人
18
     List<Map> listByEsId(@Param("esid") Integer esid);
18
     List<Map> listByEsId(@Param("esid") Integer esid);

+ 4
- 4
sexam/src/main/java/com/xhkjedu/sexam/mapper/system/UserMapper.java View File

1
 package com.xhkjedu.sexam.mapper.system;
1
 package com.xhkjedu.sexam.mapper.system;
2
 
2
 
3
+import com.xhkjedu.sexam.vo.system.UserVo;
3
 import org.apache.ibatis.annotations.Param;
4
 import org.apache.ibatis.annotations.Param;
4
 
5
 
5
 import java.util.List;
6
 import java.util.List;
6
-import java.util.Map;
7
 
7
 
8
 public interface UserMapper {
8
 public interface UserMapper {
9
     //根据用户ids查找手机号
9
     //根据用户ids查找手机号
10
-    List<Map> listPhoneByUserIds(@Param("userids") List<Integer> userids);
10
+    List<UserVo> listPhoneByUserIds(@Param("userids") List<Integer> userids);
11
 
11
 
12
     //获取考生
12
     //获取考生
13
-    List<Map> listStuByExamId(@Param("examid") Integer examid);
13
+    List<UserVo> listStuByExamId(@Param("examid") Integer examid);
14
 
14
 
15
     //获取考试班级任教老师
15
     //获取考试班级任教老师
16
-    List<Map> listTeacherByClassIds(@Param("classids") String classids);
16
+    List<UserVo> listTeacherByClassIds(@Param("classids") String classids);
17
 }
17
 }

+ 12
- 6
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java View File

14
 import com.xhkjedu.sexam.model.paper.EPaper;
14
 import com.xhkjedu.sexam.model.paper.EPaper;
15
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
15
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
16
 import com.xhkjedu.sexam.vo.exam.EBaseVo;
16
 import com.xhkjedu.sexam.vo.exam.EBaseVo;
17
+import com.xhkjedu.sexam.vo.system.UserVo;
17
 import com.xhkjedu.utils.N_Utils;
18
 import com.xhkjedu.utils.N_Utils;
18
 import com.xhkjedu.vo.ResultVo;
19
 import com.xhkjedu.vo.ResultVo;
19
 import lombok.extern.slf4j.Slf4j;
20
 import lombok.extern.slf4j.Slf4j;
148
 
149
 
149
     //发布考试
150
     //发布考试
150
     @Transactional(rollbackFor = Exception.class)
151
     @Transactional(rollbackFor = Exception.class)
151
-    public void updateExamStateStart(Integer examid, String examcomm, List<Map> students) {
152
+    public void updateExamStateStart(Integer examid, String examcomm, List<UserVo> students) {
152
         //更改考试状态
153
         //更改考试状态
153
         eBaseMapper.postExam(examid, examcomm);
154
         eBaseMapper.postExam(examid, examcomm);
154
         //发布考试,获取考试试卷题量和分值
155
         //发布考试,获取考试试卷题量和分值
160
             Integer epid = paper.getEpid();
161
             Integer epid = paper.getEpid();
161
             Integer pnum = paper.getPnum();
162
             Integer pnum = paper.getPnum();
162
             Double pscore = paper.getPscore();
163
             Double pscore = paper.getPscore();
163
-            for (Map student : students) {
164
+            for (UserVo student : students) {
164
                 EPaperStudent es = new EPaperStudent();
165
                 EPaperStudent es = new EPaperStudent();
165
                 es.setExamid(examid);
166
                 es.setExamid(examid);
166
                 es.setEsid(esid);
167
                 es.setEsid(esid);
167
                 es.setEpid(epid);
168
                 es.setEpid(epid);
168
-                es.setClassid((Integer) student.get("classid"));
169
-                es.setStudentid((Integer) student.get("userid"));
169
+                es.setClassid(student.getClassid());
170
+                es.setStudentid(student.getUserid());
170
                 es.setSstate(0);
171
                 es.setSstate(0);
171
                 es.setChecked(0);
172
                 es.setChecked(0);
172
                 es.setNum(pnum);
173
                 es.setNum(pnum);
236
     }
237
     }
237
 
238
 
238
     //获取考生
239
     //获取考生
239
-    public List<Map> listStuByExamId(Integer examid) {
240
+    public List<UserVo> listStuByExamId(Integer examid) {
240
         return userMapper.listStuByExamId(examid);
241
         return userMapper.listStuByExamId(examid);
241
     }
242
     }
242
 
243
 
250
         return eSubjectMapper.countNoCompletePaper(examid);
251
         return eSubjectMapper.countNoCompletePaper(examid);
251
     }
252
     }
252
 
253
 
253
-    public List<Map> listTeacherByClassIds(String classids) {
254
+    public List<UserVo> listTeacherByClassIds(String classids) {
254
         return userMapper.listTeacherByClassIds(classids);
255
         return userMapper.listTeacherByClassIds(classids);
255
     }
256
     }
256
 
257
 
258
     public void setSubjectTeacher(ESubject subject) {
259
     public void setSubjectTeacher(ESubject subject) {
259
         eSubjectMapper.updateByPrimaryKeySelective(subject);
260
         eSubjectMapper.updateByPrimaryKeySelective(subject);
260
     }
261
     }
262
+
263
+    //考试设置状态
264
+    public Map getSetState(Integer examid) {
265
+        return eBaseMapper.getSetState(examid);
266
+    }
261
 }
267
 }

+ 2
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectInvigilateService.java View File

42
     //监考设置列表
42
     //监考设置列表
43
     public Map listSubject(Integer examid) {
43
     public Map listSubject(Integer examid) {
44
         Map map = eBaseMapper.findById(examid);
44
         Map map = eBaseMapper.findById(examid);
45
-        List<Map> subjects = eSubjectInvigilateMapper.listSubject(examid);//监考设置列表
45
+        Integer classnum = eClassMapper.getClassNumByExamId(examid);//获取考试班级数量
46
+        List<Map> subjects = eSubjectInvigilateMapper.listSubject(examid, classnum);//监考设置列表
46
         map.put("subjects", subjects);
47
         map.put("subjects", subjects);
47
         return map;
48
         return map;
48
     }
49
     }

+ 9
- 4
sexam/src/main/java/com/xhkjedu/sexam/service/notice/NoticeService.java View File

13
 import com.xhkjedu.sexam.model.notice.TNoticeTeacher;
13
 import com.xhkjedu.sexam.model.notice.TNoticeTeacher;
14
 import com.xhkjedu.sexam.utils.SMSSender;
14
 import com.xhkjedu.sexam.utils.SMSSender;
15
 import com.xhkjedu.sexam.vo.exam.ZtMsgVo;
15
 import com.xhkjedu.sexam.vo.exam.ZtMsgVo;
16
+import com.xhkjedu.sexam.vo.system.UserVo;
16
 import com.xhkjedu.utils.N_Utils;
17
 import com.xhkjedu.utils.N_Utils;
17
 import org.springframework.stereotype.Service;
18
 import org.springframework.stereotype.Service;
18
 import org.springframework.transaction.annotation.Transactional;
19
 import org.springframework.transaction.annotation.Transactional;
48
     //批量添加通知和短信
49
     //批量添加通知和短信
49
     @Transactional(rollbackFor = Exception.class)
50
     @Transactional(rollbackFor = Exception.class)
50
     public void batchSave(List<TNotice> noticeList, List<TMsg> msgList, Integer schoolid, Integer createid, Integer noticetype) {
51
     public void batchSave(List<TNotice> noticeList, List<TMsg> msgList, Integer schoolid, Integer createid, Integer noticetype) {
52
+        noticeList = null;
53
+        msgList = null;
51
         Integer createtime = N_Utils.getSecondTimestamp();
54
         Integer createtime = N_Utils.getSecondTimestamp();
52
         if (N_Utils.isListNotEmpty(noticeList)) {//通知
55
         if (N_Utils.isListNotEmpty(noticeList)) {//通知
53
             noticeList.forEach(n -> {
56
             noticeList.forEach(n -> {
103
                 }
106
                 }
104
             } else {//通知对象2老师
107
             } else {//通知对象2老师
105
                 List<Integer> userids = msgList.stream().map(m -> m.getUserid()).distinct().collect(Collectors.toList());
108
                 List<Integer> userids = msgList.stream().map(m -> m.getUserid()).distinct().collect(Collectors.toList());
106
-                List<Map> users = userMapper.listPhoneByUserIds(userids);//根据用户ids查找手机号
109
+                List<UserVo> users = userMapper.listPhoneByUserIds(userids);//根据用户ids查找手机号
107
                 Map<Integer, TMsg> msgMap = msgList.stream().collect(Collectors.toMap(m -> m.getUserid(), m -> m));
110
                 Map<Integer, TMsg> msgMap = msgList.stream().collect(Collectors.toMap(m -> m.getUserid(), m -> m));
108
                 for (int i = 0; i < users.size(); i++) {
111
                 for (int i = 0; i < users.size(); i++) {
109
-                    Map u = users.get(i);
110
-                    String userphone = u.get("userphone").toString();
112
+                    UserVo u = users.get(i);
113
+                    String userphone = u.getUserphone();
111
                     if (N_Utils.isEmpty(userphone)) continue;
114
                     if (N_Utils.isEmpty(userphone)) continue;
112
-                    TMsg m = msgMap.get(u.get("userid"));
115
+                    TMsg m = msgMap.get(u.getUserid());
113
                     m.setUserphone(userphone);
116
                     m.setUserphone(userphone);
114
                     m.setCreatetime(createtime);
117
                     m.setCreatetime(createtime);
115
                     msgs.add(m);
118
                     msgs.add(m);
140
 
143
 
141
     //批量添加通知和短信(发布考试用)
144
     //批量添加通知和短信(发布考试用)
142
     public void batchSave2(List<TNotice> noticeList, List<TMsg> msgList, Integer schoolid, Integer createid) {
145
     public void batchSave2(List<TNotice> noticeList, List<TMsg> msgList, Integer schoolid, Integer createid) {
146
+        noticeList = null;
147
+        msgList = null;
143
         Integer createtime = N_Utils.getSecondTimestamp();
148
         Integer createtime = N_Utils.getSecondTimestamp();
144
         if (N_Utils.isListNotEmpty(noticeList)) {//通知
149
         if (N_Utils.isListNotEmpty(noticeList)) {//通知
145
             noticeList.forEach(n -> {
150
             noticeList.forEach(n -> {

+ 17
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/system/UserVo.java View File

1
+package com.xhkjedu.sexam.vo.system;
2
+
3
+import lombok.Data;
4
+
5
+/**
6
+ * @author ywx
7
+ * @className UserVo
8
+ * @description 用户
9
+ * @date 2022/7/28 9:45
10
+ **/
11
+@Data
12
+public class UserVo {
13
+    private Integer userid;//用户id
14
+    private String username;//姓名
15
+    private String userphone;//手机号
16
+    private Integer classid;//班级id
17
+}

+ 13
- 0
sexam/src/main/resources/mapper/exam/EBaseMapper.xml View File

67
         from e_base eb left join e_subject es on eb.examid = es.examid
67
         from e_base eb left join e_subject es on eb.examid = es.examid
68
         where eb.examid=#{examid}
68
         where eb.examid=#{examid}
69
     </select>
69
     </select>
70
+    <!--考试设置状态-->
71
+    <select id="getSetState" resultType="java.util.Map">
72
+        select count(distinct case when es.begintime is null or es.begintime='' then es.esid else null end)esnum
73
+        ,min(es.esstate)esstate,min(ifnull(ep.correcttype,0))correcttype
74
+        ,(case when b.exammode=1 then (count(distinct es.esid)-count(distinct ei.esid))
75
+        else (select sum(ec.classnum)-count(ps.epsid) from e_class ec
76
+        left join e_paper_student ps on ec.examid=ps.examid and ps.sstate in(0,1)
77
+        where ec.examid=b.examid) end)papernum
78
+        from e_base b left join e_subject es on es.examid=b.examid
79
+        left join e_paper ep on ep.esid = es.esid
80
+        left join e_subject_invigilate ei on ei.esid = es.esid
81
+        where b.examid=#{examid}
82
+    </select>
70
 </mapper>
83
 </mapper>

+ 4
- 0
sexam/src/main/resources/mapper/exam/EClassMapper.xml View File

60
         where ct.classid in(${classids}) and sb.subjectid=#{subjectid} and u.userstate=1
60
         where ct.classid in(${classids}) and sb.subjectid=#{subjectid} and u.userstate=1
61
         group by ct.classid,ct.teacherid
61
         group by ct.classid,ct.teacherid
62
     </select>
62
     </select>
63
+    <!--获取考试班级数量-->
64
+    <select id="getClassNumByExamId" resultType="java.lang.Integer">
65
+        select count(*) from e_class where examid=#{examid}
66
+    </select>
63
 </mapper>
67
 </mapper>

+ 7
- 7
sexam/src/main/resources/mapper/exam/ESubjectInvigilateMapper.xml View File

7
     </delete>
7
     </delete>
8
     <!--监考设置列表-->
8
     <!--监考设置列表-->
9
     <select id="listSubject" resultType="java.util.Map">
9
     <select id="listSubject" resultType="java.util.Map">
10
-        select s.esid,s.subjectid,s.sdate,s.begintime,s.endtime,s.esstate,s.subjectname
11
-        ,ifnull(ep.pnum,0)pnum,ifnull(ep.pscore,0)pscore,ep.correcttype
12
-        ,(select group_concat(distinct u.username separator '、')
13
-        from e_subject_invigilate ei left join t_user u on ei.teacherid = u.userid
14
-        where ei.esid=s.esid and ei.majored=1)majorname
15
-        from e_subject s left join e_paper ep on s.esid = ep.esid
16
-        where s.examid=#{examid}
10
+        select s.*,ifnull(ep.pnum,0)pnum,ifnull(ep.pscore,0)pscore,ep.correcttype
11
+        from (select s.esid,s.subjectid,s.sdate,s.begintime,s.endtime,s.esstate,s.subjectname
12
+        ,group_concat(u.username separator '、')majorname
13
+        ,#{classnum}-count(DISTINCT ei.classid) einum
14
+        from e_subject s left join e_subject_invigilate ei on ei.esid=s.esid
15
+        left join t_user u on u.userid=ei.teacherid and ei.majored=1
16
+        where s.examid=#{examid} group by s.esid)s left join e_paper ep on s.esid = ep.esid
17
     </select>
17
     </select>
18
     <!--考试监考人-->
18
     <!--考试监考人-->
19
     <select id="listByEsId" resultType="java.util.Map">
19
     <select id="listByEsId" resultType="java.util.Map">

+ 1
- 1
sexam/src/main/resources/mapper/exam/ESubjectMapper.xml View File

39
     <!--考试科目设置列表-->
39
     <!--考试科目设置列表-->
40
     <select id="listSubjectSet" resultType="java.util.Map">
40
     <select id="listSubjectSet" resultType="java.util.Map">
41
         select es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,es.esstate
41
         select es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,es.esstate
42
-        ,ep.correcttype
42
+        ,ep.correcttype,es.esid,ep.epid
43
         ,(select count(*) from e_subject_invigilate ei where ei.esid=es.esid)jkjsnum
43
         ,(select count(*) from e_subject_invigilate ei where ei.esid=es.esid)jkjsnum
44
         ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
44
         ,count(case when eps.sstate=3 then eps.epsid else null end)qknum
45
         ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum
45
         ,count(case when eps.sstate=2 then eps.epsid else null end)tjnum

+ 3
- 3
sexam/src/main/resources/mapper/system/UserMapper.xml View File

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.xhkjedu.sexam.mapper.system.UserMapper">
3
 <mapper namespace="com.xhkjedu.sexam.mapper.system.UserMapper">
4
     <!--根据用户ids查找手机号-->
4
     <!--根据用户ids查找手机号-->
5
-    <select id="listPhoneByUserIds" resultType="java.util.Map">
5
+    <select id="listPhoneByUserIds" resultType="com.xhkjedu.sexam.vo.system.UserVo">
6
         select userid,userphone from t_user where userid in
6
         select userid,userphone from t_user where userid in
7
         <foreach collection="userids" item="userid" open="(" separator="," close=")">
7
         <foreach collection="userids" item="userid" open="(" separator="," close=")">
8
             ${userid}
8
             ${userid}
9
         </foreach>
9
         </foreach>
10
     </select>
10
     </select>
11
     <!--获取考生-->
11
     <!--获取考生-->
12
-    <select id="listStuByExamId" resultType="java.util.Map">
12
+    <select id="listStuByExamId" resultType="com.xhkjedu.sexam.vo.system.UserVo">
13
         select u.userid,u.userphone,ec.classid
13
         select u.userid,u.userphone,ec.classid
14
         from e_class ec left join t_class_student cs on ec.classid = cs.classid
14
         from e_class ec left join t_class_student cs on ec.classid = cs.classid
15
         left join t_user u on cs.studentid = u.userid
15
         left join t_user u on cs.studentid = u.userid
16
         where ec.examid=#{examid}
16
         where ec.examid=#{examid}
17
     </select>
17
     </select>
18
     <!--获取考试班级任教老师-->
18
     <!--获取考试班级任教老师-->
19
-    <select id="listTeacherByClassIds" resultType="java.util.Map">
19
+    <select id="listTeacherByClassIds" resultType="com.xhkjedu.sexam.vo.system.UserVo">
20
         select u.userid,u.userphone
20
         select u.userid,u.userphone
21
         from t_class_teacher ct left join t_user u on ct.studentid = u.userid
21
         from t_class_teacher ct left join t_user u on ct.studentid = u.userid
22
         where ct.classid in(${classids}) and u.userstate=1
22
         where ct.classid in(${classids}) and u.userstate=1

Loading…
Cancel
Save