Browse Source

完善

ywx
王宁 6 months ago
parent
commit
471bd56807

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

40
     //获取学生试卷及试题作答
40
     //获取学生试卷及试题作答
41
     @PostMapping("/get_stuPaper")
41
     @PostMapping("/get_stuPaper")
42
     public ResultVo getStudentPaper(@RequestBody EPaperStudent0608 ps) {
42
     public ResultVo getStudentPaper(@RequestBody EPaperStudent0608 ps) {
43
-        N_Utils.validation(new Object[]{ps.getExamid(), "考试id", 1, ps.getSubjectid(), "科目", 2});
43
+        N_Utils.validation(new Object[]{ps.getExamid(), "考试id", 1, ps.getEpid(), "考试科目", 1});
44
         Map map = ePaperVerifyService.getStudentPaper(ps);
44
         Map map = ePaperVerifyService.getStudentPaper(ps);
45
         return new ResultVo(0, "获取成功!", map);
45
         return new ResultVo(0, "获取成功!", map);
46
     }
46
     }

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

64
 
64
 
65
         for(EPaperStudentQuestion psq : stuQues){
65
         for(EPaperStudentQuestion psq : stuQues){
66
             EPaperQtypeQuestion pqtypeQues = questions.stream().filter(a -> a.getEptqid().equals(psq.getEptqid())).findFirst().orElse(null);
66
             EPaperQtypeQuestion pqtypeQues = questions.stream().filter(a -> a.getEptqid().equals(psq.getEptqid())).findFirst().orElse(null);
67
+            if(!N_Utils.isTrueInteger(psq.getAnswertype())){
68
+                psq.setAnswertype(1);
69
+            }
67
             setCommitQuestion(psq,pqtypeQues);
70
             setCommitQuestion(psq,pqtypeQues);
68
 
71
 
69
             paperscore = N_Utils.add(paperscore, psq.getStuscore());
72
             paperscore = N_Utils.add(paperscore, psq.getStuscore());

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

40
     <select id="getStudentPaper" resultMap="stuPaper">
40
     <select id="getStudentPaper" resultMap="stuPaper">
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
         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
42
         from (select ps.epsid FROM e_paper_student0608 ps
42
         from (select ps.epsid FROM e_paper_student0608 ps
43
-        WHERE ps.examid=#{ps.examid} AND ps.subjectid=#{ps.subjectid} and ps.verified=#{ps.verified}
43
+        WHERE ps.examid=#{ps.examid} AND ps.epid=#{ps.epid} and ps.verified=#{ps.verified} and ps.sstate!=0
44
         <if test="ps.epsid!=null and ps.epsid!=0">ps.epsid>#{ps.epsid}</if>
44
         <if test="ps.epsid!=null and ps.epsid!=0">ps.epsid>#{ps.epsid}</if>
45
         <if test="ps.classid!=null and ps.classid!=0">ps.classid=#{ps.classid}</if>
45
         <if test="ps.classid!=null and ps.classid!=0">ps.classid=#{ps.classid}</if>
46
         <if test="ps.studentid!=null and ps.studentid!=0">ps.studentid=#{ps.studentid}</if>
46
         <if test="ps.studentid!=null and ps.studentid!=0">ps.studentid=#{ps.studentid}</if>
76
                 ,answertime=#{q.answertime}
76
                 ,answertime=#{q.answertime}
77
             </if>
77
             </if>
78
             ,stuscore=#{q.stuscore}
78
             ,stuscore=#{q.stuscore}
79
-            ,checked=#{q.checked}
79
+            <if test="q.checke!=null">
80
+                ,checked=#{q.checked}
81
+            </if>
80
             <if test="q.checktime!=null">
82
             <if test="q.checktime!=null">
81
                 ,checktime=#{q.checktime}
83
                 ,checktime=#{q.checktime}
82
             </if>
84
             </if>

Loading…
Cancel
Save