Browse Source

学生提交作业时设置是否自动批阅(批阅学生列表不显示自动批阅的学生)

tags/正式3.14.1
雍文秀 4 months ago
parent
commit
2dcd903bad

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/model/paperstudent/TPaperStudent.java View File

@@ -35,6 +35,9 @@ public class TPaperStudent extends BaseBean {
35 35
     //批改状态0未批改1已批改2批改中
36 36
     private Integer pschecked;
37 37
 
38
+    //是否自动批阅0否 1是
39
+    private Integer autocheck;
40
+
38 41
     //作业开始时间
39 42
     private Integer starttime;
40 43
 

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java View File

@@ -409,6 +409,7 @@ public class PaperStudentService {
409 409
             if (psqStudentCount <= 0) {//该学生作业已经全部批改完成
410 410
                 //作业学生关联表,学生批改状态置为已批改
411 411
                 pschecked = 1;
412
+                paperStudentBean.setAutocheck(1);
412 413
             }
413 414
             paperStudentBean.setPschecked(pschecked);
414 415
             result = paperStudentMapper.updatePaper(paperStudentBean);
@@ -782,6 +783,7 @@ public class PaperStudentService {
782 783
             if (psqStudentCount <= 0) {//该学生作业已经全部批改完成
783 784
                 //作业学生关联表,学生批改状态置为已批改
784 785
                 pschecked = 1;
786
+                paperStudentBean.setAutocheck(1);
785 787
             }
786 788
             paperStudentBean.setPschecked(pschecked);
787 789
             result = paperStudentMapper.updateSPaper(paperStudentBean);

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java View File

@@ -303,6 +303,7 @@ public class PaperStudentWebService {
303 303
             Integer pschecked = 0;
304 304
             if (checknum == psqs.size()){//如果自动批改试题数量等于试题总量,批改状态改为1已批改
305 305
                 pschecked = 1;
306
+                ps.setAutocheck(1);
306 307
             }
307 308
             ps.setPschecked(pschecked);
308 309
             ps.setCosttime(paper.getCosttime());
@@ -487,6 +488,7 @@ public class PaperStudentWebService {
487 488
             Integer pschecked = 0;
488 489
             if (checknum == psqs.size()){//如果自动批改试题数量等于试题总量,批改状态改为1已批改
489 490
                 pschecked = 1;
491
+                ps.setAutocheck(1);
490 492
             }
491 493
             ps.setPschecked(pschecked);
492 494
             ps.setCosttime(paper.getCosttime());

+ 1
- 1
sstudy/src/main/resources/mapper/paper/PaperMapper.xml View File

@@ -351,7 +351,7 @@
351 351
     <select id="listStudent" resultMap="studentResult">
352 352
         select ps.psid,ps.studentid,u.username studentname,ps.pschecked
353 353
         from t_paper_student ps left join t_user u on ps.studentid=u.userid
354
-        where ps.paperid=#{paperid} and ps.classid=#{classid} and ps.psstate in(1,2,4)
354
+        where ps.paperid=#{paperid} and ps.classid=#{classid} and ps.psstate in(1,2,4) and ps.autocheck=0
355 355
         order by ps.pschecked,convert(u.username using gbk),u.userid
356 356
     </select>
357 357
     <select id="listStudentsByPaperIdCheckId" resultMap="checkResult">

+ 3
- 0
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml View File

@@ -295,6 +295,7 @@
295 295
     <update id="submitPaper">
296 296
         update t_paper_student set stoptime=#{ps.stoptime},costtime=ifnull(costtime,0)+#{ps.costtime}
297 297
         ,psstate=#{ps.psstate},userscore=#{ps.userscore},pschecked=#{ps.pschecked},showanswer=#{ps.showanswer}
298
+        <if test="ps.autocheck!=null">,autocheck=#{ps.autocheck}</if>
298 299
         where psid=#{ps.psid}
299 300
     </update>
300 301
     <!--批量修改题库作业学生作答信息-->
@@ -368,6 +369,7 @@
368 369
         update t_paper_student set stoptime=#{ps.stoptime},costtime=#{ps.costtime}
369 370
         ,psstate=#{ps.psstate},pschecked=#{ps.pschecked},showanswer=#{ps.showanswer}
370 371
         ,userscore=(SELECT SUM(IFNULL(q.stuscore,0)) FROM t_paper_student_scantron q WHERE q.psid=#{ps.psid})
372
+        <if test="ps.autocheck!=null">,autocheck=#{ps.autocheck}</if>
371 373
         where psid=#{ps.psid}
372 374
     </update>
373 375
     <!--题库作业提交更新操作-->
@@ -375,6 +377,7 @@
375 377
         update t_paper_student set stoptime=#{ps.stoptime},costtime=#{ps.costtime}
376 378
         ,psstate=#{ps.psstate},pschecked=#{ps.pschecked},showanswer=#{ps.showanswer}
377 379
         ,userscore=(SELECT SUM(IFNULL(q.stuscore,0)) FROM t_paper_student_question q WHERE q.psid=#{ps.psid})
380
+        <if test="ps.autocheck!=null">,autocheck=#{ps.autocheck}</if>
378 381
         where psid=#{ps.psid}
379 382
     </update>
380 383
     <!--作业学生列表-->

Loading…
Cancel
Save