Browse Source

按班级获取待批试题完善

ywx
雍文秀 1 week ago
parent
commit
3fb93194e7

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

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

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

11
     </insert>
11
     </insert>
12
     <!--保存或更新单个任务-->
12
     <!--保存或更新单个任务-->
13
     <insert id="save">
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
     </insert>
17
     </insert>
18
     <!--批量更新任务信息-->
18
     <!--批量更新任务信息-->
19
     <update id="batchUpdate">
19
     <update id="batchUpdate">
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
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
             where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.teacherid}
566
             where pctt.mpid=#{param.mpid} and pctt.mblockid = #{param.mblockid} and pctt.teacherid = #{param.teacherid}
567
             and pctt.checkstate!=3 and psq.hasproblem=0
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
             order by field(pctt.checkstate,2,1,3),pctt.taskorder
571
             order by field(pctt.checkstate,2,1,3),pctt.taskorder
569
             limit 1
572
             limit 1
570
         </if>
573
         </if>
583
             </if>
586
             </if>
584
             )))
587
             )))
585
             and psq.hasproblem=0
588
             and psq.hasproblem=0
589
+            <if test="param.mptqid!=null and param.mptqid!=0">
590
+                and psq.mptqid=#{param.mptqid}
591
+            </if>
586
             order by field(psq.checked,2,1,3),psq.mptqid
592
             order by field(psq.checked,2,1,3),psq.mptqid
587
             limit 1
593
             limit 1
588
         </if>
594
         </if>

Loading…
Cancel
Save