Parcourir la source

学生网页端开始做作业完善 优秀作答完善

tags/正式3.10.0
雍文秀 il y a 1 an
Parent
révision
961f50ed02

+ 7
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paperstudent/PaperStudentController.java Voir le fichier

@@ -404,7 +404,13 @@ public class PaperStudentController {
404 404
     */
405 405
     @PostMapping("/delgood")
406 406
     public ResultVo updateStudentQuestionGood(@RequestBody PaperStudentQuestionVo ps) {
407
-        N_Utils.validation(new Object[]{ps.getPsqid(), "学生试题id", 1,ps.getPapertype(),"作业类型",1});
407
+        Integer papertype = ps.getPapertype();
408
+        N_Utils.validation(new Object[]{papertype, "作业类型", 1});
409
+        if (papertype == 2) {
410
+            N_Utils.validation(new Object[]{ps.getPsqid(), "学生试题id", 1});
411
+        } else {
412
+            N_Utils.validation(new Object[]{ps.getPsid(), "试卷学生id", 1, ps.getQuestionpid(), "母题id", 2});
413
+        }
408 414
         paperStudentService.updatePaperStudentQuesGood(ps);
409 415
         return new ResultVo(0, "取消学生试题优秀作答成功");
410 416
     }

+ 4
- 4
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentMapper.java Voir le fichier

@@ -5,10 +5,7 @@ import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
5 5
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
6 6
 import com.xhkjedu.sstudy.vo.paper.PaperCheckParam;
7 7
 import com.xhkjedu.sstudy.vo.paperreport.PaperRStuVo;
8
-import com.xhkjedu.sstudy.vo.paperstudent.PaperCommVo;
9
-import com.xhkjedu.sstudy.vo.paperstudent.PaperSearchVo;
10
-import com.xhkjedu.sstudy.vo.paperstudent.PaperStudentVo;
11
-import com.xhkjedu.sstudy.vo.paperstudent.StudentVo;
8
+import com.xhkjedu.sstudy.vo.paperstudent.*;
12 9
 import org.apache.ibatis.annotations.Param;
13 10
 import org.springframework.stereotype.Repository;
14 11
 
@@ -212,4 +209,7 @@ public interface PaperStudentMapper extends TkMapper<TPaperStudent> {
212 209
 
213 210
     //班级作业学生列表
214 211
     List<StudentVo> listStu(@Param("paperid") Integer paperid,@Param("classid") Integer classid);
212
+
213
+    //学生作业基本信息
214
+    StudentPaperVo getStudentPaper(@Param("psid") Integer psid);
215 215
 }

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentQuestionMapper.java Voir le fichier

@@ -127,5 +127,6 @@ public interface PaperStudentQuestionMapper extends TkMapper<TPaperStudentQuesti
127 127
     int updatePaperStudentGoodByPsid(@Param("psid") Integer psid);
128 128
 
129 129
     //标记单题是否优秀作答
130
-    int updatePaperStudentGoodByPsqid(@Param("good") Integer good,@Param("psqid") Integer psqid);
130
+    int updatePaperStudentGoodByPsqid(@Param("good") Integer good, @Param("psid") Integer psid
131
+            ,@Param("questionpid") String questionpid);
131 132
 }

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java Voir le fichier

@@ -1099,7 +1099,7 @@ public class PaperStudentService {
1099 1099
             //附件作业
1100 1100
             paperStudentScantronMapper.updatePaperStudentGoodByPsqid(0,psq.getPsqid());
1101 1101
         }else{
1102
-            paperStudentQuestionMapper.updatePaperStudentGoodByPsqid(0,psq.getPsqid());
1102
+            paperStudentQuestionMapper.updatePaperStudentGoodByPsqid(0, psq.getPsid(), psq.getQuestionpid());
1103 1103
         }
1104 1104
     }
1105 1105
 

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java Voir le fichier

