Browse Source

答题卡作业

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

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

@@ -121,6 +121,7 @@ public class PaperService {
121 121
             paper.setPapernum(scanlist.size());
122 122
             Double paperscore = scanlist.stream().collect(Collectors.summingDouble(TPaperScantron::getPsscore));
123 123
             paper.setPaperscore(paperscore);
124
+            paper.setPapertype(2);
124 125
 
125 126
             //修改作业基本信息
126 127
             paperMapper.updatePaper(paper);
@@ -142,8 +143,6 @@ public class PaperService {
142 143
 
143 144
                 rtn = true;
144 145
             }
145
-
146
-
147 146
         }catch (Exception e){
148 147
             log.error("修改答题卡作业失败:" + e.getMessage());
149 148
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -427,6 +426,7 @@ public class PaperService {
427 426
         ps.setDirectorid(paper.getDirectorid());
428 427
         ps.setDirectorname(paper.getDirectorname());
429 428
         ps.setShowtype(paper.getShowtype());
429
+        ps.setHearfile(paper.getHearfile());
430 430
 
431 431
         List<TPaperFile> fils = paperFileService.listObjsByPaperid(paperid);
432 432
         ps.setPfiles(fils);

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

@@ -157,6 +157,7 @@ public class QuestionService {
157 157
                 sq.setQstate(1);
158 158
                 sq.setBelong(question.getBelong());
159 159
                 sq.setHashear(0);
160
+                sq.setSnum(0);
160 161
                 sq.setSubjectid(question.getSubjectid());
161 162
                 sq.setCreateid(question.getCreateid());
162 163
                 sq.setCreatetime(timestamp);

+ 1
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paper/PaperScantronQtypeVo.java View File

@@ -13,6 +13,7 @@ import java.util.List;
13 13
  **/
14 14
 @Data
15 15
 public class PaperScantronQtypeVo {
16
+    private Integer psqtypeid;
16 17
     //试题题型id
17 18
     private String qtypeid;
18 19
 

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paper/PaperScantronVo.java View File

@@ -54,4 +54,6 @@ public class PaperScantronVo {
54 54
     //答案显示方式:1作业截至时间,2提交后显示
55 55
     private Integer showtype;
56 56
 
57
+    private String hearfile;//听力材料地址
58
+
57 59
 }

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paper/PaperVo.java View File

@@ -46,4 +46,6 @@ public class PaperVo {
46 46
 
47 47
     //作业状态:21未布置 22 已布置
48 48
     private Integer paperstate;
49
+
50
+    private String hearfile;//听力文件
49 51
 }

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paper/ScantronVo.java View File

@@ -11,7 +11,7 @@ import lombok.Data;
11 11
 @Data
12 12
 public class ScantronVo {
13 13
     //答题卡表
14
-    private Integer psid;
14
+    private Integer pscaid;
15 15
 
16 16
     //试题题型id
17 17
     private String qtypeid;

+ 1
- 1
sstudy/src/main/resources/mapper/paper/PaperMapper.xml View File

@@ -44,7 +44,7 @@
44 44
     <!--详情-->
45 45
     <select id="findById" resultType="com.xhkjedu.sstudy.vo.paper.PaperVo">
46 46
         select p.paperid,p.papername,p.papernum,p.paperscore,p.createtime,u.username createname,
47
-        p.papertype,p.comm,p.paperclass,p.directorid,p.paperstate
47
+        p.papertype,p.comm,p.paperclass,p.directorid,p.paperstate,p.hearfile
48 48
         ,(select showtype from t_paper_group pg where pg.paperid=p.paperid limit 1)showtype
49 49
         from t_paper p left join t_user u on u.userid=p.createid
50 50
         where p.paperid=#{paperid} limit 1

+ 4
- 4
sstudy/src/main/resources/mapper/paper/PaperScantronQtypeMapper.xml View File

@@ -7,14 +7,14 @@
7 7
     </delete>
8 8
 
9 9
     <resultMap id="qtypeSacn" type="com.xhkjedu.sstudy.vo.paper.PaperScantronQtypeVo">
10
+        <result property="psqtypeid" column="psqtypeid"></result>
10 11
         <result property="qtypeid" column="qtypeid"></result>
11 12
         <result property="qtypename" column="qtypename"></result>
12 13
         <result property="pstorder" column="pstorder"></result>
13 14
         <result property="pstscore" column="pstscore"></result>
14 15
         <result property="pstnum" column="pstnum"></result>
15
-        <result property="ctype" column="ctype"></result>
16
-        <collection property="scantrons" ofType="com.xhkjedu.sstudy.vo.paper.ScantronVo">
17
-            <result property="psid" column="psid"></result>
16
+        <collection property="scantrons" ofType="com.xhkjedu.sstudy.vo.paper.ScantronVo" javaType="java.util.List">
17
+            <result property="pscaid" column="pscaid"></result>
18 18
             <result property="qtypeid" column="qtypeid"></result>
19 19
             <result property="qtypename" column="qtypename"></result>
20 20
             <result property="ctype" column="ctype"></result>
@@ -27,7 +27,7 @@
27 27
 
28 28
     <!-- 获取题型以及题型下试题 -->
29 29
     <select id="listQtypeScans" resultMap="qtypeSacn">
30
-        SELECT psq.qtypeid,psq.qtypename,psq.pstorder,psq.pstscore,psq.pstnum,
30
+        SELECT psq.psqtypeid,psq.qtypeid,psq.qtypename,psq.pstorder,psq.pstscore,psq.pstnum,ps.pscaid,
31 31
         ps.qtypeid,ps.qtypename,ps.ctype,ps.psorder,ps.psscore,ps.psanswer,ps.optionnum
32 32
         FROM t_paper_scantron_qtype psq LEFT JOIN t_paper_scantron ps ON psq.psqtypeid=ps.psqtypeid
33 33
         WHERE psq.paperid=#{paperid} ORDER BY psq.pstorder,ps.psorder

Loading…
Cancel
Save