Browse Source

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

tags/正式版本
雍文秀 2 years ago
parent
commit
66acc33690

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/controller/paper/EPaperQtypeController.java View File

53
      **/
53
      **/
54
     @PostMapping("/up")
54
     @PostMapping("/up")
55
     public ResultVo updatePaperQtype(@RequestBody EPaper paper){
55
     public ResultVo updatePaperQtype(@RequestBody EPaper paper){
56
-        N_Utils.validation(new Object[]{paper.getEsid(),"考试科目id",1,paper.getEpid(),"试卷id",1});
56
+        N_Utils.validation(new Object[]{paper.getEsid(),"考试科目id",1});
57
         List<EPaperQtype> qtypes = paper.getQtypelist();
57
         List<EPaperQtype> qtypes = paper.getQtypelist();
58
         if(qtypes == null || qtypes.size() == 0){
58
         if(qtypes == null || qtypes.size() == 0){
59
             return new ResultVo(1,"未设置试题");
59
             return new ResultVo(1,"未设置试题");

+ 1
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/paperstudent/EPaperStudentController.java View File

64
         return new ResultVo(0,"成功获取学生试卷",psvo);
64
         return new ResultVo(0,"成功获取学生试卷",psvo);
65
     }
65
     }
66
 
66
 
67
+
67
 }
68
 }

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperMapper.java View File

47
     //根据试卷id获取考试科目基本信息
47
     //根据试卷id获取考试科目基本信息
48
     Map getESubjectByEpId(@Param("epid") Integer epid);
48
     Map getESubjectByEpId(@Param("epid") Integer epid);
49
 
49
 
50
+    //试科目获取试卷信息
50
     EExamSubjectPaperVo getPaperParamsByEsid(@Param("esid") Integer esid);
51
     EExamSubjectPaperVo getPaperParamsByEsid(@Param("esid") Integer esid);
52
+
51
     //获取考试试卷题量和分值
53
     //获取考试试卷题量和分值
52
     List<EPaper> listNumAndScoreByExamId(@Param("examid") Integer examid);
54
     List<EPaper> listNumAndScoreByExamId(@Param("examid") Integer examid);
53
 }
55
 }

+ 6
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/paperstudent/EPaperStudentQuestionMapper.java View File

3
 import com.xhkjedu.sexam.base.TkMapper;
3
 import com.xhkjedu.sexam.base.TkMapper;
4
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
4
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
5
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
5
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
6
+import com.xhkjedu.sexam.vo.paperstudent.PsqAnswerVo;
7
+import org.apache.ibatis.annotations.Param;
6
 import org.springframework.stereotype.Repository;
8
 import org.springframework.stereotype.Repository;
7
 
9
 
8
 /**
10
 /**
9
- * @Description
11
+ * @Description 学生试卷试题
10
  * @Author WN
12
  * @Author WN
11
  * Date 2022/7/27 15:07
13
  * Date 2022/7/27 15:07
12
  **/
14
  **/
13
 @Repository
15
 @Repository
14
 public interface EPaperStudentQuestionMapper extends TkMapper<EPaperStudentQuestion> {
16
 public interface EPaperStudentQuestionMapper extends TkMapper<EPaperStudentQuestion> {
17
+
18
+    //根据学生试题id获取试题正确答案
19
+    PsqAnswerVo getPaperQuestionAnswer(@Param("epsqid")Integer epsqid);
15
 }
20
 }

+ 6
- 7
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java View File

54
         EExamSubjectPaperVo espVo = ePaperMapper.getPaperParamsByEsid(paper.getEsid());
54
         EExamSubjectPaperVo espVo = ePaperMapper.getPaperParamsByEsid(paper.getEsid());
55
         if(espVo.getExamstate() > 0){
55
         if(espVo.getExamstate() > 0){
56
             return new ResultVo(1,"不能进行操作");
56
             return new ResultVo(1,"不能进行操作");
57
-        }else{
58
-            if(espVo.getEpid()!=null){
59
-                //说明已经有改考试对应的试卷,删除原试卷,重新保存
60
-                ePaperMapper.deletePaperByEpid(paper.getEpid());
61
-            }
57
+        }
58
+        if(espVo.getEpid()!=null){
59
+            //说明已经有改考试对应的试卷,删除原试卷,重新保存
60
+            ePaperMapper.deletePaperByEpid(paper.getEpid());
62
         }
61
         }
63
 
62
 
64
         List<EPaperQtype> qtypelist = paper.getQtypelist();
63
         List<EPaperQtype> qtypelist = paper.getQtypelist();
