Просмотр исходного кода

Merge remote-tracking branch 'origin/wn' into ywx

tags/正式3.11.0
雍文秀 1 год назад
Родитель
Сommit
1c915601f0

+ 3
- 3
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/ESubjectSearchController.java Просмотреть файл

@@ -54,9 +54,9 @@ public class ESubjectSearchController {
54 54
     @PostMapping("/list_qt")
55 55
     public ResultVo listQuickTeacher(@RequestBody EBase subject) {
56 56
         String username = subject.getCreatename();
57
-        Integer schoolid = subject.getSchoolid();
58
-        N_Utils.validation(new Object[]{username, "姓名", 2, schoolid, "学校id", 1});
59
-        Map list = eSubjectSearchService.listQuickTeacher(username, schoolid);
57
+        Integer examid = subject.getExamid();
58
+        N_Utils.validation(new Object[]{username, "姓名", 2, examid, "考试id", 1});
59
+        Map list = eSubjectSearchService.listQuickTeacher(username, examid);
60 60
         return new ResultVo(0, "获取成功", list);
61 61
     }
62 62
 

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/EClassMapper.java Просмотреть файл

@@ -31,7 +31,7 @@ public interface EClassMapper extends TkMapper<EClass> {
31 31
     List<CTeacherVo> listTeacherBySchoolId(@Param("schoolid") Integer schoolid);
32 32
 
33 33
     //学校教师查找
34
-    List<Map> listSearchTeacher(@Param("usernames") String[] usernames, @Param("schoolid") Integer schoolid);
34
+    List<Map> listSearchTeacher(@Param("usernames") String[] usernames, @Param("examid") Integer examid);
35 35
 
36 36
     //按班设置教师列表
37 37
     List<Map> listClassTeacher(@Param("classids") String classids, @Param("subjectid") String subjectid);

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectInvigilateService.java Просмотреть файл

@@ -85,7 +85,7 @@ public class ESubjectInvigilateService {
85 85
             }
86 86
             //关闭引用检测,避免循环给classes赋值出现"$ref":"$[0]"现象
87 87
             String str = JSON.toJSONString(schoolClasses, SerializerFeature.DisableCircularReferenceDetect);
88
-            s.put("classes", JSON.parseArray(str, Map.class));
88
+            s.put("schools", JSON.parseArray(str, Map.class));
89 89
         }
90 90
         map.put("subjects", subjects);
91 91
         return map;

+ 2
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectSearchService.java Просмотреть файл

@@ -59,10 +59,10 @@ public class ESubjectSearchService {
59 59
     }
60 60
 
61 61
     // 快捷设置
62
-    public Map listQuickTeacher(String username, Integer schoolid) {
62
+    public Map listQuickTeacher(String username, Integer examid) {
63 63
         Map map = new HashMap();
64 64
         String[] usernames = username.split(",");
65
-        List<Map> teachers = eClassMapper.listSearchTeacher(usernames, schoolid);
65
+        List<Map> teachers = eClassMapper.listSearchTeacher(usernames, examid);
66 66
         Map<String, Object> nameMap = teachers.stream().map(t -> t.get("username").toString()).distinct().collect(Collectors.toMap(t -> t, t -> t));
67 67
         StringBuilder sb = new StringBuilder();
68 68
         for (String name : usernames) {

+ 1
- 1
sexam/src/main/resources/mapper/exam/EBaseMapper.xml Просмотреть файл

@@ -13,7 +13,7 @@
13 13
     <!--考试列表-->
14 14
     <select id="listAll" resultType="java.util.Map">
15 15
         select b.examid,b.examname,b.examdate,b.gradeid,b.examtype,b.exammode,b.monitored,b.teashowrank,b.stushowrank
16
-        ,b.examstate,u.username createname,group_concat(distinct es.subjectname order by es.esid separator '|')subjectname
16
+        ,b.examstate,u.username createname,b.hashb,group_concat(distinct es.subjectname order by es.esid separator '|')subjectname
17 17
         ,count(distinct case when es.begintime is null or es.begintime='' then es.esid else null end)esnum
18 18
         ,min(es.esstate)esstate,min(es.pstate)pstate,min(ifnull(ep.correcttype,0))correcttype
19 19
         ,(case when b.exammode=1 then (count(distinct es.esid)-count(distinct ei.esid))

+ 2
- 2
sexam/src/main/resources/mapper/exam/EClassMapper.xml Просмотреть файл

@@ -45,8 +45,8 @@
45 45
     <!--学校教师查找-->
46 46
     <select id="listSearchTeacher" resultType="java.util.Map">
47 47
         select u.userid teacherid,u.username,u.loginname,u.usersex
48
-        from t_user u
49
-        where u.schoolid=#{schoolid} and u.usertype=1 and u.userstate=1 and u.username in
48
+        from t_user u left join e_class s on u.schoolid=s.schoolid
49
+        where s.examid=#{examid} and u.usertype=1 and u.userstate=1 and u.username in
50 50
         <foreach collection="usernames" item="username" open="(" separator="," close=")">
51 51
             #{username}
52 52
         </foreach>

Загрузка…
Отмена
Сохранить