Browse Source

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

ywx
王宁 1 month ago
parent
commit
13df492b2f

+ 58
- 1
smarking/src/main/java/com/xhkjedu/smarking/controller/exam/MsExamController.java View File

@@ -6,6 +6,7 @@ import com.xhkjedu.smarking.mapper.system.UserMapper;
6 6
 import com.xhkjedu.smarking.model.exam.MsExam;
7 7
 import com.xhkjedu.smarking.service.exam.MsExamService;
8 8
 import com.xhkjedu.smarking.service.notice.NoticeService;
9
+import com.xhkjedu.smarking.utils.MarkingUtil;
9 10
 import com.xhkjedu.smarking.vo.exam.EBaseVo;
10 11
 import com.xhkjedu.smarking.vo.exam.ExamVo;
11 12
 import com.xhkjedu.utils.N_Utils;
@@ -93,7 +94,12 @@ public class MsExamController {
93 94
         EBaseVo exam = msExamService.getExamStateById(examid);//根据考试id获取考试状态
94 95
         String examname = exam.getExamname();
95 96
         Integer schoolid = exam.getSchoolid();
96
-        if (exam.getExammode() == 3 && " :00".equals(exam.getStrtime())) return new ResultVo(1, "还有考试试卷未设置时间");
97
+        if (exam.getExammode() == 3) {
98
+            if (" :00".equals(exam.getStrtime())) return new ResultVo(1, "还有考试试卷未设置时间");
99
+            Long timestamp = Long.valueOf(N_Utils.getSecondTimestamp() + 30 * 60);
100
+            Long begintime = MarkingUtil.strToTimestamp(exam.getStrtime());
101
+            if (begintime.compareTo(timestamp) != 1) return new ResultVo(1, "发布时间必须早于最早科目开始考试之前30分钟");
102
+        }
97 103
         if (exam.getWwcnum() != 0) return new ResultVo(1, "还有考试试卷未设置完成");
98 104
         if (exam.getPbstate() != 2) return new ResultVo(1, "还有考试试卷题块未设置完成");
99 105
         if (exam.getExamstate() != 0) return new ResultVo(0, "发布成功");
@@ -125,4 +131,55 @@ public class MsExamController {
125 131
         N_Utils.validation(new Object[]{createid, "登录人id", 1});
126 132
         return new ResultVo(0, "查询成功", msExamService.listClass(createid));
127 133
     }
134
+
135
+    /**
136
+     * @Description 删除
137
+     * @Date 2024/11/25 16:46
138
+     * @Author YWX
139
+     * @Param [msExam]
140
+     * @Return com.xhkjedu.vo.ResultVo
141
+     **/
142
+    @PostMapping("/delete")
143
+    public ResultVo delete(@RequestBody MsExam msExam) {
144
+        Integer examid = msExam.getExamid();
145
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
146
+        msExamService.deleteById(examid);
147
+        return new ResultVo(0, "删除成功");
148
+    }
149
+
150
+    /**
151
+     * @Description 取消发布
152
+     * @Date 2024/11/25 16:58
153
+     * @Author YWX
154
+     * @Param [msExam]
155
+     * @Return com.xhkjedu.vo.ResultVo
156
+     **/
157
+    @PostMapping("/qx_fb")
158
+    public ResultVo qxFb(@RequestBody MsExam msExam) {
159
+        Integer examid = msExam.getExamid();
160
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
161
+        msExamService.qxFb(examid);
162
+        return new ResultVo(0, "取消发布成功");
163
+    }
164
+
165
+    /**
166
+     * @Description 修改
167
+     * @Date 2024/11/25 17:13
168
+     * @Author YWX
169
+     * @Param [msExam]
170
+     * @Return com.xhkjedu.vo.ResultVo
171
+     **/
172
+    @PostMapping("/update")
173
+    public ResultVo update(@RequestBody MsExam msExam) {
174
+        Integer examid = msExam.getExamid();
175
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
176
+        return msExamService.update(msExam);
177
+    }
178
+
179
+    @PostMapping("/detail")
180
+    public ResultVo detail(@RequestBody MsExam msExam) {
181
+        Integer examid = msExam.getExamid();
182
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
183
+        return new ResultVo(0, "查询成功", msExamService.findById(examid));
184
+    }
128 185
 }

