Browse Source

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

tags/正式版本
雍文秀 2 years ago
parent
commit
0248c495d4

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

70
     @PostMapping("/spa")
70
     @PostMapping("/spa")
71
     public ResultVo startPaperForAndroid(@RequestBody EPaperStudent eps) {
71
     public ResultVo startPaperForAndroid(@RequestBody EPaperStudent eps) {
72
         N_Utils.validation(new Object[]{eps.getEpsid(), "学生试卷id", 1});
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 View File

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

+ 9
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java View File

100
      * @Author wn
100
      * @Author wn
101
      * @Date 2022/7/27 11:48
101
      * @Date 2022/7/27 11:48
102
      **/
102
      **/
103
-    public List<Map> startPaperForAndroid(EPaperStudent eps) {
103
+    public Map startPaperForAndroid(EPaperStudent eps) {
104
         Integer epsid = eps.getEpsid();
104
         Integer epsid = eps.getEpsid();
105
+        Map map = new HashMap();
105
         //获取试卷基本信息
106
         //获取试卷基本信息
106
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
107
         EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
107
         Integer ptype = psvo.getPtype();
108
         Integer ptype = psvo.getPtype();
125
                 questions = ePaperStudentMapper.listStuPaperFjQuestionsForAndroid(epsid);
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 View File

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

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paperstudent/EPaperStudentVo.java View File

49
 
49
 
50
     private String hearfile;//听力文件
50
     private String hearfile;//听力文件
51
 
51
 
52
+    private Integer hearnum;//听力文件允许播放次数
53
+
52
     //试题集合
54
     //试题集合
53
     private List<EPaperQtype> qtypelist;
55
     private List<EPaperQtype> qtypelist;
54
 
56
 

+ 1
- 1
sexam/src/main/resources/mapper/paper/EPaperMapper.xml View File

41
     <select id="getExamPaperDetailByEsid" resultType="java.util.Map">
41
     <select id="getExamPaperDetailByEsid" resultType="java.util.Map">
42
         select e.examid,e.examname,e.gradeid,e.examtype,e.exammode,e.examstate,e.monitored,es.esid,
42
         select e.examid,e.examname,e.gradeid,e.examtype,e.exammode,e.examstate,e.monitored,es.esid,
43
                u2.username teachername,es.sdate,es.esstate,es.begintime,es.endtime,es.subjectid,es.subjectname,ep.epid,
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
         from e_base e left join e_subject es on e.examid=es.examid
45
         from e_base e left join e_subject es on e.examid=es.examid
46
         left join e_paper ep on es.esid=ep.esid
46
         left join e_paper ep on es.esid=ep.esid
47
         left join t_user u on ep.handleid=u.userid
47
         left join t_user u on ep.handleid=u.userid

+ 6
- 2
sexam/src/main/resources/mapper/paper/EPaperQtypeMapper.xml View File

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

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

51
     <!--考试试卷基本信息-->
51
     <!--考试试卷基本信息-->
52
     <select id="getExamSubjectByEpsid" resultType="com.xhkjedu.sexam.vo.paperstudent.EPaperStudentVo">
52
     <select id="getExamSubjectByEpsid" resultType="com.xhkjedu.sexam.vo.paperstudent.EPaperStudentVo">
53
         select ps.epsid,ps.examid,ps.esid,ps.classid,ps.studentid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
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
         from e_paper_student ps left join e_subject es on ps.esid=es.esid
55
         from e_paper_student ps left join e_subject es on ps.esid=es.esid
56
         left join e_base e on ps.examid=e.examid left join e_paper p on ps.epid=p.epid
56
         left join e_base e on ps.examid=e.examid left join e_paper p on ps.epid=p.epid
57
         left join t_class s on ps.classid=s.classid
57
         left join t_class s on ps.classid=s.classid
60
     <!--学生试卷题库(android)-->
60
     <!--学生试卷题库(android)-->
61
     <select id="listStuPaperQuestionsForAndroid" resultType="java.util.Map">
61
     <select id="listStuPaperQuestionsForAndroid" resultType="java.util.Map">
62
         select distinct psq.epsqid,psq.questionid,psq.qn,psq.qorder,psq.answered,psq.answertype,psq.stuanswer,
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
         q.qtypename,q.qlevel,q.snum,q.sorder,q.questionpid,mq.questionid mquestionid,mq.qstem mqstem,
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
         from e_paper_student_question psq left join e_paper_qtype_question pq on psq.eptqid=pq.eptqid
66
         from e_paper_student_question psq left join e_paper_qtype_question pq on psq.eptqid=pq.eptqid
67
         left join t_question q on psq.questionid=q.questionid
67
         left join t_question q on psq.questionid=q.questionid
68
         left join t_question mq on q.questionpid=mq.questionid
68
         left join t_question mq on q.questionpid=mq.questionid

Loading…
Cancel
Save