Browse Source

批阅

ywx
雍文秀 1 month ago
parent
commit
658b4d7a51

+ 6
- 0
scommons/src/main/java/com/xhkjedu/exception/ErrorAdivceController.java View File

@@ -64,5 +64,11 @@ public class ErrorAdivceController {
64 64
         return new ResultVo(1, "请求参数错误");
65 65
     }
66 66
 
67
+    @ExceptionHandler(ServiceException.class)
68
+    public ResultVo missingParametersException(ServiceException ex) {
69
+        log.error("提示信息:   -------> {}", ex.getMessage());
70
+        return new ResultVo(1, ex.getMessage());
71
+    }
72
+
67 73
 
68 74
 }

+ 87
- 0
smarking/src/main/java/com/xhkjedu/smarking/controller/papercheck/MsPaperCheckTeacherTaskController.java View File

@@ -120,6 +120,34 @@ public class MsPaperCheckTeacherTaskController {
120 120
         return new ResultVo(0, "查询成功", list);
121 121
     }
122 122
 
123
+    /**
124
+     * @Description 教师阅卷-试题列表
125
+     * @Date 2024/11/13 17:59
126
+     * @Author YWX
127
+     * @Param [param]
128
+     * @Return com.xhkjedu.vo.ResultVo
129
+     **/
130
+    @PostMapping("/list_teacher_question")
131
+    public ResultVo listTeacherQuestion(@RequestBody MsCheckParam param) {
132
+        N_Utils.validation(new Object[]{param.getHandleid(), "操作人ID", 1, param.getMpid(), "试卷ID", 1});
133
+        List<Map> list = msPaperCheckTeacherTaskService.listTeacherQuestion(param);
134
+        return new ResultVo(0, "查询成功", list);
135
+    }
136
+
137
+    /**
138
+     * @Description 教师阅卷-班级列表
139
+     * @Date 2024/11/14 9:41
140
+     * @Author YWX
141
+     * @Param [param]
142
+     * @Return com.xhkjedu.vo.ResultVo
143
+     **/
144
+    @PostMapping("/list_teacher_class")
145
+    public ResultVo listTeacherClass(@RequestBody MsCheckParam param) {
146
+        N_Utils.validation(new Object[]{param.getHandleid(), "操作人ID", 1, param.getMpid(), "试卷ID", 1});
147
+        List<Map> list = msPaperCheckTeacherTaskService.listTeacherClass(param);
148
+        return new ResultVo(0, "查询成功", list);
149
+    }
150
+
123 151
     /**
124 152
      * @Description 获取待批题块
125 153
      * @Date 2024/10/31 11:02
@@ -148,6 +176,7 @@ public class MsPaperCheckTeacherTaskController {
148 176
                 , param.getMblockid(), "题块ID", 1
149 177
                 , param.getChecktype(), "批阅情况", 1
150 178
                 , param.getMpsbid(), "学生试题ID", 1
179
+                , param.getQscore(), "试题分值", 2
151 180
         });
152 181
         msPaperCheckTeacherTaskService.correct(param);
153 182
         return new ResultVo(0, "保存成功");
@@ -183,4 +212,62 @@ public class MsPaperCheckTeacherTaskController {
183 212
         List<Map> list = msPaperCheckTeacherTaskService.detailByQuestion(mpid, mblockid);
184 213
         return new ResultVo(0, "查询成功", list);
185 214
     }
215
+
216
+    /**
217
+     * @Description 教师阅卷-上一份
218
+     * @Date 2024/11/14 10:27
219
+     * @Author YWX
220
+     * @Param [param]
221
+     * @Return com.xhkjedu.vo.ResultVo
222
+     **/
223
+    @PostMapping("/get_pre_correct")
224
+    public ResultVo getPreCorrect(@RequestBody MsCheckParam param) {
225
+        N_Utils.validation(new Object[]{
226
+                param.getHandleid(), "操作人ID", 1
227
+                , param.getMpid(), "试卷ID", 1
228
+                , param.getMblockid(), "题块ID", 1
229
+                , param.getTaskorder(), "序号", 1
230
+        });
231
+        return new ResultVo(0, "查询成功", msPaperCheckTeacherTaskService.getPreCorrect(param));
232
+    }
233
+
234
+    /**
235
+     * @Description 教师阅卷-阅卷历史
236
+     * @Date 2024/11/14 14:12
237
+     * @Author YWX
238
+     * @Param [param]
239
+     * @Return com.xhkjedu.vo.ResultVo
240
+     **/
241
+    @PostMapping("/list_correct")
242
+    public ResultVo listCorrect(@RequestBody MsCheckParam param) {
243
+        Integer page = param.getPage();
244
+        Integer size = param.getPageSize();
245
+        N_Utils.validation(new Object[]{
246
+                param.getHandleid(), "操作人ID", 1
247
+                , param.getMpid(), "试卷ID", 1
248
+                , param.getMblockid(), "题块ID", 1
249
+                , page, "显示页码", 1
250
+                , size, "显示条数", 1
251
+        });
252
+        PageHelper.startPage(page, size);
253
+        List<Map> list = msPaperCheckTeacherTaskService.listCorrect(param);
254
+        PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
255
+        return new ResultVo(0, "查询成功", pageResult);
256
+    }
257
+
258
+    /**
259
+     * @Description 教师阅卷-历史详情
260
+     * @Date 2024/11/14 17:32
261
+     * @Author YWX
262
+     * @Param [param]
263
+     * @Return com.xhkjedu.vo.ResultVo
264
+     **/
265
+    @PostMapping("/detail_correct")
266
+    public ResultVo detailCorrect(@RequestBody MsCheckParam param) {
267
+        N_Utils.validation(new Object[]{
268
+                param.getMpcttid(), "任务ID", 1
269
+                , param.getMpid(), "试卷ID", 1
270
+        });
271
+        return new ResultVo(0, "查询成功", msPaperCheckTeacherTaskService.detailCorrect(param));
272
+    }
186 273
 }

