Browse Source

添加试卷听力题次数限制

tags/正式版本
王宁 2 years ago
parent
commit
d520eda5dd

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/model/paper/EPaper.java View File

@@ -43,6 +43,9 @@ public class EPaper extends BaseBean {
43 43
     //听力题文件地址(附件试卷)
44 44
     private String hearfile;
45 45
 
46
+    //听力允许播放次数
47
+    private Integer hearnum;
48
+
46 49
     //是否有附件0没有1有附件
47 50
     private Integer hasfile;
48 51
 

+ 1
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java View File

@@ -122,6 +122,7 @@ public class EBaseService {
122 122
             p.setScantronspace(0);
123 123
             p.setScantroncol(0);
124 124
             p.setCodenum(0);
125
+            p.setHearnum(0);
125 126
             papers.add(p);
126 127
         }
127 128
         eSubjectMapper.insertList(subjects);//考试科目

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java View File

@@ -135,6 +135,9 @@ public class EPaperQtypeService {
135 135
         }else{
136 136
             paper.setAnswered(0);
137 137
         }
138
+        if(paper.getHearnum() == null){
139
+            paper.setHearnum(0);
140
+        }
138 141
     }
139 142
 
140 143
     //保存试卷题型试题信息

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

@@ -108,8 +108,8 @@
108 108
     <!--设置试卷中试题数量-->
109 109
     <update id="updatePaperInfo">
110 110
         update e_paper set ptype=#{paper.ptype},pnum=#{paper.pnum},pscore=#{paper.pscore},answered=#{paper.answered},
111
-         hearfile=#{paper.hearfile},hasfile=#{paper.hasfile},handleid=#{paper.handleid},handletime=#{paper.handletime}
112
-        where epid=#{paper.epid}
111
+         hearfile=#{paper.hearfile},hearnum=#{paper.hearnum},hasfile=#{paper.hasfile},handleid=#{paper.handleid},
112
+         handletime=#{paper.handletime} where epid=#{paper.epid}
113 113
     </update>
114 114
 
115 115
     <!--保存答题卡pdf-->

+ 1
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/UserBasketService.java View File

@@ -82,6 +82,7 @@ public class UserBasketService {
82 82
 
83 83
             if(N_Utils.isListNotEmpty(hearqs)){
84 84
                 UserBasketVo tlvo = new UserBasketVo();
85
+                tlvo.setQtypeid("tlt");
85 86
                 tlvo.setQtypename("听力题");
86 87
                 tlvo.setPtnum(hearqs.size());
87 88
                 Double scoretotal = hearqs.stream().collect(Collectors.summingDouble(QuestionVo::getScore));

Loading…
Cancel
Save