Browse Source

Merge remote-tracking branch 'origin/ywx' into wn

ywx
王宁 7 months ago
parent
commit
33518e2e77

+ 3
- 4
src/main/java/com/xhkjedu/controller/EPaperVerifyController.java View File

@@ -45,12 +45,11 @@ public class EPaperVerifyController {
45 45
         return new ResultVo(0, "获取成功!", map);
46 46
     }
47 47
 
48
-    //识别正确跳过
48
+    //识别跳过
49 49
     @PostMapping("/correct_skip")
50 50
     public ResultVo correctSkip(@RequestBody EPaperStudent0608 ps) {
51
-        Integer epsid = ps.getEpsid();
52
-        N_Utils.validation(new Object[]{epsid, "考试试卷学生id", 1});
53
-        ePaperVerifyService.correctSkip(epsid);
51
+        N_Utils.validation(new Object[]{ps.getEpid(), "考试试卷id", 1, ps.getStudentid(), "学生id", 1, ps.getVerified(), "是否验证", 1});
52
+        ePaperVerifyService.correctSkip(ps);
54 53
         return new ResultVo(0, "识别成功!");
55 54
     }
56 55
 

+ 2
- 2
src/main/java/com/xhkjedu/mapper/EPaperVerifyMapper.java View File

@@ -24,8 +24,8 @@ public interface EPaperVerifyMapper {
24 24
     //获取学生试卷及试题作答
25 25
     Map getStudentPaper(@Param("ps") EPaperStudent0608 ps);
26 26
 
27
-    //识别正确跳过
28
-    void correctSkip(@Param("epsid") Integer epsid);
27
+    //识别跳过
28
+    void correctSkip(@Param("ps") EPaperStudent0608 ps);
29 29
 
30 30
     //获取试卷原试题答案
31 31
     List<EPaperQtypeQuestion> listPaperAnswer(@Param("epid") Integer epid);

+ 3
- 3
src/main/java/com/xhkjedu/service/EPaperVerifyService.java View File

@@ -37,9 +37,9 @@ public class EPaperVerifyService {
37 37
         return ePaperVerifyMapper.getStudentPaper(ps);
38 38
     }
39 39
 
40
-    //识别正确跳过
41
-    public void correctSkip(Integer epsid) {
42
-        ePaperVerifyMapper.correctSkip(epsid);
40
+    //识别跳过
41
+    public void correctSkip(EPaperStudent0608 ps) {
42
+        ePaperVerifyMapper.correctSkip(ps);
43 43
     }
44 44
 
45 45
     //识别确认

+ 4
- 3
src/main/resources/EPaperVerifyMapper.xml View File

@@ -34,10 +34,11 @@
34 34
             <result column="answered" property="answered" />
35 35
             <result column="answertype" property="answertype" />
36 36
             <result column="stuanswer" property="stuanswer" />
37
+            <result column="answertime" property="answertime" />
37 38
         </collection>
38 39
     </resultMap>
39 40
     <select id="getStudentPaper" resultMap="stuPaper">
40
-        SELECT ps.epsid,ps.epid,ps.stupic,ps.pagenum,ps.studentid,u.username,u.examno,ps.classid,c.classname,pt.qtypename,psq.epsqid,psq.eptqid,psq.qn,psq.ctype,psq.stuanswer
41
+        SELECT ps.epsid,ps.epid,ps.stupic,ps.pagenum,ps.studentid,u.username,u.examno,ps.classid,c.classname,pt.qtypename,psq.epsqid,psq.eptqid,psq.qn,psq.ctype,psq.stuanswer,psq.answertime
41 42
         from (select ps.epsid FROM e_paper_student0608 ps
42 43
         WHERE ps.examid=#{ps.examid} AND ps.subjectid=#{ps.subjectid} and ps.verified=#{ps.verified}
43 44
         <if test="ps.epsid!=null and ps.epsid!=0">ps.epsid>#{ps.epsid}</if>
@@ -51,10 +52,10 @@
51 52
         left join t_user u on ps.studentid=u.userid
52 53
         left join t_class c on ps.classid=c.classid
53 54
     </select>
54
-    <!--识别正确跳过-->
55
+    <!--识别跳过-->
55 56
     <update id="correctSkip">
56 57
         UPDATE e_paper_student0608 ps LEFT JOIN e_paper_student ps2 ON ps.epsid=ps2.epsid
57
-        SET ps.verified=1,ps.samed=1,ps2.verified=1 WHERE ps.epsid=#{epsid}
58
+        SET ps.verified=#{ps.verified},ps.samed=1,ps2.verified=#{ps.verified} WHERE ps.epid=#{ps.epid} and ps.studentid=#{ps.studentid}
58 59
     </update>
59 60
 
60 61
     <!--获取原试卷中试题正确答案-->

Loading…
Cancel
Save