Browse Source

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

ywx
王宁 2 months ago
parent
commit
c8a176c02c

+ 4
- 52
smarking/src/main/java/com/xhkjedu/smarking/controller/exam/MsSubjectSearchController.java View File

@@ -74,56 +74,7 @@ public class MsSubjectSearchController {
74 74
     }
75 75
 
76 76
     /**
77
-     * 考试科目阅卷设置列表
78
-     *
79
-     * @return com.xhkjedu.vo.ResultVo
80
-     * @Param [base]
81
-     * @Author ywx
82
-     * @Date 2022/7/21 16:59
83
-     **/
84
-    @PostMapping("/list_subject")
85
-    public ResultVo listSubject(@RequestBody ESubjectVo base) {
86
-        Integer examid = base.getExamid();
87
-        N_Utils.validation(new Object[]{examid, "考试id", 1});
88
-        Map map = subjectSearchService.listSubject(examid);
89
-        return new ResultVo(0, "获取成功!", map);
90
-    }
91
-
92
-    /**
93
-     * 主监考人查找
94
-     *
95
-     * @return com.xhkjedu.vo.ResultVo
96
-     * @Param [base]
97
-     * @Author ywx
98
-     * @Date 2022/7/29 14:32
99
-     **/
100
-    @PostMapping("/list_zt")
101
-    public ResultVo listMasterTeacher(@RequestBody EBaseVo base) {
102
-        Integer schoolid = base.getSchoolid();
103
-        N_Utils.validation(new Object[]{schoolid, "学校id", 1});
104
-        List<Map> list = subjectSearchService.listMasterTeacher(schoolid);
105
-        return new ResultVo(0, "获取成功!", list);
106
-    }
107
-
108
-    /**
109
-     * 主监考人快捷查找
110
-     *
111
-     * @return com.xhkjedu.vo.ResultVo
112
-     * @Param [base]
113
-     * @Author ywx
114
-     * @Date 2022/7/29 15:25
115
-     **/
116
-    @PostMapping("/list_qzt")
117
-    public ResultVo listQuickMasterTeacher(@RequestBody EBaseVo base) {
118
-        Integer schoolid = base.getSchoolid();
119
-        String username = base.getUsername();
120
-        N_Utils.validation(new Object[]{schoolid, "学校id", 1, username, "姓名", 2});
121
-        Map list = subjectSearchService.listQuickMasterTeacher(schoolid, username);
122
-        return new ResultVo(0, "获取成功!", list);
123
-    }
124
-
125
-    /**
126
-     * @Description 按考试搜索考试学生
77
+     * @Description 据考号搜索参加考试学生
127 78
      * @Param [student]
128 79
      * @Return com.xhkjedu.vo.ResultVo
129 80
      * @Author wn
@@ -133,8 +84,9 @@ public class MsSubjectSearchController {
133 84
     public ResultVo listStudentByExamno(@RequestBody MsClassStudent student) {
134 85
         Integer examid = student.getExamid();
135 86
         String examno = student.getExamno();
136
-        N_Utils.validation(new Object[]{examid, "考试id", 1, examno, "考号", 2});
137
-        List<Map> list = subjectSearchService.listStudentByExamno(examid, examno);
87
+        String subjectid = student.getSubjectid();
88
+        N_Utils.validation(new Object[]{examid, "考试id", 1, examno, "考号", 2, subjectid, "科目id", 2});
89
+        List<Map> list = subjectSearchService.listStudentByExamno(examid, examno, subjectid);
138 90
         return new ResultVo(0, "获取成功!", list);
139 91
     }
140 92
 }

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/mapper/exam/MsClassMapper.java View File

@@ -36,5 +36,5 @@ public interface MsClassMapper extends TkMapper<MsClass> {
36 36
     List<Map> listSearchTeacher(@Param("usernames") String[] usernames,@Param("examid") Integer examid);
37 37
 
38 38
     //按班设置教师列表
39
-    List<Map> listClassTeacher(@Param("classids") String classids,@Param("examid") String subjectid);
39
+    List<Map> listClassTeacher(@Param("classids") String classids,@Param("subjectid") String subjectid);
40 40
 }

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/mapper/exam/MsClassStudentMapper.java View File

@@ -23,5 +23,5 @@ public interface MsClassStudentMapper extends TkMapper<MsClassStudent> {
23 23
     List<MsClassStudent> listByClassIds(@Param("classids") List<Integer> classids);
24 24
 
25 25
     //根据考号搜索参加考试学生
26
-    List<Map> listStudentByExamIdAnExamno(@Param("examid") Integer examid,@Param("examno") String examno);
26
+    List<Map> listStudentByExamIdAnExamno(@Param("examid") Integer examid, @Param("examno") String examno,@Param("subjectid") String subjectid);
27 27
 }

+ 4
- 71
smarking/src/main/java/com/xhkjedu/smarking/service/exam/MsSubjectSearchService.java View File

@@ -1,7 +1,7 @@
1 1
 package com.xhkjedu.smarking.service.exam;
2 2
 
3
-import com.xhkjedu.smarking.mapper.exam.*;
4
-import com.xhkjedu.smarking.mapper.system.UserMapper;
3
+import com.xhkjedu.smarking.mapper.exam.MsClassMapper;
4
+import com.xhkjedu.smarking.mapper.exam.MsClassStudentMapper;
5 5
 import com.xhkjedu.smarking.vo.exam.CTeacherVo;
6 6
 import com.xhkjedu.utils.N_Utils;
7 7
 import org.springframework.stereotype.Service;
@@ -15,12 +15,6 @@ public class MsSubjectSearchService {
15 15
     @Resource
16 16
     private MsClassMapper classMapper;
17 17
     @Resource
18
-    private MsExamMapper examMapper;
19
-    @Resource
20
-    private MsSubjectMapper subjectMapper;
21
-    @Resource
22
-    private UserMapper userMapper;
23
-    @Resource
24 18
     private MsClassStudentMapper classStudentMapper;
25 19
 
26 20
     // 查找设置
@@ -82,69 +76,8 @@ public class MsSubjectSearchService {
82 76
         return list;
83 77
     }
84 78
 
85
-    public Map listSubject(Integer examid) {
86
-        Map map = examMapper.findById(examid);
87
-        /*List<Map> subjects = subjectMapper.listSubjectCSet(examid);// 考试科目阅卷设置列表
88
-        Integer schoolid = Integer.parseInt(map.get("schoolid").toString());// 发起考试的学校
89
-        for (Map s : subjects) {
90
-            Integer correcttype = (Integer) s.get("correcttype");
91
-            Integer epid = (Integer) s.get("epid");
92
-            List<Map> list = new ArrayList<>();
93
-            if (correcttype == 1) {
94
-                list = classMapper.listSchoolClassByExamId(schoolid, examid);// 考试班级
95
-                List<Map> users = ePaperCorrectclassMapper.listByEpId(epid);// 试卷批阅人
96
-                for (Map m : list) {
97
-                    List<Map> cmapList = (List<Map>) m.get("classes");
98
-                    for (Map c : cmapList) {
99
-                        List<Map> teachers = users.stream().filter(u -> u.get("classid").equals(c.get("classid")))
100
-                                                  .sorted(Comparator.comparing(t -> t.get("username").toString())).collect(Collectors.toList());
101
-                        c.put("teachers", teachers);
102
-                    }
103
-                }
104
-            } else if (correcttype == 2) {
105
-                list = ePaperCorrectquestionMapper.listQnByEpId(epid);
106
-                List<Map> users = ePaperCorrectquestionMapper.listByEpId(epid);// 试卷批阅人
107
-                for (Map q : list) {
108
-                    Object qorder = q.get("qorder");
109
-                    List<Map> teachers = users.stream().filter(u -> u.get("qorder").equals(qorder))
110
-                                              .sorted(Comparator.comparing(t -> t.get("username").toString())).collect(Collectors.toList());
111
-                    q.put("teachers", teachers);
112
-                }
113
-            }
114
-            s.put("correctList", list);
115
-        }
116
-        map.put("subjects", subjects);*/
117
-        return map;
118
-    }
119
-
120
-    // 主监考人查找
121
-    public List<Map> listMasterTeacher(Integer schoolid) {
122
-        return userMapper.listMasterTeacher(schoolid);
123
-    }
124
-
125
-    // 主监考人快捷查找
126
-    public Map listQuickMasterTeacher(Integer schoolid, String username) {
127
-        Map map = new HashMap();
128
-        String[] usernames = username.split(",");
129
-        List<Map> teachers = userMapper.listQuickMasterTeacher(usernames, schoolid);
130
-        Map<String, Object> nameMap = teachers.stream().map(t -> t.get("username").toString()).distinct().collect(Collectors.toMap(t -> t, t -> t));
131
-        StringBuilder sb = new StringBuilder();
132
-        for (String name : usernames) {
133
-            if (nameMap.get(name) == null) {
134
-                sb.append(name).append(",");
135
-            }
136
-        }
137
-        map.put("teachers", teachers);// 匹配的教师
138
-        String notExist = sb.toString();// 未匹配的教师
139
-        if (N_Utils.isNotEmpty(notExist)) {
140
-            notExist = notExist.substring(0, notExist.length() - 1);
141
-        }
142
-        map.put("notExist", notExist);
143
-        return map;
144
-    }
145
-
146 79
     // 据考号搜索参加考试学生