+ 9
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/exam/MsExamMapper.java View File

@@ -27,4 +27,13 @@ public interface MsExamMapper extends TkMapper<MsExam> {
27 27
     Map findById(@Param("examid") Integer examid);
28 28
     //考试状态
29 29
     Integer getExamstate(@Param("examid") Integer examid);
30
+
31
+    //删除
32
+    void deleteById(@Param("examid") Integer examid);
33
+
34
+    //删除关联的班级
35
+    void deleteClassById(@Param("examid") Integer examid);
36
+
37
+    //更新考试状态
38
+    void updateExamState(@Param("examid") Integer examid,@Param("examstate") int examstate);
30 39
 }

+ 6
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/exam/MsSubjectMapper.java View File

@@ -57,4 +57,10 @@ public interface MsSubjectMapper extends TkMapper<MsSubject> {
57 57
     List<Integer> listMsidsForEndSubject(@Param("strtime") String strtime);
58 58
     //定时任务-科目结束考试
59 59
     int updateEndSubject(@Param("timestamp") Integer timestamp,@Param("msids")List<Integer> msids);
60
+
61
+    //获取考试科目ids
62
+    List<String> listSubjectIdsByExamId(@Param("examid") Integer examid);
63
+
64
+    //获取考试科目信息
65
+    List<Map<String,Object>> listByExamId(@Param("examid") Integer examid);
60 66
 }

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/stupaper/MsPaperStudentMapper.java View File

@@ -81,4 +81,6 @@ public interface MsPaperStudentMapper extends TkMapper<MsPaperStudent> {
81 81
     //补录成绩-清空学生补录分数
82 82
     int updateStuScoreForRestoreFillScore(@Param("examid") Integer examid,@Param("studentid") Integer studentid);
83 83
 
84
+    //删除考试学生信息
85
+    void deleteByExamId(@Param("examid") Integer examid);
84 86
 }

+ 106
- 35
smarking/src/main/java/com/xhkjedu/smarking/service/exam/MsExamService.java View File

@@ -10,8 +10,10 @@ import com.xhkjedu.smarking.model.exam.*;
10 10
 import com.xhkjedu.smarking.model.paper.MsPaper;
11 11
 import com.xhkjedu.smarking.model.paper.MsPaperQtypeQuestion;
12 12
 import com.xhkjedu.smarking.model.stupaper.*;
13
+import com.xhkjedu.smarking.utils.MarkingUtil;
13 14
 import com.xhkjedu.smarking.vo.exam.EBaseVo;
14 15
 import com.xhkjedu.utils.N_Utils;
16
+import com.xhkjedu.vo.ResultVo;
15 17
 import com.xhkjedu.vo.system.UserVo;
16 18
 import lombok.extern.slf4j.Slf4j;
17 19
 import org.springframework.stereotype.Service;