+ 15
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/papercheck/MsPaperCheckTeacherTaskMapper.java View File

@@ -44,6 +44,12 @@ public interface MsPaperCheckTeacherTaskMapper extends TkMapper<MsPaperCheckTeac
44 44
     //教师阅卷-题块列表
45 45
     List<Map> listTeacherBlock(@Param("param") MsCheckParam param);
46 46
 
47
+    //教师阅卷-试题列表
48
+    List<Map> listTeacherQuestion(@Param("param") MsCheckParam param);
49
+
50
+    //教师阅卷-班级列表
51
+    List<Map> listTeacherClass(@Param("param") MsCheckParam param);
52
+
47 53
     //教师阅卷-待批题块列表
48 54
     List<MsPaperCheck> listBlockCheck(@Param("param") MsCheckParam param);
49 55
 
@@ -81,4 +87,13 @@ public interface MsPaperCheckTeacherTaskMapper extends TkMapper<MsPaperCheckTeac
81 87
 
82 88
     //教师批阅-批阅试题
83 89
     void correct(@Param("param") MsPaperCheckVo param);
90
+
91
+    //教师阅卷-上一份
92
+    Map getPreCorrect(@Param("param") MsCheckParam param);
93
+
94
+    //教师阅卷-阅卷历史
95
+    List<Map> listCorrect(@Param("param") MsCheckParam param);
96
+
97
+    //教师阅卷-历史详情
98
+    Map detailCorrect(@Param("param") MsCheckParam param);
84 99
 }

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/model/paper/MsPaperBlockQuestion.java View File