147
-    public List<Map> listStudentByExamno(Integer examid, String examno) {
148
-        return classStudentMapper.listStudentByExamIdAnExamno(examid, examno);
80
+    public List<Map> listStudentByExamno(Integer examid, String examno, String subjectid) {
81
+        return classStudentMapper.listStudentByExamIdAnExamno(examid, examno, subjectid);
149 82
     }
150 83
 }

+ 6
- 0
smarking/src/main/resources/application.properties View File

@@ -77,6 +77,12 @@ spring.rabbitmq.listener.simple.retry.initial-interval=30000ms
77 77
 #\u91CD\u8BD5\u6B21\u6570\u8D85\u8FC7\u4E0A\u9762\u7684\u8BBE\u7F6E\u4E4B\u540E\uFF0C\u662F\u5426\u4E22\u5F03(\u6D88\u8D39\u8005listener\u629B\u51FA\u5F02\u5E38\uFF0C\u662F\u5426\u91CD\u56DE\u961F\u5217\uFF08\u9ED8\u8BA4true\uFF1A\u91CD\u56DE\u961F\u5217\uFF0Cfalse\uFF1A\u4E0D\u91CD\u56DE\u961F\u5217\uFF08\u53EF\u7ED3\u5408\u6B7B\u4FE1\u4EA4\u6362\u673A\uFF09\uFF09
