Browse Source

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

tags/正式3.10.0
雍文秀 1 year ago
parent
commit
961f50ed02

+ 7
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paperstudent/PaperStudentController.java View File

404
     */
404
     */
405
     @PostMapping("/delgood")
405
     @PostMapping("/delgood")
406
     public ResultVo updateStudentQuestionGood(@RequestBody PaperStudentQuestionVo ps) {
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
         paperStudentService.updatePaperStudentQuesGood(ps);
414
         paperStudentService.updatePaperStudentQuesGood(ps);
409
         return new ResultVo(0, "取消学生试题优秀作答成功");
415
         return new ResultVo(0, "取消学生试题优秀作答成功");
410
     }
416
     }

+ 4
- 4
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentMapper.java View File

5
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
5
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
6
 import com.xhkjedu.sstudy.vo.paper.PaperCheckParam;
6
 import com.xhkjedu.sstudy.vo.paper.PaperCheckParam;
7
 import com.xhkjedu.sstudy.vo.paperreport.PaperRStuVo;
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
 import org.apache.ibatis.annotations.Param;
9
 import org.apache.ibatis.annotations.Param;
13
 import org.springframework.stereotype.Repository;
10
 import org.springframework.stereotype.Repository;
14
 
11
 
212
 
209
 
213
     //班级作业学生列表
210
     //班级作业学生列表
214
     List<StudentVo> listStu(@Param("paperid") Integer paperid,@Param("classid") Integer classid);
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 View File

127
     int updatePaperStudentGoodByPsid(@Param("psid") Integer psid);
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 View File

1099
             //附件作业
1099
             //附件作业
1100
             paperStudentScantronMapper.updatePaperStudentGoodByPsqid(0,psq.getPsqid());
1100
             paperStudentScantronMapper.updatePaperStudentGoodByPsqid(0,psq.getPsqid());
1101
         }else{
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 View File

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

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/StudentPaperVo.java View File

87
 
87
 
88
     //提交形式:图片,文字,视频,音频 ["image","text","video","audio"]
88
     //提交形式:图片,文字,视频,音频 ["image","text","video","audio"]
89
     private String committype;
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 View File

123
             <result property="username" column="username"></result>
123
             <result property="username" column="username"></result>
124
             <result property="headpic" column="headpic"></result>
124
             <result property="headpic" column="headpic"></result>
125
             <result property="qorder" column="qorder"></result>
125
             <result property="qorder" column="qorder"></result>
126
+            <result property="psid" column="psid"></result>
126
             <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
127
             <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
127
                 <result property="studentid" column="studentid"></result>
128
                 <result property="studentid" column="studentid"></result>
128
                 <result property="qn" column="qn"></result>
129
                 <result property="qn" column="qn"></result>
129
                 <result property="qorder" column="qorder"></result>
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
                 <result property="stuscore" column="stuscore"></result>
133
                 <result property="stuscore" column="stuscore"></result>
132
                 <result property="answertype" column="answertype"></result>
134
                 <result property="answertype" column="answertype"></result>
133
                 <result property="useranswer" column="useranswer"></result>
135
                 <result property="useranswer" column="useranswer"></result>
139
     </resultMap>
141
     </resultMap>
140
     <select id="listGoodAnswer" resultMap="answerResult">
142
     <select id="listGoodAnswer" resultMap="answerResult">
141
         select q.qorder,q.qn,q.stuscore,q.answertype,q.useranswer,q.converted,q.useranswertxt,q.checkcomm
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
         left join t_user u on q.studentid=u.userid
147
         left join t_user u on q.studentid=u.userid
146
         where q.paperid=#{paperid} and q.classid=#{classid} and good=1
148
         where q.paperid=#{paperid} and q.classid=#{classid} and good=1
147
         order by q.qorder,convert(u.username using gbk)
149
         order by q.qorder,convert(u.username using gbk)

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

368
         from t_paper_student ps
368
         from t_paper_student ps
369
         where ps.paperid=#{paperid} and ps.classid=#{classid}
369
         where ps.paperid=#{paperid} and ps.classid=#{classid}
370
     </select>
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
 </mapper>
381
 </mapper>

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml View File

137
 
137
 
138
     <!--标记单题是否优秀作答-->
138
     <!--标记单题是否优秀作答-->
139
     <update id="updatePaperStudentGoodByPsqid">
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
     </update>
141
     </update>
142
 </mapper>
142
 </mapper>

Loading…
Cancel
Save