Browse Source

已批阅的作业再次批阅不处理

tags/正式3.3.0
雍文秀 2 years ago
parent
commit
c495a01e68

+ 5
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperGroupMapper.java View File

@@ -55,10 +55,14 @@ public interface PaperGroupMapper extends TkMapper<TPaperGroup> {
55 55
 
56 56
     /**
57 57
      * 作业班级下未批阅学生作业数量
58
+     *
59
+     * @return java.lang.Integer
58 60
      * @Param [pg]
59 61
      * @Author ywx
60 62
      * @Date 2020/10/14 11:04
61
-     * @return java.lang.Integer
62 63
      **/
63 64
     Integer getWpyNum(@Param("pg") TPaperGroup pg);
65
+
66
+    //获取班级作业是否结束批阅
67
+    Integer getPaperClassChecked(@Param("paperid") Long paperid, @Param("classid") Integer classid);
64 68
 }

+ 4
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionClassService.java View File

@@ -78,6 +78,8 @@ public class QuestionClassService {
78 78
         Long paperid = question.getPaperid();
79 79
         Integer classid = question.getClassid();
80 80
         Integer qctype = question.getQctype();
81
+        Integer checked = paperGroupMapper.getPaperClassChecked(paperid, classid);//获取班级作业是否结束批阅
82
+        if (checked == 1) return;//已结束批阅不处理
81 83
         //已批阅未得满分的试题
82 84
         List<TQuestionStudent> questions = questionStudentService.listQuestions(paperid, classid, qctype);
83 85
         for (TQuestionStudent q : questions) {
@@ -85,10 +87,10 @@ public class QuestionClassService {
85 87
         }
86 88
 
87 89
         List<TQuestionClass> questionClasses;
88
-        if (qctype == 1){
90
+        if (qctype == 1) {
89 91
             questionClasses = questionClassMapper.getQuestionAnalyze(paperid, classid);
90 92
         } else/* if(qctype == 2)*/ {
91
-            questionClasses = questionClassMapper.getSQuestionAnalyze(paperid , classid);
93
+            questionClasses = questionClassMapper.getSQuestionAnalyze(paperid, classid);
92 94
         }/* else {
93 95
             questionClasses = questionClassMapper.getEQuestionAnalyze(paperid , classid);
94 96
         }*/

+ 4
- 0
sstudy/src/main/resources/mapper/paperstudent/PaperGroupMapper.xml View File

@@ -41,4 +41,8 @@
41 41
     <select id="getWpyNum" resultType="java.lang.Integer">
42 42
         select count(*) from t_paper_student where paperid=#{pg.paperid} and classid=#{pg.classid} and pschecked!=1
43 43
     </select>
44
+    <!--获取班级作业是否结束批阅-->
45
+    <select id="getPaperClassChecked" resultType="java.lang.Integer">
46
+        select pg.checked from t_paper_group pg where pg.paperid=#{paperid} and pg.classid=#{classid}
47
+    </select>
44 48
 </mapper>

Loading…
Cancel
Save