78 78
 spring.rabbitmq.listener.simple.default-requeue-rejected=false
79 79
 
80
+#\u52A9\u901A\u79D1\u6280\u77ED\u4FE1\u914D\u7F6E
81
+zt.username=xinghuo666
82
+zt.password=jUTEBk6e
83
+zt.url=http://api.mix2.zthysms.com/
84
+signName=\u3010\u6CB3\u5357\u661F\u706B\u71CE\u539F\u3011
85
+
80 86
 #\u5B9A\u65F6\u4EFB\u52A1
81 87
 #\u9ED8\u8BA4\u4E3Afalse\uFF0C\u4E0D\u5F00\u542F\u5B9A\u65F6\u4EFB\u52A1
82 88
 enable.scheduled=false

+ 3
- 4
smarking/src/main/resources/mapper/exam/MsClassMapper.xml View File

@@ -32,8 +32,8 @@
32 32
     </select>
33 33
     <!--获取教师科目-->
34 34
     <select id="listSubjectByTeacherIds" resultType="com.xhkjedu.smarking.vo.exam.CTeacherVo">
35
-        select tp.teacherid,sb.subjectid
36
-        from t_teacher_powersb tp left join t_subject_book sb on tp.lsbid = sb.lsbid
35
+        select tp.teacherid,tp.subjectid
36
+        from t_teacher_powersb tp
37 37
         where tp.teacherid in(${teacherids})
38 38
         group by tp.teacherid
39 39
     </select>
@@ -56,8 +56,7 @@
56 56
         select ct.classid,ct.teacherid,u.username,u.loginname,u.usersex
57 57
         from t_class_teacher ct left join t_user u on ct.teacherid = u.userid
58 58
         left join t_teacher_powersb tp on tp.teacherid=ct.teacherid
