Parcourir la source

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

tags/正式版本
雍文秀 il y a 2 ans
Parent
révision
0248c495d4

+ 2
- 2
sexam/src/main/java/com/xhkjedu/sexam/controller/paperstudent/EPaperStudentController.java Voir le fichier

@@ -70,8 +70,8 @@ public class EPaperStudentController {
70 70
     @PostMapping("/spa")
71 71
     public ResultVo startPaperForAndroid(@RequestBody EPaperStudent eps) {
72 72
         N_Utils.validation(new Object[]{eps.getEpsid(), "学生试卷id", 1});
73
-        List<Map> list = ePaperStudentService.startPaperForAndroid(eps);
74
-        return new ResultVo(0, "成功获取学生试卷", list);
73
+        Map map = ePaperStudentService.startPaperForAndroid(eps);
74
+        return new ResultVo(0, "成功获取学生试卷", map);
75 75
     }
76 76
 
77 77
     //提交单题

+ 4
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java Voir le fichier

@@ -135,6 +135,7 @@ public class EPaperQtypeService {
135 135
         }else{
136 136
             paper.setAnswered(0);
137 137
         }
138
+
138 139
         if(paper.getHearnum() == null){
139 140
             paper.setHearnum(0);
140 141
         }
@@ -284,6 +285,7 @@ public class EPaperQtypeService {
284 285
                 }else{
285 286
                     mq.setMctype(112);
286 287
                 }
288
+
287 289
                 mquestions.add(mq);
288 290
             }
289 291
         }