@@ -76,8 +78,46 @@ public class MsExamService {
76 78
 
77 79
     //保存考试基本信息
78 80
     private void saveExam(MsExam model, Integer examid) {
79
-        List<Integer> classids = model.getClassids();
80 81
         List<MsSubject> subjects = model.getSubjects();
82
+        List<String> subjectids = subjects.stream().map(MsSubject::getSubjectid).collect(Collectors.toList());
83
+        saveClassAndStudent(model, examid, subjectids);//保存考试班级和学生
84
+
85
+        //考试科目
86
+        Integer schoolid = model.getSchoolid();
87
+        List<MsPaper> papers = new ArrayList<>();//考试试卷
88
+        for (MsSubject s : subjects) {
89
+            s.setSchoolid(schoolid);
90
+            s.setExamid(examid);
91
+            s.setMsstate(0);
92
+
93
+            MsPaper p = new MsPaper();
94
+            p.setExamid(examid);
95
+            p.setSubjectid(s.getSubjectid());
96
+            p.setPtype(0);
97
+            p.setPnum(0);
98
+            p.setMergepnum(0);
99
+            p.setPscore(0.0);
100
+            p.setAnswered(0);
101
+            p.setHasfile(0);
102
+            p.setHearnum(0);
103
+            papers.add(p);
104
+        }
105
+        msSubjectMapper.insertList(subjects);//考试科目
106
+
107
+        Integer createid = model.getCreateid();
108
+        Integer createtime = model.getCreatetime();
109
+        for (int i = 0; i < papers.size(); i++) {
110
+            MsPaper ePaper = papers.get(i);
111
+            ePaper.setMsid(subjects.get(i).getId());
112
+            ePaper.setCreateid(createid);
113
+            ePaper.setCreatetime(createtime);
114
+        }
115
+        msPaperMapper.insertList(papers);//考试试卷
116
+    }
117
+
118
+    //保存考试班级和学生
119
+    private void saveClassAndStudent(MsExam model, Integer examid, List<String> subjectids) {
120
+        List<Integer> classids = model.getClassids();
81 121
         if (N_Utils.isListNotEmpty(classids)) {
82 122
             if (!model.getExammode().equals(3)) {//线下考试必须有考号
83 123
                 Integer num = msClassStudentMapper.getNoExamNoNumByClassIds(classids);//根据班级ids获取没有考号学生数量
@@ -94,10 +134,7 @@ public class MsExamService {
94 134
             List<MsClassStudent> studentList = msClassStudentMapper.listByClassIds(classids);
95 135
             List<MsClass> classes = new ArrayList<>();
96 136
             List<MsClassStudent> students = new ArrayList<>();
97
-            Integer schoolid = model.getSchoolid();
98
-            for (MsSubject s : subjects) {
99
-                s.setSchoolid(schoolid);
100
-                String subjectid = s.getSubjectid();
137
+            for (String subjectid : subjectids) {
101 138
                 for (MsClass c : classList) {
102 139
                     MsClass c1 = new MsClass();
103 140
                     c1.setExamid(examid);
@@ -122,36 +159,6 @@ public class MsExamService {
122 159
             //考试学生
123 160
             if (N_Utils.isListNotEmpty(students)) msClassStudentMapper.insertList(students);
124 161
         }
125
-
126
-        //考试科目
127
-        List<MsPaper> papers = new ArrayList<>();//考试试卷
128
-        for (MsSubject s : subjects) {
129
-            s.setExamid(examid);
130
-            s.setMsstate(0);
131
-
132
-            MsPaper p = new MsPaper();
133
-            p.setExamid(examid);
134
-            p.setSubjectid(s.getSubjectid());
135
-            p.setPtype(0);
136
-            p.setPnum(0);
137
-            p.setMergepnum(0);
138
-            p.setPscore(0.0);
139
-            p.setAnswered(0);
140
-            p.setHasfile(0);
141
-            p.setHearnum(0);
142
-            papers.add(p);
143
-        }
144
-        msSubjectMapper.insertList(subjects);//考试科目
145
-
146
-        Integer createid = model.getCreateid();
147
-        Integer createtime = model.getCreatetime();
148
-        for (int i = 0; i < papers.size(); i++) {
149
-            MsPaper ePaper = papers.get(i);
150
-            ePaper.setMsid(subjects.get(i).getId());
151
-            ePaper.setCreateid(createid);
152
-            ePaper.setCreatetime(createtime);
153
-        }
154
-        msPaperMapper.insertList(papers);//考试试卷
155 162
     }
156 163
 
157 164
     /**
@@ -302,4 +309,68 @@ public class MsExamService {
302 309
         }
303 310
         return msClassMapper.listSchoolClass(schoolid, year, teacherid);
304 311
     }
312
+
313
+    /**
314
+     * @Description 删除
315
+     * @Date 2024/11/25 16:46
316
+     * @Author YWX
317
+     * @Param [examid]
318
+     * @Return void
319
+     **/
320
+    public void deleteById(Integer examid) {
321
+        msExamMapper.deleteById(examid);
322
+    }
323
+
324
+    /**
325
+     * @Description 取消发布
326
+     * @Date 2024/11/25 17:33
327
+     * @Author YWX
328
+     * @Param [examid]
329
+     * @Return void
330
+     **/
331
+    @Transactional(rollbackFor = Exception.class)
332
+    public void qxFb(Integer examid) {
333
+        EBaseVo exam = msExamMapper.getExamStateById(examid);
334
+        Long timestamp = Long.valueOf(N_Utils.getSecondTimestamp() + 30 * 60);
335
+        Long begintime = MarkingUtil.strToTimestamp(exam.getStrtime());
336
+        if (begintime != 0 && begintime.compareTo(timestamp) != 1) throw new ServiceException("开考前30分钟禁止取消发布");
337
+        msPaperStudentMapper.deleteByExamId(examid);//删除考试学生信息
338
+        msExamMapper.updateExamState(examid, 0);//更新考试状态
339
+    }
340
+
341
+    /**
342
+     * @Description 修改
343
+     * @Date 2024/11/25 17:13
344
+     * @Author YWX
345
+     * @Param [model]
346
+     * @Return com.xhkjedu.vo.ResultVo
347
+     **/
348
+    @Transactional(rollbackFor = Exception.class)
349
+    public ResultVo update(MsExam model) {
350
+        EBaseVo exam = msExamMapper.getExamStateById(model.getExamid());
351
+        if (0 != exam.getExamstate()) return new ResultVo(1, "考试已发布禁止操作");
352
+        Long timestamp = Long.valueOf(N_Utils.getSecondTimestamp() + 30 * 60);
353
+        Long begintime = MarkingUtil.strToTimestamp(exam.getStrtime());
354
+        if (begintime != 0 && begintime.compareTo(timestamp) != 1) return new ResultVo(1, "开考前30分钟禁止编辑");
355
+        //禁止修改年级、科目、考试模式
356
+        model.setGradeid(null);
357
+        model.setExammode(null);
358
+        msExamMapper.updateByPrimaryKeySelective(model);
359
+        Integer examid = model.getExamid();
360
+        List<Integer> classids = model.getClassids();
361
+        //班级集合为空不处理班级
362
+        if (N_Utils.isListEmpty(classids)) return new ResultVo(0, "修改成功");
363
+        msExamMapper.deleteClassById(examid);//删除关联的班级
364
+        List<String> subjectids = msSubjectMapper.listSubjectIdsByExamId(examid);
365
+        saveClassAndStudent(model, examid, subjectids);//保存考试班级和学生
366
+
367
+        return new ResultVo(0, "修改成功");
368
+    }
369
+
370
+    public Map findById(Integer examid) {
371
+        Map map = msExamMapper.findById(examid);
372
+        map.put("subjects", msSubjectMapper.listByExamId(examid));
373
+        map.put("classes",  msClassMapper.listByExamId(examid,null));
374
+        return map;
375
+    }
305 376
 }

+ 13
- 0
smarking/src/main/resources/mapper/exam/MsExamMapper.xml View File

@@ -9,6 +9,19 @@
9 9
     <update id="postExam">
10 10
         update ms_exam set examcomm=#{examcomm},examstate=1 where examid=#{examid}
11 11
     </update>
12
+    <!--删除-->
13
+    <update id="deleteById">
14
+        update ms_exam set deleted=10 where examid=#{examid}
15
+    </update>
16
+    <!--更新考试状态-->
17
+    <update id="updateExamState">
18
+        update ms_exam set examstate=#{examstate} where examid=#{examid}
19
+    </update>
20
+    <!--删除关联的班级-->
21
+    <delete id="deleteClassById">
22
+        delete c.*,cs.* from ms_class c inner join ms_class_student cs on cs.examid=c.examid and cs.classid=c.classid
23
+        where c.examid=#{examid} and c.subjectid=cs.subjectid
24
+    </delete>
12 25
     <!--考试科目列表-->
13 26
     <select id="listSubject" resultType="java.util.Map">
14 27
         select subjectname,if(pstate=1 and ptstate=2 and pbstate=2 and checkstate!=0 and checkset=1

+ 8
- 0
smarking/src/main/resources/mapper/exam/MsSubjectMapper.xml View File

@@ -116,6 +116,14 @@
116 116
         where e.examstate>=1 and e.deleted=1 and e.exammode=3 and ms.msstate=1
117 117
         and adddate(concat(ms.sdate,' ',ms.endtime),interval 5 minute) &lt;#{strtime}
118 118
     </select>
119
+    <!--获取考试科目ids-->
120
+    <select id="listSubjectIdsByExamId" resultType="java.lang.String">
121
+        select subjectid from ms_subject where examid=#{examid}
122
+    </select>
123
+    <!--获取考试科目信息-->
124
+    <select id="listByExamId" resultType="java.util.Map">
125
+        select * from ms_subject where examid=#{examid}
126
+    </select>
119 127
     <!--定时任务-科目结束考试-->
120 128
     <update id="updateEndSubject">
121 129
         update ms_subject ms

+ 10
- 10
smarking/src/main/resources/mapper/papercheck/MsPaperCheckTeacherTaskMapper.xml View File

@@ -265,7 +265,7 @@
265 265
             ,psb.mpsbid,null)) as myUncheckedNum
266 266
             ,(select group_concat(pbbq.bqn separator '、') from ms_paper_block_question pbbq where pbbq.mblockid = pb.mblockid) as bqn
267 267
             from ms_paper_check pc left join ms_paper_student_block psb on psb.mblockid = pc.mblockid and psb.mpid = pc.mpid
268
-            and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or pc.dispenseway=2)
268
+            and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or psb.checked=1) and psb.checked!=0
269 269
             inner join ms_paper_block pb on pc.mblockid = pb.mblockid and pb.mpid = pc.mpid
270 270
             inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid=pc.mpid and pct.teacherid = #{param.handleid}
271 271
             where pc.mpid=#{param.mpid}
@@ -283,7 +283,7 @@
283 283
             or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or psb.checked=1)
284 284
             ,psb.mpsqid,null)) as myUncheckedNum
