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
 
55
 
56
     /**
56
     /**
57
      * 作业班级下未批阅学生作业数量
57
      * 作业班级下未批阅学生作业数量
58
+     *
59
+     * @return java.lang.Integer
58
      * @Param [pg]
60
      * @Param [pg]
59
      * @Author ywx
61
      * @Author ywx
60
      * @Date 2020/10/14 11:04
62
      * @Date 2020/10/14 11:04
61
-     * @return java.lang.Integer
62
      **/
63
      **/
63
     Integer getWpyNum(@Param("pg") TPaperGroup pg);
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
         Long paperid = question.getPaperid();
78
         Long paperid = question.getPaperid();
79
         Integer classid = question.getClassid();
79
         Integer classid = question.getClassid();
80
         Integer qctype = question.getQctype();
80
         Integer qctype = question.getQctype();
81
+        Integer checked = paperGroupMapper.getPaperClassChecked(paperid, classid);//获取班级作业是否结束批阅
82
+        if (checked == 1) return;//已结束批阅不处理
81
         //已批阅未得满分的试题
83
         //已批阅未得满分的试题
82
         List<TQuestionStudent> questions = questionStudentService.listQuestions(paperid, classid, qctype);
84
         List<TQuestionStudent> questions = questionStudentService.listQuestions(paperid, classid, qctype);
83
         for (TQuestionStudent q : questions) {
85
         for (TQuestionStudent q : questions) {
85
         }
87
         }
86
 
88
 
87
         List<TQuestionClass> questionClasses;
89
         List<TQuestionClass> questionClasses;
88
-        if (qctype == 1){
90
+        if (qctype == 1) {
89
             questionClasses = questionClassMapper.getQuestionAnalyze(paperid, classid);
91
             questionClasses = questionClassMapper.getQuestionAnalyze(paperid, classid);
90
         } else/* if(qctype == 2)*/ {
92
         } else/* if(qctype == 2)*/ {
91
-            questionClasses = questionClassMapper.getSQuestionAnalyze(paperid , classid);
93
+            questionClasses = questionClassMapper.getSQuestionAnalyze(paperid, classid);
92
         }/* else {
94
         }/* else {
93
             questionClasses = questionClassMapper.getEQuestionAnalyze(paperid , classid);
95
             questionClasses = questionClassMapper.getEQuestionAnalyze(paperid , classid);
94
         }*/
96
         }*/

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

41
     <select id="getWpyNum" resultType="java.lang.Integer">
41
     <select id="getWpyNum" resultType="java.lang.Integer">
42
         select count(*) from t_paper_student where paperid=#{pg.paperid} and classid=#{pg.classid} and pschecked!=1
42
         select count(*) from t_paper_student where paperid=#{pg.paperid} and classid=#{pg.classid} and pschecked!=1
43
     </select>
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
 </mapper>
48
 </mapper>

Loading…
Cancel
Save