Browse Source

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

tags/正式3.14.1
王宁 3 months ago
parent
commit
d66dae7c3b

+ 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

@@ -360,7 +360,7 @@
360 360
     <select id="listStudent" resultMap="studentResult">
361 361
         select ps.psid,ps.studentid,u.username studentname,ps.pschecked
362 362
         from t_paper_student ps left join t_user u on ps.studentid=u.userid
363
-        where ps.paperid=#{paperid} and ps.classid=#{classid} and ps.psstate in(1,2,4)
363
+        where ps.paperid=#{paperid} and ps.classid=#{classid} and ps.psstate in(1,2,4) and ps.autocheck=0
364 364
         order by ps.pschecked,convert(u.username using gbk),u.userid
365 365
     </select>
366 366
     <select id="listStudentsByPaperIdCheckId" resultMap="checkResult">

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

@@ -301,6 +301,7 @@
301 301
     <update id="submitPaper">
302 302
         update t_paper_student set stoptime=#{ps.stoptime},costtime=ifnull(costtime,0)+#{ps.costtime}
303 303
         ,psstate=#{ps.psstate},userscore=#{ps.userscore},pschecked=#{ps.pschecked},showanswer=#{ps.showanswer}
304
+        <if test="ps.autocheck!=null">,autocheck=#{ps.autocheck}</if>
304 305
         where psid=#{ps.psid}
305 306
     </update>
306 307
     <!--批量修改题库作业学生作答信息-->
@@ -374,6 +375,7 @@
374 375
         update t_paper_student set stoptime=#{ps.stoptime},costtime=#{ps.costtime}
375 376
         ,psstate=#{ps.psstate},pschecked=#{ps.pschecked},showanswer=#{ps.showanswer}
376 377
         ,userscore=(SELECT SUM(IFNULL(q.stuscore,0)) FROM t_paper_student_scantron q WHERE q.psid=#{ps.psid})
378
+        <if test="ps.autocheck!=null">,autocheck=#{ps.autocheck}</if>
377 379
         where psid=#{ps.psid}
378 380
     </update>
379 381
     <!--题库作业提交更新操作-->
@@ -381,6 +383,7 @@
381 383
         update t_paper_student set stoptime=#{ps.stoptime},costtime=#{ps.costtime}
382 384
         ,psstate=#{ps.psstate},pschecked=#{ps.pschecked},showanswer=#{ps.showanswer}
383 385
         ,userscore=(SELECT SUM(IFNULL(q.stuscore,0)) FROM t_paper_student_question q WHERE q.psid=#{ps.psid})
386
+        <if test="ps.autocheck!=null">,autocheck=#{ps.autocheck}</if>
384 387
         where psid=#{ps.psid}
385 388
     </update>
386 389
     <!--作业学生列表-->

Loading…
Cancel
Save