373
         }
372
         }
374
 
373
 
375
         //删除原试卷
374
         //删除原试卷
376
-        ePaperMapper.deletePaperByEpid(paper.getEpid());
375
+        ePaperMapper.deletePaperByEpid(espVo.getEpid());
377
 
376
 
378
         List<EPaperQtype> qtypelist = paper.getQtypelist();
377
         List<EPaperQtype> qtypelist = paper.getQtypelist();
379
         List<EPaperQtypeQuestion> queslist = new ArrayList<>();//存放试题
378
         List<EPaperQtypeQuestion> queslist = new ArrayList<>();//存放试题
403
             //如果提交试卷,更改科目状态
402
             //如果提交试卷,更改科目状态
404
             eSubjectMapper.updateExamSubjectState(1,espVo.getEsid());
403
             eSubjectMapper.updateExamSubjectState(1,espVo.getEsid());
405
         }
404
         }
406
-        return new ResultVo(0,"保存成功");
405
+        return new ResultVo(0,"保存成功",epid);
407
     }
406
     }
408
 
407
 
409
     /**
408
     /**

+ 95
- 19
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java View File

1
 package com.xhkjedu.sexam.service.paperstudent;
1
 package com.xhkjedu.sexam.service.paperstudent;
2
 
2
 
3
+import com.alibaba.fastjson.JSON;
3
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
4
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
4
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
5
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
5
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
6
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
7
 import com.xhkjedu.sexam.model.paper.EPaperQtypeQuestion;
8
 import com.xhkjedu.sexam.model.paper.EPaperQtypeQuestion;
8
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
9
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
9
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
10
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
11
+import com.xhkjedu.sexam.utils.ExamUtil;
10
 import com.xhkjedu.sexam.vo.paperstudent.EPaperStudentVo;
12
 import com.xhkjedu.sexam.vo.paperstudent.EPaperStudentVo;
13
+import com.xhkjedu.sexam.vo.paperstudent.PsqAnswerVo;
14
+import com.xhkjedu.utils.N_Utils;
11
 import org.springframework.stereotype.Service;
15
 import org.springframework.stereotype.Service;
12
 
16
 
13
 import javax.annotation.Resource;
17
 import javax.annotation.Resource;
14
 import java.util.ArrayList;
18
 import java.util.ArrayList;
15
-import java.util.HashMap;
16
 import java.util.List;
19
 import java.util.List;
17
 import java.util.Map;
20
 import java.util.Map;
18
 
21
 
31
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
34
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
32
 
35
 
33
     /**
36
     /**
34
-     * @Description  学生进行中考试列表
37
+     * @Description 学生进行中考试列表
35
      * @Param [eps]
38
      * @Param [eps]
36
      * @Return java.util.List<java.util.Map>
39
      * @Return java.util.List<java.util.Map>
37
      * @Author wn
40
      * @Author wn
38
      * @Date 2022/7/27 10:35
41
      * @Date 2022/7/27 10:35
39
      **/
42
      **/
40
-    public List<Map> listExamPapersForStudent(EPaperStudent eps){
43
+    public List<Map> listExamPapersForStudent(EPaperStudent eps) {
41
         return ePaperStudentMapper.listExamPapersForStudent(eps.getStudentid());
44
         return ePaperStudentMapper.listExamPapersForStudent(eps.getStudentid());
42
     }
45
     }
43
 
46
 
44
-    /** 学生已结束考试列表
47
+    /**
48
+     * 学生已结束考试列表
49
+     *
45
      * @Description
50
      * @Description
46
      * @Param [eps]
51
      * @Param [eps]
47
      * @Return java.util.List<java.util.Map>
52
      * @Return java.util.List<java.util.Map>
48
      * @Author wn
53
      * @Author wn
49
      * @Date 2022/7/27 11:34
54
      * @Date 2022/7/27 11:34
50
      **/
55
      **/
51
-    public List<Map> listExamsEndForStudent(EPaperStudent eps){
56
+    public List<Map> listExamsEndForStudent(EPaperStudent eps) {
52
         return ePaperStudentMapper.listExamsEndForStudent(eps.getStudentid());
57
         return ePaperStudentMapper.listExamsEndForStudent(eps.getStudentid());
53
     }
58
     }
54
 
59
 
59
      * @Author wn
64
      * @Author wn
60
      * @Date 2022/7/27 11:48
65
      * @Date 2022/7/27 11:48
61
      **/
66
      **/
