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
     //批改状态0未批改1已批改2批改中
35
     //批改状态0未批改1已批改2批改中
36
     private Integer pschecked;
36
     private Integer pschecked;
37
 
37
 
38
+    //是否自动批阅0否 1是
39
+    private Integer autocheck;
40
+
38
     //作业开始时间
41
     //作业开始时间
39
     private Integer starttime;
42
     private Integer starttime;
40
 
43
 

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

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

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

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

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

351
     <select id="listStudent" resultMap="studentResult">
351
     <select id="listStudent" resultMap="studentResult">
352
         select ps.psid,ps.studentid,u.username studentname,ps.pschecked
352
         select ps.psid,ps.studentid,u.username studentname,ps.pschecked
353
         from t_paper_student ps left join t_user u on ps.studentid=u.userid
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
         order by ps.pschecked,convert(u.username using gbk),u.userid
355
         order by ps.pschecked,convert(u.username using gbk),u.userid
356
     </select>
356
     </select>
357
     <select id="listStudentsByPaperIdCheckId" resultMap="checkResult">
357
     <select id="listStudentsByPaperIdCheckId" resultMap="checkResult">

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

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

Loading…
Cancel
Save