Browse Source

按班级获取待批试题完善

ywx
雍文秀 2 weeks ago
parent
commit
3fb93194e7

+ 2
- 0
smarking/src/main/java/com/xhkjedu/smarking/service/papercheck/MsPaperCheckTeacherTaskService.java View File

@@ -214,9 +214,11 @@ public class MsPaperCheckTeacherTaskService {
214 214
             if (N_Utils.isListEmpty(checks)) throw new ServiceException("暂无要批阅的班级");
215 215
             for (MsPaperCheck check : checks) {
216 216
                 check.setTeacherid(handleid);
217
+                check.setMptqid(param.getMptqid());
217 218
                 sq = msPaperCheckTeacherTaskMapper.getCorrectClassQuestion(check);
218 219
                 if (sq != null) {
219 220
                     paperCheck = check;
221
+                    paperCheck.setMptqid(sq.getMptqid());
220 222
                     break;
221 223
                 }
222 224
             }

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

@@ -11,9 +11,9 @@
11 11
     </insert>
12 12
     <!--保存或更新单个任务-->
13 13
     <insert id="save">
14
-        insert into ms_paper_check_teacher_task (mpid, mblockid, teacherid, taskorder, mpsbid, checktype, createtime)
15
-        values (#{s.mpid},#{s.mblockid},#{s.teacherid},#{s.taskorder},#{s.mpsbid},#{s.checktype},#{s.createtime})
16
-        on duplicate key update taskorder=#{s.taskorder},teacherid=#{s.teacherid}
14
+        insert into ms_paper_check_teacher_task (mpid, mblockid, mptqid, teacherid, taskorder, mpsbid, checktype, createtime)
15
+        values (#{s.mpid},#{s.mblockid},#{s.mptqid},#{s.teacherid},#{s.taskorder},#{s.mpsbid},#{s.checktype},#{s.createtime})
16
+        on duplicate key update taskorder=#{s.taskorder},teacherid=#{s.teacherid},mblockid=#{s.mblockid}
17 17
     </insert>
18 18
     <!--批量更新任务信息-->
19 19
     <update id="batchUpdate">
@@ -565,6 +565,9 @@
565 565
             from ms_paper_student_question psq inner join ms_paper_check_teacher_task pctt on psq.mpsqid = pctt.mpsbid and psq.mpid=pctt.mpid
566 566
             where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.teacherid}
567 567
             and pctt.checkstate!=3 and psq.hasproblem=0
568
+            <if test="param.mptqid!=null and param.mptqid!=0">
569
+                and psq.mptqid=#{param.mptqid}
570
+            </if>
568 571
             order by field(pctt.checkstate,2,1,3),pctt.taskorder
569 572
             limit 1
570 573
         </if>
@@ -583,6 +586,9 @@
583 586
             </if>
584 587
             )))
585 588
             and psq.hasproblem=0
589
+            <if test="param.mptqid!=null and param.mptqid!=0">
590
+                and psq.mptqid=#{param.mptqid}
591
+            </if>
586 592
             order by field(psq.checked,2,1,3),psq.mptqid
587 593
             limit 1
588 594
         </if>

Loading…
Cancel
Save