Browse Source

试卷添加答题卡数量

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

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

49
     //答题卡文件
49
     //答题卡文件
50
     private String scantronfile;
50
     private String scantronfile;
51
 
51
 
52
+    //答题卡张数
53
+    private Integer scantronnum;
54
+
52
     private String scantronpdf;//答题卡pdf
55
     private String scantronpdf;//答题卡pdf
53
 
56
 
54
     //答题卡注意事项
57
     //答题卡注意事项

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

117
             p.setPscore(0.0);
117
             p.setPscore(0.0);
118
             p.setAnswered(0);
118
             p.setAnswered(0);
119
             p.setCorrecttype(0);
119
             p.setCorrecttype(0);
120
+            p.setScantronnum(0);
121
+            p.setScantronspace(0);
122
+            p.setScantroncol(0);
123
+            p.setCodenum(0);
120
             papers.add(p);
124
             papers.add(p);
121
         }
125
         }
122
         eSubjectMapper.insertList(subjects);//考试科目
126
         eSubjectMapper.insertList(subjects);//考试科目

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

687
     @Transactional(rollbackFor = Exception.class)
687
     @Transactional(rollbackFor = Exception.class)
688
     public void savePaperScan(EPaper paper){
688
     public void savePaperScan(EPaper paper){
689
         List<EPaperQtypeQuestion> questions = paper.getQuestions();
689
         List<EPaperQtypeQuestion> questions = paper.getQuestions();
690
+        if(N_Utils.isNotEmpty(paper.getScantronfile())){
691
+            List<String> scanfiles = JSON.parseArray(paper.getScantronfile(),String.class);
692
+            int pn = scanfiles.size() / 2;//答题卡的张数
693
+            paper.setScantronnum(pn);
694
+        }
690
         ePaperMapper.updatePaperScantron(paper);
695
         ePaperMapper.updatePaperScantron(paper);
691
         ePaperQtypeMapper.updateBatchQuestionForScan(questions);
696
         ePaperQtypeMapper.updateBatchQuestionForScan(questions);
692
         if(paper.getPstate() == 1){
697
         if(paper.getPstate() == 1){

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

90
 
90
 
91
     <!--修改设置答题卡-->
91
     <!--修改设置答题卡-->
92
     <update id="updatePaperScantron">
92
     <update id="updatePaperScantron">
93
-        update e_paper set scantronfile=#{paper.scantronfile},scantronnote=#{paper.scantronnote}
93
+        update e_paper set scantronfile=#{paper.scantronfile},scantronnote=#{paper.scantronnote},scantronnum=#{paper.scantronnum}
94
         ,scantronwh=#{paper.scantronwh},scantroncol=#{paper.scantroncol},cantronmiss=#{paper.cantronmiss},
94
         ,scantronwh=#{paper.scantronwh},scantroncol=#{paper.scantroncol},cantronmiss=#{paper.cantronmiss},
95
         cantronbad=#{paper.cantronbad},codetype=#{paper.codetype},codenum=#{paper.codenum},
95
         cantronbad=#{paper.cantronbad},codetype=#{paper.codetype},codenum=#{paper.codenum},
96
         cantroncode=#{paper.cantroncode},cantronpage=#{paper.cantronpage},cantronbarcode=#{paper.cantronbarcode},
96
         cantroncode=#{paper.cantroncode},cantronpage=#{paper.cantronpage},cantronbarcode=#{paper.cantronbarcode},

Loading…
Cancel
Save