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

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

157
                 sq.setQstate(1);
157
                 sq.setQstate(1);
158
                 sq.setBelong(question.getBelong());
158
                 sq.setBelong(question.getBelong());
159
                 sq.setHashear(0);
159
                 sq.setHashear(0);
160
+                sq.setSnum(0);
160
                 sq.setSubjectid(question.getSubjectid());
161
                 sq.setSubjectid(question.getSubjectid());
161
                 sq.setCreateid(question.getCreateid());
162
                 sq.setCreateid(question.getCreateid());
162
                 sq.setCreatetime(timestamp);
163
                 sq.setCreatetime(timestamp);

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

13
  **/
13
  **/
14
 @Data
14
 @Data
15
 public class PaperScantronQtypeVo {
15
 public class PaperScantronQtypeVo {
16
+    private Integer psqtypeid;
16
     //试题题型id
17
     //试题题型id
17
     private String qtypeid;
18
     private String qtypeid;
18
 
19
 

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

54
     //答案显示方式:1作业截至时间,2提交后显示
54
     //答案显示方式:1作业截至时间,2提交后显示
55
     private Integer showtype;
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
 
46
 
47
     //作业状态:21未布置 22 已布置
47
     //作业状态:21未布置 22 已布置
48
     private Integer paperstate;
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
 @Data
11
 @Data
12
 public class ScantronVo {
12
 public class ScantronVo {
13
     //答题卡表
13
     //答题卡表
14
-    private Integer psid;
14
+    private Integer pscaid;
15
 
15
 
16
     //试题题型id
16
     //试题题型id
17
     private String qtypeid;
17
     private String qtypeid;

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

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

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

7
     </delete>
7
     </delete>
8
 
8
 
9
     <resultMap id="qtypeSacn" type="com.xhkjedu.sstudy.vo.paper.PaperScantronQtypeVo">
9
     <resultMap id="qtypeSacn" type="com.xhkjedu.sstudy.vo.paper.PaperScantronQtypeVo">
10
+        <result property="psqtypeid" column="psqtypeid"></result>
10
         <result property="qtypeid" column="qtypeid"></result>
11
         <result property="qtypeid" column="qtypeid"></result>
11
         <result property="qtypename" column="qtypename"></result>
12
         <result property="qtypename" column="qtypename"></result>
12
         <result property="pstorder" column="pstorder"></result>
13
         <result property="pstorder" column="pstorder"></result>
13
         <result property="pstscore" column="pstscore"></result>
14
         <result property="pstscore" column="pstscore"></result>
14
         <result property="pstnum" column="pstnum"></result>
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
             <result property="qtypeid" column="qtypeid"></result>
18
             <result property="qtypeid" column="qtypeid"></result>
19
             <result property="qtypename" column="qtypename"></result>
19
             <result property="qtypename" column="qtypename"></result>
20
             <result property="ctype" column="ctype"></result>
20
             <result property="ctype" column="ctype"></result>
27
 
27
 
28
     <!-- 获取题型以及题型下试题 -->
28
     <!-- 获取题型以及题型下试题 -->
29
     <select id="listQtypeScans" resultMap="qtypeSacn">
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
         ps.qtypeid,ps.qtypename,ps.ctype,ps.psorder,ps.psscore,ps.psanswer,ps.optionnum
31
         ps.qtypeid,ps.qtypename,ps.ctype,ps.psorder,ps.psscore,ps.psanswer,ps.optionnum
32
         FROM t_paper_scantron_qtype psq LEFT JOIN t_paper_scantron ps ON psq.psqtypeid=ps.psqtypeid
32
         FROM t_paper_scantron_qtype psq LEFT JOIN t_paper_scantron ps ON psq.psqtypeid=ps.psqtypeid
33
         WHERE psq.paperid=#{paperid} ORDER BY psq.pstorder,ps.psorder
33
         WHERE psq.paperid=#{paperid} ORDER BY psq.pstorder,ps.psorder

Loading…
Cancel
Save