62
-    public List<Map> startPaperForAndroid(EPaperStudent eps){
67
+    public List<Map> startPaperForAndroid(EPaperStudent eps) {
63
         Integer epsid = eps.getEpsid();
68
         Integer epsid = eps.getEpsid();
64
         //获取试卷基本信息
69
         //获取试卷基本信息
65
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
70
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
66
         Integer ptype = psvo.getPtype();
71
         Integer ptype = psvo.getPtype();
67
 
72
 
68
         List<Map> questions = null;
73
         List<Map> questions = null;
69
-        if(ptype == 1){
74
+        if (ptype == 1) {
70
             //题库试卷试题
75
             //题库试卷试题
71
             questions = ePaperStudentMapper.listStuPaperQuestionsForAndroid(epsid);
76
             questions = ePaperStudentMapper.listStuPaperQuestionsForAndroid(epsid);
72
-        }else{
77
+        } else {
73
             questions = ePaperStudentMapper.listStuPaperFjQuestionsForAndroid(epsid);
78
             questions = ePaperStudentMapper.listStuPaperFjQuestionsForAndroid(epsid);
74
         }
79
         }
75
         //判断是否生成学生试卷,未生成则需要生成,如果已生成直接返回
80
         //判断是否生成学生试卷,未生成则需要生成,如果已生成直接返回
76
-        if(questions == null || questions.size() == 0){
81
+        if (questions == null || questions.size() == 0) {
77
 
82
 
78
             //保存试卷关联信息
83
             //保存试卷关联信息
79
             savePaperStudentQuestion(psvo);
84
             savePaperStudentQuestion(psvo);
80
             //保存后重新获取返回
85
             //保存后重新获取返回
81
-            if(ptype == 1){
86
+            if (ptype == 1) {
82
                 questions = ePaperStudentMapper.listStuPaperQuestionsForAndroid(epsid);
87
                 questions = ePaperStudentMapper.listStuPaperQuestionsForAndroid(epsid);
83
-            }else{
88
+            } else {
84
                 questions = ePaperStudentMapper.listStuPaperFjQuestionsForAndroid(epsid);
89
                 questions = ePaperStudentMapper.listStuPaperFjQuestionsForAndroid(epsid);
85
             }
90
             }
86
         }
91
         }
88
     }
93
     }
89
 
94
 
90
     //保存学生试卷关联信息
95
     //保存学生试卷关联信息