@@ -489,6 +491,8 @@ public class EPaperQtypeService {
489 491
                        mq.setQanswer(q.getMqanswer());
490 492
                        mq.setQorder(q.getQorder());
491 493
                        mq.setQlevel(q.getMqlevel());
494
+                       mq.setMhashear(q.getMhashear());
495
+                       mq.setMhearfile(q.getMhearfile());
492 496
                        List<EPaperQPointVo> allpoint = new ArrayList<>();
493 497
                        for(EPaperQtypeQuestionVo sq : sonqlist){
494 498
                            List<EPaperQPointVo> sqpoints = sq.getPoints();

+ 9
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java Voir le fichier

@@ -100,8 +100,9 @@ public class EPaperStudentService {
100 100
      * @Author wn
101 101
      * @Date 2022/7/27 11:48
102 102
      **/
103
-    public List<Map> startPaperForAndroid(EPaperStudent eps) {
103
+    public Map startPaperForAndroid(EPaperStudent eps) {
104 104
         Integer epsid = eps.getEpsid();
105
+        Map map = new HashMap();
105 106
         //获取试卷基本信息
106 107
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
107 108
         Integer ptype = psvo.getPtype();
@@ -125,8 +126,14 @@ public class EPaperStudentService {
125 126
                 questions = ePaperStudentMapper.listStuPaperFjQuestionsForAndroid(epsid);
126 127
             }
127 128
         }
129
+        if(ptype == 2){
130
+            List<Map> files = ePaperFileMapper.listPaperFiles(psvo.getEpid());
131
+            map.put("files",files);
132
+        }
128 133
 
129
-        return questions;
134
+        map.put("paper",psvo);
135
+        map.put("questions",questions);
136
+        return map;
130 137
     }
131 138
 
132 139
     //保存学生试卷关联信息

+ 12
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/EPaperQtypeQuestionVo.java Voir le fichier

@@ -57,6 +57,12 @@ public class EPaperQtypeQuestionVo {
57 57
     //难易度
58 58
     private Integer complexity;
59 59
 
60
+    //是否是听力题0不是1是
61
+    private Integer hashear;
62
+
63
+    //听力题文件地址
64
+    private String hearfile;
65
+
60 66
     //试题类型1单体2母题3子题
61 67
     private Integer qlevel;
62 68
 
@@ -96,6 +102,12 @@ public class EPaperQtypeQuestionVo {
96 102
     //母题类型
97 103
     private Integer mqlevel;
98 104
 
105
+    //是否是听力题0不是1是
106
+    private Integer mhashear;
107
+
108
+    //听力题文件地址
109
+    private String mhearfile;
110
+
99 111
     //试题关联知识点
100 112
     private List<EPaperQPointVo> points = new ArrayList<>();
101 113
 

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paperstudent/EPaperStudentVo.java Voir le fichier

@@ -49,6 +49,8 @@ public class EPaperStudentVo {
49 49
 
50 50
     private String hearfile;//听力文件
51 51
 
52
+    private Integer hearnum;//听力文件允许播放次数
53
+
52 54
     //试题集合
53 55
     private List<EPaperQtype> qtypelist;
54 56
 

+ 1
- 1
sexam/src/main/resources/mapper/paper/EPaperMapper.xml Voir le fichier

@@ -41,7 +41,7 @@
41 41
     <select id="getExamPaperDetailByEsid" resultType="java.util.Map">
42 42
         select e.examid,e.examname,e.gradeid,e.examtype,e.exammode,e.examstate,e.monitored,es.esid,
43 43
                u2.username teachername,es.sdate,es.esstate,es.begintime,es.endtime,es.subjectid,es.subjectname,ep.epid,
44
-               ep.ptype,ep.pnum,ep.pscore,ep.answered,ep.hearfile,ep.hasfile,ep.handleid,ep.handletime,u.username as handlename
44
+               ep.ptype,ep.pnum,ep.pscore,ep.answered,ep.hearnum,ep.hearfile,ep.hasfile,ep.handleid,ep.handletime,u.username as handlename
45 45
         from e_base e left join e_subject es on e.examid=es.examid
46 46
         left join e_paper ep on es.esid=ep.esid
47 47
         left join t_user u on ep.handleid=u.userid

+ 6
- 2
sexam/src/main/resources/mapper/paper/EPaperQtypeMapper.xml Voir le fichier

@@ -27,6 +27,8 @@
27 27
             <result column="qanswer" property="qanswer"></result>
28 28
             <result column="qanalyze" property="qanalyze"></result>
29 29
             <result column="complexity" property="complexity"></result>
30
+            <result column="hashear" property="hashear"></result>
31
+            <result column="hearfile" property="hearfile"></result>
30 32
             <result column="qlevel" property="qlevel"></result>
31 33
             <result column="sorder" property="sorder"></result>
32 34
             <result column="snum" property="snum"></result>
@@ -39,6 +41,8 @@
39 41
             <result column="mqanswer" property="mqanswer"></result>
40 42
             <result column="mqanalyze" property="mqanalyze"></result>
41 43
             <result column="mqlevel" property="mqlevel"></result>
44
+            <result column="mhashear" property="mhashear"></result>
45
+            <result column="mhearfile" property="mhearfile"></result>
42 46
             <collection property="points" ofType="com.xhkjedu.sexam.vo.paper.EPaperQPointVo" javaType="java.util.List"
43 47
                         column="{questionid=questionid,qlevel=qlevel,questionpid=questionpid" select="listQuestionPoints">
44 48
                 <result column="pointid" property="pointid"></result>
@@ -50,9 +54,9 @@
50 54
     <select id="listPaperQtypeQuestions" resultMap="qtypesQuestion">
51 55
         select t.eptid,t.epid,t.ctype,t.eptname,t.eptnum,t.eptorder,t.eptscore,tq.eptqid,tq.questionid,tq.answer,
52 56
                tq.score,tq.qn,tq.qorder,q.qtypeid,q.qtypename,q.ctype qctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,
53
-               q.complexity,q.qlevel,q.sorder,q.questionpid,fq.snum,fq.qstem as mqstem,fq.complexity as mcomplexity,
57
+               q.complexity,q.hashear,q.hearfile,q.qlevel,q.sorder,q.questionpid,fq.snum,fq.qstem as mqstem,fq.complexity as mcomplexity,
54 58
                fq.qtypeid mqtypeid,fq.qtypename mqtypename,fq.ctype mctype,fq.qanalyze mqanalyze,fq.qanswer mqanswer,
55
-               fq.qlevel mqlevel
59
+               fq.qlevel mqlevel,fq.hashear mhashear,fq.hearfile mhearfile
56 60
         from e_paper_qtype_question tq left join e_paper_qtype t on t.eptid=tq.eptid
57 61
         left join t_question q on tq.questionid=q.questionid
58 62
         left JOIN t_question fq on q.questionpid=fq.questionid

+ 3
- 3
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml Voir le fichier

@@ -51,7 +51,7 @@
51 51
     <!--考试试卷基本信息-->
52 52
     <select id="getExamSubjectByEpsid" resultType="com.xhkjedu.sexam.vo.paperstudent.EPaperStudentVo">
53 53
         select ps.epsid,ps.examid,ps.esid,ps.classid,ps.studentid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
54
-               e.examname,e.gradeid,ps.epid,p.ptype,p.pnum,p.pscore,p.hearfile,s.classname
54
+               e.examname,e.gradeid,ps.epid,p.ptype,p.pnum,p.pscore,p.hearfile,p.hearnum,s.classname
55 55
         from e_paper_student ps left join e_subject es on ps.esid=es.esid
56 56
         left join e_base e on ps.examid=e.examid left join e_paper p on ps.epid=p.epid
57 57
         left join t_class s on ps.classid=s.classid
@@ -60,9 +60,9 @@
60 60
     <!--学生试卷题库(android)-->
61 61
     <select id="listStuPaperQuestionsForAndroid" resultType="java.util.Map">
62 62
         select distinct psq.epsqid,psq.questionid,psq.qn,psq.qorder,psq.answered,psq.answertype,psq.stuanswer,
63
-        psq.stuanswertxt,psq.eptqid,pq.score,q.qstem,q.qoption,q.ctype,q.hearfile,q.qtypeid,
63
+        psq.stuanswertxt,psq.eptqid,pq.score,q.qstem,q.qoption,q.ctype,q.hashear,q.hearfile,q.qtypeid,
64 64
         q.qtypename,q.qlevel,q.snum,q.sorder,q.questionpid,mq.questionid mquestionid,mq.qstem mqstem,
65
-        mq.qoption mqoption,mq.ctype mctype,mq.qtypeid mqtypeid,mq.qtypename mqtypename
65
+        mq.qoption mqoption,mq.ctype mctype,mq.qtypeid mqtypeid,mq.qtypename mqtypename,mq.hashear mhashear,mq.hearfile mhearfile
66 66
         from e_paper_student_question psq left join e_paper_qtype_question pq on psq.eptqid=pq.eptqid
67 67
         left join t_question q on psq.questionid=q.questionid
68 68
         left join t_question mq on q.questionpid=mq.questionid

Chargement…
Annuler
Enregistrer