소스 검색

完善

ywx
王宁 6 달 전
부모
커밋
471bd56807

+ 1
- 1
src/main/java/com/xhkjedu/controller/EPaperVerifyController.java 파일 보기

@@ -40,7 +40,7 @@ public class EPaperVerifyController {
40 40
     //获取学生试卷及试题作答
41 41
     @PostMapping("/get_stuPaper")
42 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 44
         Map map = ePaperVerifyService.getStudentPaper(ps);
45 45
         return new ResultVo(0, "获取成功!", map);
46 46
     }

+ 3
- 0
src/main/java/com/xhkjedu/service/EPaperVerifyService.java 파일 보기

@@ -64,6 +64,9 @@ public class EPaperVerifyService {
64 64
 
65 65
         for(EPaperStudentQuestion psq : stuQues){
66 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 70
             setCommitQuestion(psq,pqtypeQues);
68 71
 
69 72
             paperscore = N_Utils.add(paperscore, psq.getStuscore());

+ 4
- 2
src/main/resources/EPaperVerifyMapper.xml 파일 보기

@@ -40,7 +40,7 @@
40 40
     <select id="getStudentPaper" resultMap="stuPaper">
41 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 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 44
         <if test="ps.epsid!=null and ps.epsid!=0">ps.epsid>#{ps.epsid}</if>
45 45
         <if test="ps.classid!=null and ps.classid!=0">ps.classid=#{ps.classid}</if>
46 46
         <if test="ps.studentid!=null and ps.studentid!=0">ps.studentid=#{ps.studentid}</if>
@@ -76,7 +76,9 @@
76 76
                 ,answertime=#{q.answertime}
77 77
             </if>
78 78
             ,stuscore=#{q.stuscore}
79
-            ,checked=#{q.checked}
79
+            <if test="q.checke!=null">
80
+                ,checked=#{q.checked}
81
+            </if>
80 82
             <if test="q.checktime!=null">
81 83
                 ,checktime=#{q.checktime}
82 84
             </if>

Loading…
취소
저장