91
-    private void savePaperStudentQuestion(EPaperStudentVo psvo){
96
+    private void savePaperStudentQuestion(EPaperStudentVo psvo) {
92
         //生成学生试卷
97
         //生成学生试卷
93
         List<EPaperQtypeQuestion> pqlist = ePaperQtypeMapper.listQuestionsByEpid(psvo.getEpid());
98
         List<EPaperQtypeQuestion> pqlist = ePaperQtypeMapper.listQuestionsByEpid(psvo.getEpid());
94
 
99
 
95
         List<EPaperStudentQuestion> psqlist = new ArrayList<>();
100
         List<EPaperStudentQuestion> psqlist = new ArrayList<>();
96
-        for(EPaperQtypeQuestion q : pqlist){
101
+        for (EPaperQtypeQuestion q : pqlist) {
97
             EPaperStudentQuestion sq = new EPaperStudentQuestion();
102
             EPaperStudentQuestion sq = new EPaperStudentQuestion();
98
             sq.setClassid(psvo.getClassid());
103
             sq.setClassid(psvo.getClassid());
99
             sq.setStudentid(psvo.getStudentid());
104
             sq.setStudentid(psvo.getStudentid());
120
      * @Author wn
125
      * @Author wn
121
      * @Date 2022/7/27 15:36
126
      * @Date 2022/7/27 15:36
122
      **/
127
      **/
123
-    public EPaperStudentVo startPaperForWeb(EPaperStudent eps){
128
+    public EPaperStudentVo startPaperForWeb(EPaperStudent eps) {
124
         Integer epsid = eps.getEpsid();
129
         Integer epsid = eps.getEpsid();
125
         //获取试卷基本信息
130
         //获取试卷基本信息
126
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
131
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
127
         Integer ptype = psvo.getPtype();
132
         Integer ptype = psvo.getPtype();
128
 
133
 
129
         List<EPaperQtype> questions = null;
134
         List<EPaperQtype> questions = null;
130
-        if(ptype == 1){
135
+        if (ptype == 1) {
131
             //题库试卷试题
136
             //题库试卷试题
132
             questions = ePaperStudentMapper.listStuPaperQuestionsForWeb(epsid);
137
             questions = ePaperStudentMapper.listStuPaperQuestionsForWeb(epsid);
133
-        }else{
138
+        } else {
134
             questions = ePaperStudentMapper.listStuPaperFjQuestionsForWeb(epsid);
139
             questions = ePaperStudentMapper.listStuPaperFjQuestionsForWeb(epsid);
135
         }
140
         }
136
         //判断是否生成学生试卷,未生成则需要生成,如果已生成直接返回
141
         //判断是否生成学生试卷,未生成则需要生成,如果已生成直接返回
137
-        if(questions == null || questions.size() == 0){
142
+        if (questions == null || questions.size() == 0) {
138
             //保存试卷关联信息
143
             //保存试卷关联信息
139
             savePaperStudentQuestion(psvo);
144
             savePaperStudentQuestion(psvo);
140
             //保存后重新获取返回
145
             //保存后重新获取返回
141
-            if(ptype == 1){
146
+            if (ptype == 1) {
142
                 questions = ePaperStudentMapper.listStuPaperQuestionsForWeb(epsid);
147
                 questions = ePaperStudentMapper.listStuPaperQuestionsForWeb(epsid);
143
-            }else{
148
+            } else {
144
                 questions = ePaperStudentMapper.listStuPaperFjQuestionsForWeb(epsid);
149
                 questions = ePaperStudentMapper.listStuPaperFjQuestionsForWeb(epsid);
145
             }
150
             }
146
         }
151
         }
148
         return psvo;
153
         return psvo;
149
     }
154
     }
150
 
155
 
156
+    public void saveCommitQuestion(EPaperStudentQuestion psq) {
157
+        //学生作答提交时先判断试卷是否设置的正确答案
158
+        PsqAnswerVo answerVo = ePaperStudentQuestionMapper.getPaperQuestionAnswer(psq.getEpsqid());
159
+        int timestamp = N_Utils.getSecondTimestamp();
160
+        psq.setAnswertime(timestamp);
161
+        //试卷已经设置了正确答案
162
+        if (answerVo.getAnswered() == 1){
163
+            Double stuscore = 0.0;
164
+            int coverted = 1;//是否转换0未转换1已转换2转换失败
165
+            String stuanswer = psq.getStuanswer();
166
+            List<String> stuanswers = JSON.parseArray(stuanswer, String.class);
167
+            String qanswer = answerVo.getAnswer();
168
+            List<String> qanswers = JSON.parseArray(qanswer,String.class);
169
+            if(N_Utils.isListEmpty(stuanswers) && N_Utils.isEmpty(psq.getStuanswertxt())
170
+                    && N_Utils.isEmpty(psq.getStuanswertxt())){
171
+                psq.setStuscore(stuscore);
172
+                psq.setChecked(1);
173
+                psq.setChecktime(timestamp);
174
+                psq.setAnswered(0);
175
+            }else{
176
+
177
+                int ctype = answerVo.getCtype();
178
+                if(N_Utils.isObjectiveQuestion(ctype)){
179
+                    //客观题进行批阅
180
+                    if(ctype == 1){//单选
181
+                        if(stuanswer.equalsIgnoreCase(qanswer)) {
182
+                            stuscore = answerVo.getScore();
183
+                        }
184
+                    }else if(ctype == 2){//多选
185
+                        //多选、选错不得分
186
+                        if(stuanswers.get(0).length() <= qanswer.length()){
187
+                            String[] qanswerList = qanswers.get(0).split("");
188
+                            String[] stuanswerList = stuanswers.get(0).split("");
189
+                            int rightNum = 0;//选对个数
190
+                            for(String sa : stuanswerList){
191
+                               int right = 0;
192
+                               for(String qa : qanswerList){
193
+                                   if(qa.equals(sa)){
194
+                                       right = 1;
195
+                                       rightNum ++;
196
+                                   }
197
+                               }
198
+                               if(right == 0){//说明选错
199
+                                   rightNum = 0;
200
+                                   break;
201
+                               }
202
+                            }
203
+                            if(rightNum>0){
204
+                                if(qanswerList.length == rightNum){
205
+                                    //全选对
206
+                                    stuscore = answerVo.getScore();
207
+                                }else if (qanswerList.length > rightNum){
208
+                                    //少选得半分
209
+                                    stuscore = ExamUtil.div(answerVo.getScore(),2,1);
210
+                                }
211
+                            }
212
+                        }
213
+                    }
214
+
215
+                }else{
216
+
217
+                }
218
+                psq.setAnswered(1);
219
+            }
220
+
221
+
222
+        }
223
+
224
+    }
225
+
226
+
151
 }
227
 }

+ 31
- 0
sexam/src/main/java/com/xhkjedu/sexam/utils/ExamUtil.java View File

2
 
2
 
3
 import lombok.extern.slf4j.Slf4j;
3
 import lombok.extern.slf4j.Slf4j;
4
 
4
 
5
+import java.math.BigDecimal;
5
 import java.util.Map;
6
 import java.util.Map;
6
 import java.util.concurrent.ConcurrentHashMap;
7
 import java.util.concurrent.ConcurrentHashMap;
7
 
8
 
14
 @Slf4j
15
 @Slf4j
15
 public class ExamUtil {
16
 public class ExamUtil {
16
     public static Map<String, String> uriMap = new ConcurrentHashMap<>();
17
     public static Map<String, String> uriMap = new ConcurrentHashMap<>();
18
+    // 默认除法运算精度
19
+    private static final int DEF_DIV_SCALE = 2;
20
+
21
+    /**
22
+     * 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到 小数点以后2位,以后的数字舍弃。
23
+     *
24
+     * @param v1 被除数
25
+     * @param v2 除数
26
+     * @return 两个参数的商
27
+     */
28
+    public static double div(double v1, double v2) {
29
+        return div(v1, v2, DEF_DIV_SCALE);
30
+    }
31
+
32
+    /**
33
+     * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指 定精度,以后的数字舍弃。
34
+     *
35
+     * @param v1    被除数
36
+     * @param v2    除数
37
+     * @param scale 表示表示需要精确到小数点以后几位。
38
+     * @return 两个参数的商
39
+     */
40
+    public static double div(double v1, double v2, int scale) {
41
+        if (scale < 0) {
42
+            throw new IllegalArgumentException("The   scale   must   be   a   positive   integer   or   zero");
43
+        }
44
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
45
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
46
+        return b1.divide(b2, scale, BigDecimal.ROUND_DOWN).doubleValue();
47
+    }
17
 }
48
 }

+ 21
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paperstudent/PsqAnswerVo.java View File

1
+package com.xhkjedu.sexam.vo.paperstudent;
2
+
3
+import lombok.Data;
4
+
5
+/**
6
+ * @Description 试题答案
7
+ * @Author WN
8
+ * Date 2022/7/28 9:42
9
+ **/
10
+@Data
11
+public class PsqAnswerVo {
12
+    private Integer eptqid;//试卷中试题id
13
+
14
+    private Integer ctype;//处理题型
15
+
16
+    private Double score;//试题分值
17
+
18
+    private String answer;//答案
19
+
20
+    private Integer answered;//试卷是否设置正确答案1已设置0未设置
21
+}

+ 2
- 2
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml View File

5
     <!--学生进行中考试列表-->
5
     <!--学生进行中考试列表-->
6
     <select id="listExamPapersForStudent" resultType="java.util.Map">
6
     <select id="listExamPapersForStudent" resultType="java.util.Map">
7
         select eps.epsid, es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
7
         select eps.epsid, es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
8
-        e.examname,e.gradeid,e.examtype,ep.epid
8
+        e.examname,e.gradeid,e.examtype,ep.epid,ep.ptype
9
         from e_paper_student eps left join e_subject es on eps.esid=es.esid
9
         from e_paper_student eps left join e_subject es on eps.esid=es.esid
10
          left join e_paper ep on eps.epid=ep.epid left join e_base e on eps.examid=e.examid
10
          left join e_paper ep on eps.epid=ep.epid left join e_base e on eps.examid=e.examid
11
-        where e.deleted=1 and eps.studentid=#{studentid} and e.examstate=1 GROUP BY eps.epsid
11
+        where e.deleted=1 and e.monitored=1 and eps.studentid=#{studentid} and e.examstate=1 GROUP BY eps.epsid
12
         order by abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())
12
         order by abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())
13
     </select>
13
     </select>
14
 
14
 

+ 11
- 0
sexam/src/main/resources/mapper/paperstudent/EPaperStudentQuestionMapper.xml View File

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper">
4
+
5
+    <!--根据学生试题id获取试题正确答案-->
6
+    <select id="getPaperQuestionAnswer" resultType="com.xhkjedu.sexam.vo.paperstudent.PsqAnswerVo">
7
+        select psq.eptqid,ptq.ctype,ptq.score,ptq.answer,p.answered
8
+        from e_paper_student_question psq left join e_paper_qtype_question ptq on psq.eptqid=ptq.eptqid
9
+        left join e_paper p on psq.epid=p.epid where psq.epsqid=#{epsqid}
10
+    </select>
11
+</mapper>

Loading…
Cancel
Save