@@ -86,7 +86,7 @@ public class PaperStudentWebService {
86 86
      **/
87 87
     @Transactional(rollbackFor = Exception.class)
88 88
     public StudentPaperVo startPaper(Integer psid) {
89
-        StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
89
+        StudentPaperVo paper = paperStudentMapper.getStudentPaper(psid);
90 90
         try {
91 91
             List<StudentPaperTypeVo> types = paperAnalyzeMapper.listPeopleDetailAnalyze(psid);
92 92
             if (N_Utils.isListEmpty(types)){
@@ -129,7 +129,7 @@ public class PaperStudentWebService {
129 129
      * @return com.xhkjedu.vo.paperstudent.StudentPaperVo
130 130
      **/
131 131
     public StudentPaperVo scantronStartPaper(Integer psid){
132
-        StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
132
+        StudentPaperVo paper = paperStudentMapper.getStudentPaper(psid);
133 133
         List<StudentPaperTypeVo> types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
134 134
         if (N_Utils.isListEmpty(types)){
135 135
 

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/StudentPaperVo.java Voir le fichier

@@ -87,4 +87,10 @@ public class StudentPaperVo {
87 87
 
88 88
     //提交形式:图片,文字,视频,音频 ["image","text","video","audio"]
89 89
     private String committype;
90
+
91
+    //作业分类1课前2课后
92
+    private Integer paperclass;
93
+
94
+    //创建时间
95
+    private Integer createtime;
90 96
 }

+ 6
- 4
sstudy/src/main/resources/mapper/paperreport/PaperStudentReportMapper.xml Voir le fichier

@@ -123,11 +123,13 @@
123 123
             <result property="username" column="username"></result>
124 124
             <result property="headpic" column="headpic"></result>
125 125
             <result property="qorder" column="qorder"></result>
126
+            <result property="psid" column="psid"></result>
126 127
             <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
127 128
                 <result property="studentid" column="studentid"></result>
128 129
                 <result property="qn" column="qn"></result>
129 130
                 <result property="qorder" column="qorder"></result>
130
-                <result property="questionid" column="questionid"></result>
131
+                <result property="psqid" column="psqid"></result>
132
+                <result property="questionpid" column="questionpid"></result>
131 133
                 <result property="stuscore" column="stuscore"></result>
132 134
                 <result property="answertype" column="answertype"></result>
133 135
                 <result property="useranswer" column="useranswer"></result>
@@ -139,9 +141,9 @@
139 141
     </resultMap>
140 142
     <select id="listGoodAnswer" resultMap="answerResult">
141 143
         select q.qorder,q.qn,q.stuscore,q.answertype,q.useranswer,q.converted,q.useranswertxt,q.checkcomm
142
-        ,q.studentid,u.username,u.headpic
143
-        <if test="papertype!=2">,q.qorder mqn from t_paper_student_question q</if>
144
-        <if test="papertype==2">,q.qn mqn from t_paper_student_scantron q</if>
144
+        ,q.studentid,q.psid,u.username,u.headpic
145
+        <if test="papertype!=2">,q.qorder mqn,q.psqid,q.questionpid from t_paper_student_question q</if>
146
+        <if test="papertype==2">,q.qn mqn,q.pssid psqid from t_paper_student_scantron q</if>
145 147
         left join t_user u on q.studentid=u.userid
146 148
         where q.paperid=#{paperid} and q.classid=#{classid} and good=1
147 149
         order by q.qorder,convert(u.username using gbk)

+ 10
- 0
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml Voir le fichier

@@ -368,4 +368,14 @@
368 368
         from t_paper_student ps
369 369
         where ps.paperid=#{paperid} and ps.classid=#{classid}
370 370
     </select>
371
+    <!--学生作业基本信息-->
372
+    <select id="getStudentPaper" resultType="com.xhkjedu.sstudy.vo.paperstudent.StudentPaperVo">
373
+        select p.createtime,p.papername,p.papertype,p.paperclass,p.committype,p.hearfile,u.username createname
374
+        ,ps.paperid,ps.classid,ps.papernum,ps.paperscore,ps.questionids
375
+        ,pg.showtype,pg.starttime,pg.stoptime
376
+        from t_paper_student ps left join t_paper p on ps.paperid=p.paperid
377
+        left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
378
+        left join t_user u on p.createid=u.userid
379
+        where ps.psid=#{psid}
380
+    </select>
371 381
 </mapper>

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml Voir le fichier

@@ -137,6 +137,6 @@
137 137
 
138 138
     <!--标记单题是否优秀作答-->
139 139
     <update id="updatePaperStudentGoodByPsqid">
140
-        update t_paper_student_question set good=#{good} where psqid=#{psqid}
140
+        update t_paper_student_question set good=#{good} where psid=#{psid} and questionpid=#{questionpid}
141 141
     </update>
142 142
 </mapper>

Chargement…
Annuler
Enregistrer