@@ -39,6 +39,8 @@ public class MsPaperBlockQuestion extends BaseBean {
39 39
     private String mergeqn;
40 40
     //合并给分点试卷试题分值集合
41 41
     private String mergescore;
42
+    @Transient
43
+    private String mergestuscore;
42 44
     //给分步长方式1等间隔2特定分数
43 45
     private Integer scorestepway;
44 46
     //给分步长内容

+ 12
- 0
smarking/src/main/java/com/xhkjedu/smarking/model/papercheck/MsPaperCheckTeacherTask.java View File

@@ -21,6 +21,8 @@ public class MsPaperCheckTeacherTask extends BaseBean {
21 21
     private Integer mpid;
22 22
     //题块/试题/班级ID
23 23
     private Integer mblockid;
24
+    //考试试题表id
25
+    private Integer mptqid;
24 26
     //教师ID
25 27
     private Integer teacherid;
26 28
     //序号
@@ -35,4 +37,14 @@ public class MsPaperCheckTeacherTask extends BaseBean {
35 37
     private Integer checktype;
36 38
     //创建时间
37 39
     private Integer createtime;
40
+    //优秀试卷0默认1优秀
41
+    private Integer hasgood;
42
+    //违纪试卷0默认1违纪
43
+    private Integer hasbad;
44
+    //疑难0默认1疑难
45
+    private Integer hasproblem;
46
+    //疑难类型1图形模糊2答题错位3没有图像4图像颠倒5其他问题
47
+    private Integer problemtype;
48
+    //疑难备注
49
+    private String problemcomm;
38 50
 }

+ 115
- 16
smarking/src/main/java/com/xhkjedu/smarking/service/papercheck/MsPaperCheckTeacherTaskService.java View File

@@ -8,8 +8,7 @@ import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentBlockMapper;
8 8
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentQuestionMapper;
9 9
 import com.xhkjedu.smarking.mapper.system.UserMapper;
10 10
 import com.xhkjedu.smarking.model.paper.MsPaperBlockQuestion;
11
-import com.xhkjedu.smarking.model.papercheck.MsPaperCheck;
12
-import com.xhkjedu.smarking.model.papercheck.MsPaperCheckTeacher;
11
+import com.xhkjedu.smarking.model.papercheck.*;
13 12
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentBlock;
14 13
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
15 14
 import com.xhkjedu.smarking.utils.MarkingUtil;
@@ -140,10 +139,33 @@ public class MsPaperCheckTeacherTaskService {
140 139
      * @Return java.util.List<java.util.Map>
141 140
      **/
142 141
     public List<Map> listTeacherBlock(MsCheckParam param) {
143
-        setParam(param);
144 142
         return msPaperCheckTeacherTaskMapper.listTeacherBlock(param);
145 143
     }
146 144
 
145
+    /**
146
+     * @Description 教师阅卷-试题列表
147
+     * @Date 2024/11/13 17:59
148
+     * @Author YWX
149
+     * @Param [param]
150
+     * @Return java.util.List<java.util.Map>
151
+     **/
152
+    public List<Map> listTeacherQuestion(MsCheckParam param) {
153
+        Integer correcttype = msPaperMapper.getCorrectTypeByMpId(param.getMpid());
154
+        param.setCorrecttype(correcttype);
155
+        return msPaperCheckTeacherTaskMapper.listTeacherQuestion(param);
156
+    }
157
+
158
+    /**
159
+     * @Description 教师阅卷-班级列表
160
+     * @Date 2024/11/14 9:41
161
+     * @Author YWX
162
+     * @Param [param]
163
+     * @Return java.util.List<java.util.Map>
164
+     **/
165
+    public List<Map> listTeacherClass(MsCheckParam param) {
166
+        return msPaperCheckTeacherTaskMapper.listTeacherClass(param);
167
+    }
168
+
147 169
     /**
148 170
      * @Description 获取待批题块
149 171
      * @Date 2024/10/31 11:01
@@ -206,10 +228,6 @@ public class MsPaperCheckTeacherTaskService {
206 228
             MsPaperCheckTeacher teacher = msPaperCheckTeacherTaskMapper.getCheckNum(paperCheck);
207 229
             totalNum = teacher.getTasknum();
208 230
             checkedNum = teacher.getCheckednum();
209
-            if (!dispenseway.equals(2)) {
210
-                //更新教师阅卷任务状态
211
-                msPaperCheckTeacherTaskMapper.updateCheckStatus(sq.getMpid(), sq.getMpsbid(), handleid, 2);
212
-            }
213 231
             Integer checktype = sq.getChecktype();
214 232
             Integer firstcid = sq.getFirstcid();
215 233
             if (!N_Utils.isTrueInteger(checktype)) {
@@ -221,6 +239,25 @@ public class MsPaperCheckTeacherTaskService {
221 239
                     checktype = 1;
222 240
                 }
223 241
             }
242
+            if (!dispenseway.equals(2)) {
243
+                //更新教师阅卷任务状态
244
+                msPaperCheckTeacherTaskMapper.updateCheckStatus(sq.getMpid(), sq.getMpsbid(), handleid, 2);
245
+            } else {
246
+                //序号
247
+                Integer taskorder = checkedNum + 1;
248
+                sq.setTaskorder(taskorder);
249
+                MsPaperCheckTeacherTask task = new MsPaperCheckTeacherTask();
250
+                task.setMpid(sq.getMpid());
251
+                task.setMblockid(sq.getMblockid());
252
+                task.setMptqid(sq.getMptqid());
253
+                task.setTeacherid(handleid);
254
+                task.setTaskorder(taskorder);
255
+                task.setMpsbid(sq.getMpsbid());
256
+                task.setCheckstate(2);
257
+                task.setChecktype(checktype);
258
+                task.setCreatetime(N_Utils.getSecondTimestamp());
259
+                msPaperCheckTeacherTaskMapper.insertSelective(task);
260
+            }
224 261
             if (correcttype.equals(3)) {//按题块批阅
225 262
                 MsPaperStudentBlock block = new MsPaperStudentBlock();
226 263
                 block.setMpsbid(sq.getMpsbid());
@@ -313,11 +350,13 @@ public class MsPaperCheckTeacherTaskService {
313 350
         List<MsPaperBlockQuestion> questions = param.getQuestions();
314 351
         int checked = 1;
315 352
         Double firstccore = param.getFirstccore();
353
+        String checkscore;
316 354
         if (checktype.equals(1)) {//单评
317 355
             if (hasproblem.equals(0)) {
318 356
                 checked = 2;
319 357
             }
320 358
             if (correcttype.equals(3)) {//按题块批阅
359
+                checkscore = questions.stream().map(MsPaperBlockQuestion::getMergescore).collect(Collectors.joining(";"));
321 360
                 //题块批阅信息
322 361
                 MsPaperStudentBlock block = new MsPaperStudentBlock();
323 362
                 block.setMpsbid(mpsbid);
@@ -344,12 +383,12 @@ public class MsPaperCheckTeacherTaskService {
344 383
                         studentQuestions.add(studentQuestion);
345 384
                     } else {
346 385
                         String[] mptqids = question.getMergeqid().split(",");
347
-                        String[] mergescores = question.getMergescore().split(",");
348
-                        double[] scores = new double[mergescores.length];
349
-                        int last = mergescores.length - 1;
386
+                        String[] mergestuscore = question.getMergestuscore().split(",");
387
+                        double[] scores = new double[mergestuscore.length];
388
+                        int last = mergestuscore.length - 1;
350 389
                         double score = 0;
351
-                        for (int i = 0; i < mergescores.length; i++) {
352
-                            scores[i] = MarkingUtil.mul(MarkingUtil.div(mergescores[i], qscore), stuscore);
390
+                        for (int i = 0; i < mergestuscore.length; i++) {
391
+                            scores[i] = MarkingUtil.mul(MarkingUtil.div(mergestuscore[i], qscore), stuscore);
353 392
                             score = MarkingUtil.add(score, scores[i]);
354 393
                             if (i == last) {
355 394
                                 scores[i] = MarkingUtil.sub(stuscore, score);
@@ -366,6 +405,7 @@ public class MsPaperCheckTeacherTaskService {
366 405
                 }
367 406
                 msPaperStudentQuestionMapper.checkByMptqidAndStudentId(studentQuestions, block);//更新学生单题批阅信息
368 407
             } else {//按试题批阅
408
+                checkscore = firstccore.toString();
369 409
                 MsPaperStudentQuestion question = new MsPaperStudentQuestion();
370 410
                 question.setMpsqid(mpsbid);
371 411
                 question.setChecked(checked);
@@ -408,6 +448,9 @@ public class MsPaperCheckTeacherTaskService {
408 448
                 } else if (scoreway.equals(1)) {
409 449
                     double addScore = MarkingUtil.add(firstccore, secondcscore);
410 450
                     endscore = getUserScore(finalscore, addScore, roundvalue);
451
+                    if (endscore.compareTo(qscore) > 0) {
452
+                        endscore = qscore;
453
+                    }
411 454
                 }
412 455
             }
413 456
             if (correcttype.equals(3)) {//按题块批阅
@@ -435,6 +478,7 @@ public class MsPaperCheckTeacherTaskService {
435 478
                 for (int j = 0; j < questions.size(); j++) {
436 479
                     MsPaperBlockQuestion question = questions.get(j);
437 480
                     Double stuscore = question.getStuscore();
481
+                    Double bqscore = question.getBqscore();
438 482
                     if (N_Utils.isTrueInteger(question.getMptqid())) {
439 483
                         MsPaperStudentQuestion studentQuestion = new MsPaperStudentQuestion();
440 484
                         studentQuestion.setMptqid(question.getMptqid());
@@ -454,6 +498,9 @@ public class MsPaperCheckTeacherTaskService {
454 498
                             } else if (scoreway.equals(2)) {
455 499
                                 double addScore = MarkingUtil.add(stuscore, cores[j]);
456 500
                                 endscore = getUserScore(finalscore, addScore, roundvalue);
501
+                                if (endscore.compareTo(bqscore) > 0) {
502
+                                    endscore = bqscore;
503
+                                }
457 504
                                 studentQuestion.setStuscore(endscore);
458 505
                             }
459 506
                         }
@@ -461,11 +508,12 @@ public class MsPaperCheckTeacherTaskService {
461 508
                     } else {
462 509
                         String[] mptqids = question.getMergeqid().split(",");
463 510
                         String[] mergescores = question.getMergescore().split(",");
464
-                        double[] scores = new double[mergescores.length];
465
-                        int last = mergescores.length - 1;
511
+                        String[] mergestuscore = question.getMergestuscore().split(",");
512
+                        double[] scores = new double[mergestuscore.length];
513
+                        int last = mergestuscore.length - 1;
466 514
                         double score = 0;
467
-                        for (int i = 0; i < mergescores.length; i++) {
468
-                            scores[i] = MarkingUtil.mul(MarkingUtil.div(mergescores[i], qscore), stuscore);
515
+                        for (int i = 0; i < mergestuscore.length; i++) {
516
+                            scores[i] = MarkingUtil.mul(MarkingUtil.div(mergestuscore[i], qscore), stuscore);
469 517
                             score = MarkingUtil.add(score, scores[i]);
470 518
                             if (i == last) {
471 519
                                 scores[i] = MarkingUtil.sub(stuscore, score);
@@ -491,6 +539,10 @@ public class MsPaperCheckTeacherTaskService {
491 539
                                 } else if (scoreway.equals(2)) {
492 540
                                     double addScore = MarkingUtil.add(scores[i], cores2[i]);
493 541
                                     endscore = getUserScore(finalscore, addScore, roundvalue);
542
+                                    double mqscore = Double.parseDouble(mergescores[i]);
543
+                                    if (endscore.compareTo(mqscore) > 0) {
544
+                                        endscore = mqscore;
545
+                                    }
494 546
                                     studentQuestion.setStuscore(endscore);
495 547
                                 }
496 548
                             }
@@ -510,15 +562,18 @@ public class MsPaperCheckTeacherTaskService {
510 562
                 msPaperStudentBlockMapper.updateByPrimaryKeySelective(block);
511 563
 
512 564
                 msPaperStudentQuestionMapper.checkByMptqidAndStudentId(studentQuestions, block);//更新学生单题批阅信息
565
+                checkscore = stuscores;
513 566
             } else {//按试题批阅
514 567
                 MsPaperStudentQuestion question = new MsPaperStudentQuestion();
515 568
                 question.setChecked(checked);
516 569
                 if (type.equals(1)) {
517 570
                     question.setFirstcime(N_Utils.getSecondTimestamp());
518 571
                     question.setFirstccore(firstccore);
572
+                    checkscore = firstccore.toString();
519 573
                 } else {
520 574
                     question.setSecondctime(N_Utils.getSecondTimestamp());
521 575
                     question.setSecondcscore(secondcscore);
576
+                    checkscore = secondcscore.toString();
522 577
                 }
523 578
                 question.setHasgood(hasgood);
524 579
                 question.setHasbad(hasbad);
@@ -529,6 +584,10 @@ public class MsPaperCheckTeacherTaskService {
529 584
                 question.setMpsqid(mpsbid);
530 585
             }
531 586
         }
587
+        param.setHasproblem(hasproblem);
588
+        param.setProblemtype(problemtype);
589
+        param.setProblemcomm(problemcomm);
590
+        param.setCheckscore(checkscore);
532 591
         msPaperCheckTeacherTaskMapper.correct(param);
533 592
     }
534 593
 
@@ -544,4 +603,44 @@ public class MsPaperCheckTeacherTaskService {
544 603
         }
545 604
         return score;
546 605
     }
606
+
607
+    /**
608
+     * @Description 教师阅卷-上一份
609
+     * @Date 2024/11/14 10:35
610
+     * @Author YWX
611
+     * @Param [param]
612
+     * @Return java.util.Map
613
+     **/
614
+    public Map getPreCorrect(MsCheckParam param) {
615
+        Integer correcttype = msPaperMapper.getCorrectTypeByMpId(param.getMpid());
616
+        if (correcttype.equals(1) && !N_Utils.isTrueInteger(param.getMptqid())) {
617
+            throw new ServiceException("考试试题表id不能为空");
618
+        }
619
+        param.setCorrecttype(correcttype);
620
+        return msPaperCheckTeacherTaskMapper.getPreCorrect(param);
621
+    }
622
+
623
+    /**
624
+     * @Description 教师阅卷-阅卷历史
625
+     * @Date 2024/11/14 14:13
626
+     * @Author YWX
627
+     * @Param [param]
628
+     * @Return java.util.List<java.util.Map>
629
+     **/
630
+    public List<Map> listCorrect(MsCheckParam param) {
631
+        return msPaperCheckTeacherTaskMapper.listCorrect(param);
632
+    }
633
+
634
+    /**
635
+     * @Description 教师阅卷-历史详情
636
+     * @Date 2024/11/14 17:33
637
+     * @Author YWX
638
+     * @Param [param]
639
+     * @Return java.util.Map
640
+     **/
641
+    public Map detailCorrect(MsCheckParam param) {
642
+        Integer correcttype = msPaperMapper.getCorrectTypeByMpId(param.getMpid());
643
+        param.setCorrecttype(correcttype);
644
+        return msPaperCheckTeacherTaskMapper.detailCorrect(param);
645
+    }
547 646
 }

+ 6
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/papercheck/MsCheckParam.java View File

@@ -32,4 +32,10 @@ public class MsCheckParam extends BaseBean {
32 32
     private Integer dispenseway;
33 33
     //考试试题表id
34 34
     private Integer mptqid;
35
+    //批阅设置:1按班设置2按题设置3按题块设置
36
+    private Integer correcttype;
37
+    //序号
38
+    private Integer taskorder;
39
+    //阅卷批阅教师任务ID
40
+    private Integer mpcttid;
35 41
 }

+ 4
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/papercheck/MsPaperCheckVo.java View File

@@ -16,6 +16,8 @@ public class MsPaperCheckVo {
16 16
     private Integer mpid;
17 17
     //题块ID
18 18
     private Integer mblockid;
19
+    //考试试题表id
20
+    private Integer mptqid;
19 21
     //阅卷试卷学生题块ID
20 22
     private Integer mpsbid;
21 23
     //阅卷试卷学生合并后试题ID
@@ -71,6 +73,8 @@ public class MsPaperCheckVo {
71 73
     private Integer hasbad;
72 74
     //学生ID
73 75
     private Integer studentid;
76
+    //序号
77
+    private Integer taskorder;
74 78
     //题块试题列表
75 79
     private List<MsPaperBlockQuestion> questions;
76 80
 }

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

@@ -38,8 +38,17 @@
38 38
     <!--教师批阅-批阅试题-->
39 39
     <update id="correct">
40 40
         update ms_paper_check_teacher_task
41
-        set checkstate = 3,checkscore = #{checkscore}
42
-        where mpid=#{mpid} and mpsbid=#{mpsbid} and teacherid=#{teacherid}
41
+        set checkstate = 3,checkscore = #{param.checkscore}
42
+        <if test="param.hasgood!=null and param.hasgood!=0">
43
+            ,hasgood=#{param.hasgood}
44
+        </if>
45
+        <if test="param.hasbad!=null and param.hasbad!=0">
46
+            ,hasbad=#{param.hasbad},problemtype=#{param.problemtype}
47
+        </if>
48
+        <if test="param.problemcomm!=null and param.problemcomm!=''">
49
+            ,problemcomm=#{param.problemcomm}
50
+        </if>
51
+        where mpid=#{param.mpid} and mpsbid=#{param.mpsbid} and teacherid=#{param.handleid}
43 52
     </update>
44 53
     <!--删除教师阅卷任务-->
45 54
     <delete id="deleteByMpsbids">
@@ -240,6 +249,32 @@
240 249
         group by pb.mblockid
241 250
         order by pb.blockorder
242 251
     </select>
252
+    <!--教师阅卷-试题列表-->
253
+    <select id="listTeacherQuestion" resultType="java.util.Map">
254
+        <if test="param.correcttype==1">
255
+            select pb.mptqid as mblockid,pb.qorder,pb.qn,pb.qscore
256
+            from ms_paper_qtype_question pb
257
+            where pb.mpid=#{param.mpid} and pb.ctype in(3,13,14,15)
258
+            group by pb.mptqid
259
+            order by pb.qorder,pb.qn
260
+        </if>
261
+        <if test="param.correcttype==2">
262
+            select pct.mblockid,pb.qorder,pb.qn,pb.qscore
263
+            from ms_paper_qtype_question pb inner join ms_paper_check_teacher pct on pb.mptqid = pct.mblockid
264
+            and pct.teacherid = #{param.handleid}
265
+            where pb.mpid=#{param.mpid}
266
+            group by pb.mptqid
267
+            order by pb.qorder,pb.qn
268
+        </if>
269
+    </select>
270
+    <!--教师阅卷-班级列表-->
271
+    <select id="listTeacherClass" resultType="java.util.Map">
272
+        select pct.mblockid,c.classname,c.classtype
273
+        from ms_paper_check_teacher pct inner join ms_paper p on pct.mpid = p.mpid
274
+        inner join ms_class c on pct.mblockid = c.classid and c.examid = p.examid and c.subjectid = p.subjectid
275
+        where pct.mpid=#{param.mpid} and pct.teacherid = #{param.handleid}
276
+        order by c.mcid
277
+    </select>
243 278
     <!--教师阅卷-待批题块列表-->
244 279
     <select id="listBlockCheck" resultType="com.xhkjedu.smarking.model.papercheck.MsPaperCheck">
245 280
         select pc.mblockid,pc.checktype,pc.hidefirstscore,pc.scoreway,pc.finalscore,pc.roundvalue,pc.dispenseway,pc.numtype
@@ -253,7 +288,7 @@
253 288
     <!--教师阅卷-按题块-获取待批试题-->
254 289
     <select id="getCorrectBlock" resultType="com.xhkjedu.smarking.vo.papercheck.MsPaperCheckVo">
255 290
         <if test="param.dispenseway!=null and param.dispenseway!=2">
256
-            select pctt.mblockid,pctt.mpsbid,pctt.checktype,psb.stuanswer,psb.checked
291
+            select pctt.mblockid,pctt.mpsbid,pctt.checktype,pctt.taskorder,psb.stuanswer,psb.checked
257 292
             ,psb.firstcid,psb.firstcime,psb.secondcid,psb.secondctime,psb.studentid
258 293
             ,psb.firstccore,psb.secondcscore,psb.firstccores,psb.secondcscores
259 294
             from ms_paper_student_block psb inner join ms_paper_check_teacher_task pctt on psb.mpsbid = pctt.mpsbid and psb.mpid=pctt.mpid
@@ -344,7 +379,7 @@
344 379
     <!--教师阅卷-按试题-获取待批试题-->
345 380
     <select id="getCorrectQuestion" resultType="com.xhkjedu.smarking.vo.papercheck.MsPaperCheckVo">
346 381
         <if test="param.dispenseway!=null and param.dispenseway!=2">
347
-            select pctt.mblockid,pctt.mpsbid,pctt.checktype,psb.stuanswer,psb.checked
382
+            select pctt.mblockid,pctt.mpsbid,pctt.checktype,pctt.taskorder,psb.stuanswer,psb.checked
348 383
             ,psb.firstcid,psb.firstcime,psb.secondcid,psb.secondctime
349 384
             ,psb.firstccore,psb.secondcscore
350 385
             from ms_paper_student_question psb inner join ms_paper_check_teacher_task pctt on psb.mpsqid = pctt.mpsbid and psb.mpid=pctt.mpid
@@ -382,7 +417,7 @@
382 417
     <!--教师阅卷-按班级-获取待批试题-->
383 418
     <select id="getCorrectClassQuestion" resultType="com.xhkjedu.smarking.vo.papercheck.MsPaperCheckVo">
384 419
         <if test="param.dispenseway!=null and param.dispenseway!=2">
385
-            select pctt.mblockid,pctt.mpsbid,pctt.checktype,psb.stuanswer,psb.checked
420
+            select pctt.mblockid,pctt.mpsbid,pctt.checktype,pctt.taskorder,psb.stuanswer,psb.checked
386 421
             ,psb.firstcid,psb.firstcime,psb.secondcid,psb.secondctime,psb.mptqid
387 422
             ,psb.firstccore,psb.secondcscore
388 423
             from ms_paper_student_question psb inner join ms_paper_check_teacher_task pctt on psb.mpsqid = pctt.mpsbid and psb.mpid=pctt.mpid
@@ -436,4 +471,54 @@
436 471
             </if>
437 472
         </if>
438 473
     </select>
474
+    <!--教师阅卷-上一份-->
475
+    <select id="getPreCorrect" resultType="java.util.Map">
476
+        select psq.stuanswer
477
+        <if test="param.correcttype==3">
478
+             ,if(pctt.checktype=1,psq.firstccores,psq.secondcscores) as stuscore
479
+        </if>
480
+        <if test="param.correcttype!=3">
481
+            ,if(pctt.checktype=1,psq.firstccore,psq.secondcscore) as stuscore
482
+        </if>
483
+        from ms_paper_check_teacher_task pctt
484
+        <if test="param.correcttype==3">
485
+            inner join ms_paper_student_block psq on pctt.mpsbid=psq.mpsbid
486
+        </if>
487
+        <if test="param.correcttype!=3">
488
+            inner join ms_paper_student_question psq on pctt.mpsbid=psq.mpsqid
489
+        </if>
490
+        where pctt.mpid=#{param.mpid} and pctt.mblockid=#{param.mblockid} and pctt.teacherid=#{param.handleid}
491
+        and pctt.checkstate=3 and #{param.taskorder}>pctt.taskorder
492
+        <if test="param.mptqid!=null and param.mptqid!=0">
493
+            and pctt.mptqid=#{param.mptqid}
494
+        </if>
495
+        order by pctt.taskorder desc limit 1
496
+    </select>
497
+    <!--教师阅卷-阅卷历史-->
498
+    <select id="listCorrect" resultType="java.util.Map">
499
+        select pctt.mpcttid,pctt.taskorder,pctt.checkscore
500
+        ,(case when pctt.hasgood=1 then '优' when pctt.hasbad=1 then '违' when pctt.hasproblem=1 then '疑' else '' end) as comm
501
+        from ms_paper_check_teacher_task pctt
502
+        where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.handleid}
503
+        and pctt.checkstate=3
504
+        <if test="param.mptqid!=null and param.mptqid!=0">
505
+            and pctt.mptqid=#{param.mptqid}
506
+        </if>
507
+        <if test="param.taskorder!=null and param.taskorder!=0">
508
+            and pctt.taskorder=#{param.taskorder}
509
+        </if>
510
+        order by pctt.taskorder desc
511
+    </select>
512
+    <!--教师阅卷-历史详情-->
513
+    <select id="detailCorrect" resultType="java.util.Map">
514
+        select psq.stuanswer,pctt.checkscore,pctt.hasproblem,pctt.problemtype,pctt.problemcomm
515
+        ,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid,pctt.taskorder
516
+        from ms_paper_check_teacher_task pctt
517
+        <if test="param.correcttype==3">
518
+            inner join ms_paper_student_block psq on pctt.mpsbid=psq.mpsbid
519
+        </if>
520
+        <if test="param.correcttype!=3">
521
+            inner join ms_paper_student_question psq on pctt.mpsbid=psq.mpsqid
522
+        </if>
523
+    </select>
439 524
 </mapper>

Loading…
Cancel
Save