59
-        left join t_subject_book sb on tp.lsbid = sb.lsbid
60
-        where ct.classid in(${classids}) and sb.subjectid=#{subjectid} and u.userstate=1
59
+        where ct.classid in(${classids}) and tp.subjectid=#{subjectid} and u.userstate=1
61 60
         group by ct.classid,ct.teacherid
62 61
     </select>
63 62
 </mapper>

+ 3
- 2
smarking/src/main/resources/mapper/exam/MsClassStudentMapper.xml View File

@@ -31,10 +31,11 @@
31 31
     <!--根据考号搜索参加考试学生-->
32 32
     <select id="listStudentByExamIdAnExamno" resultType="java.util.Map">
33 33
         select s.studentid,u.username studentname,u.examno,c.classid,c.classname,e.gradeid
34
-        from ms_class_student s left join ms_class c on s.examid=c.examid and c.subjectid=s.subjectid
34
+        from ms_class_student s left join ms_class c on s.examid=c.examid and c.subjectid=s.subjectid and s.classid=c.classid
35 35
         left join t_user u on s.studentid=u.userid
36 36
         left join ms_exam e on c.examid=e.examid
37
-        where s.examid=#{examid} and u.usertype=2 and u.examno like concat('%', #{examno}, '%')
37
+        where s.examid=#{examid} and s.subjectid=#{subjectid}
38
+        and u.usertype=2 and u.examno like concat('%', #{examno}, '%')
38 39
         group by s.studentid
39 40
     </select>
40 41
 

+ 1
- 1
smarking/src/main/resources/mapper/paper/MsPaperAnalyzeMapper.xml View File

@@ -8,7 +8,7 @@
8 8
     </delete>
9 9
 
10 10
     <!--根据试卷ID查询试卷分析-->
11
-    <select id="getObjByMpId" resultType="com.xhkjedu.smarking.entity.MsPaperAnalyze">
11
+    <select id="getObjByMpId" resultType="com.xhkjedu.smarking.model.paper.MsPaperAnalyze">
12 12
         SELECT * FROM ms_paper_analyze WHERE mpid = #{mpid}
13 13
     </select>
14 14
 

+ 1
- 1
smarking/src/main/resources/mapper/paper/MsPaperFileMapper.xml View File

@@ -13,7 +13,7 @@
13 13
     </delete>
14 14
 
15 15
     <!--试卷附件-->
16
-    <select id="listFilesbyMpid" resultType="com.xhkjedu.smarking.entity.MsPaperFile">
16
+    <select id="listFilesbyMpid" resultType="com.xhkjedu.smarking.model.paper.MsPaperFile">
17 17
         select * from ms_paper_file where mpid=#{mpid} order by fileorder
18 18
     </select>
19 19
 </mapper>

+ 1
- 1
smarking/src/main/resources/mapper/paper/MsPaperQtypeMapper.xml View File

@@ -91,7 +91,7 @@
91 91
         <result column="mptnum" property="mptnum"></result>
92 92
         <result column="mptorder" property="mptorder"></result>
93 93
         <result column="mptscore" property="mptscore"></result>
94
-        <collection property="questionfjs" ofType="com.xhkjedu.smarking.vo.paper.msPaperQtypeQuestion" javaType="java.util.List">
94
+        <collection property="questionfjs" ofType="com.xhkjedu.smarking.vo.paper.MsPaperQtypeQuestionVo" javaType="java.util.List">
95 95
             <result column="mptqid" property="mptqid"></result>
96 96
             <result column="mptid" property="mptid"></result>
97 97
             <result column="qscore" property="qscore"></result>

+ 1
- 2
smarking/src/main/resources/mapper/system/UserMapper.xml View File

@@ -24,9 +24,8 @@
24 24
     </select>
25 25
     <!--主监考人查找-->
26 26
     <select id="listMasterTeacher" resultType="java.util.Map">
27
-        select u.userid teacherid,u.username,u.loginname,u.usersex,sb.subjectid
27
+        select u.userid teacherid,u.username,u.loginname,u.usersex,tp.subjectid
28 28
         from t_user u left join t_teacher_powersb tp on tp.teacherid=u.userid
29
-        left join t_subject_book sb on tp.lsbid = sb.lsbid
30 29
         where u.schoolid=#{schoolid} and u.usertype=1 and u.userstate=1
31 30
         group by u.userid
32 31
     </select>

Loading…
Cancel
Save