285 285
             from ms_paper_check pc left join ms_paper_student_question psb on psb.mptqid = pc.mblockid and psb.mpid = pc.mpid
286
-            and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or pc.dispenseway=2) and psb.answered=1
286
+            and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or psb.checked=1) and psb.checked!=0
287 287
             inner join ms_paper_qtype_question pb on pc.mblockid = pb.mptqid and pb.mpid = pc.mpid
288 288
             inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid=pc.mpid and pct.teacherid = #{param.handleid}
289 289
             where pc.mpid=#{param.mpid}
@@ -303,8 +303,8 @@
303 303
             from ms_paper_check pc inner join ms_class c on pc.mblockid = c.classid
304 304
             inner join ms_class_student cs on c.examid=cs.examid and c.subjectid=cs.subjectid and pc.mblockid=cs.classid
305 305
             inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid=pc.mpid and pct.teacherid = #{param.handleid}
306
-            left join ms_paper_student_question psb on psb.mpid = pc.mpid and psb.studentid=cs.studentid and psb.answered=1 and psb.ctype in(3,13,14,15)
307
-            and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or psb.checked=1)
306
+            left join ms_paper_student_question psb on psb.mpid = pc.mpid and psb.studentid=cs.studentid
307
+            and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or psb.checked=1) and psb.checked!=0
308 308
             where pc.mpid=#{param.mpid} and c.subjectid=#{param.subjectid}
309 309
             group by c.classid
310 310
             order by c.mcid
@@ -373,7 +373,7 @@
373 373
         <if test="param.dispenseway!=null and param.dispenseway!=2">
374 374
             select psq.stuanswer,psq.hasgood,psq.hasbad,psq.hasproblem,psq.problemtype,psq.problemcomm
375 375
             ,2 as answertype
376
-            ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid
376
+            ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid,pctt.checktype
377 377
             from ms_paper_student_block psq inner join ms_paper_check_teacher_task pctt on psq.mpsbid = pctt.mpsbid and psq.mpid=pctt.mpid
378 378
             where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.teacherid}
379 379
             and pctt.checkstate!=3 and psq.hasproblem=0
@@ -383,7 +383,7 @@
383 383
         <if test="param.dispenseway!=null and param.dispenseway==2">
384 384
             select psq.stuanswer,psq.hasgood,psq.hasbad,psq.hasproblem,psq.problemtype,psq.problemcomm
385 385
             ,2 as answertype
386
-            ,psq.mblockid,psq.mpsbid
386
+            ,psq.mblockid,psq.mpsbid,psq.firstcid
387 387
             from ms_paper_student_block psq
388 388
             where psq.mpid=#{param.mpid} and psq.mblockid = #{param.mblockid}
389 389
             and (psq.checked=1 or (psq.checked=2 and ((psq.firstcid=#{param.teacherid} and psq.firstcime is null)
@@ -504,7 +504,7 @@
504 504
         <if test="param.dispenseway!=null and param.dispenseway!=2">
505 505
             select psq.stuanswer,psq.hasgood,psq.hasbad,psq.hasproblem,psq.problemtype,psq.problemcomm
506 506
             ,psq.answertype
507
-            ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid
507
+            ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid,pctt.checktype
508 508
             from ms_paper_student_question psq inner join ms_paper_check_teacher_task pctt on psq.mpsqid = pctt.mpsbid and psq.mpid=pctt.mpid
509 509
             where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.teacherid}
510 510
             and pctt.checkstate!=3 and psq.hasproblem=0
@@ -514,7 +514,7 @@
514 514
         <if test="param.dispenseway!=null and param.dispenseway==2">
515 515
             select psq.stuanswer,psq.hasgood,psq.hasbad,psq.hasproblem,psq.problemtype,psq.problemcomm
516 516
             ,psq.answertype
517
-            ,psq.mptqid as mblockid,psq.mpsqid as mpsbid,psq.mptqid
517
+            ,psq.mptqid as mblockid,psq.mpsqid as mpsbid,psq.mptqid,psq.firstcid
518 518
             from ms_paper_student_question psq
519 519
             where psq.mpid=#{param.mpid} and psq.mptqid = #{param.mblockid}
520 520
             and (psq.checked=1 or (psq.checked=2 and ((psq.firstcid=#{param.teacherid} and psq.firstcime is null)
@@ -544,7 +544,7 @@
544 544
         <if test="param.dispenseway!=null and param.dispenseway!=2">
545 545
             select psq.stuanswer,psq.hasgood,psq.hasbad,psq.hasproblem,psq.problemtype,psq.problemcomm
546 546
             ,psq.answertype
547
-            ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid
547
+            ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid,pctt.checktype
548 548
             from ms_paper_student_question psq inner join ms_paper_check_teacher_task pctt on psq.mpsqid = pctt.mpsbid and psq.mpid=pctt.mpid
549 549
             where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.teacherid}
550 550
             and pctt.checkstate!=3 and psq.hasproblem=0
@@ -554,7 +554,7 @@
554 554
         <if test="param.dispenseway!=null and param.dispenseway==2">
555 555
             select psq.stuanswer,psq.hasgood,psq.hasbad,psq.hasproblem,psq.problemtype,psq.problemcomm
556 556
             ,psq.answertype
557
-            ,c.classid as mblockid,psq.mpsqid as mpsbid,psq.mptqid
557
+            ,c.classid as mblockid,psq.mpsqid as mpsbid,psq.mptqid,psq.firstcid
558 558
             from ms_paper_student_question psq inner join ms_class c on c.examid=psq.examid and c.subjectid=psq.subjectid
559 559
             inner join ms_class_student cs on cs.examid=psq.examid and cs.subjectid=psq.subjectid and cs.studentid=psq.studentid
560 560
             where psq.mpid=#{param.mpid} and c.classid = #{param.mblockid}

+ 4
- 0
smarking/src/main/resources/mapper/stupaper/MsPaperStudentMapper.xml View File

@@ -233,6 +233,10 @@
233 233
     <delete id="deletePaperStuByMpid">
234 234
         delete from ms_paper_student where mpid=#{mpid};
235 235
     </delete>
236
+    <!--删除考试学生信息-->
237
+    <delete id="deleteByExamId">
238
+        delete from ms_paper_student where examid=#{examid}
239
+    </delete>
236 240
 
237 241
     <!--扫描异常-清空学生扫描试卷信息-->
238 242
     <update id="updateStuPaperForScanErrorClear">

Loading…
Cancel
Save