Browse Source

小题分析改为单题母题分析

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

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/model/reportclass/ERclassQuestion.java View File

28
     //试题主键id
28
     //试题主键id
29
     private Integer eptqid;
29
     private Integer eptqid;
30
 
30
 
31
+    private String questionid;//试题id(单题id,母题id)
32
+
31
     //序号
33
     //序号
32
     private String qn;
34
     private String qn;
33
 
35
 

+ 6
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java View File

189
     }
189
     }
190
 
190
 
191
     //保存试卷分析--题库
191
     //保存试卷分析--题库
192
-    private void savePaperAnalyzeForQuestion(EPaper ePaper){
192
+    public void savePaperAnalyzeForQuestion(EPaper ePaper){
193
         //保存之前先清除之前的试卷分析
193
         //保存之前先清除之前的试卷分析
194
         ePaperAnalyzeMapper.deleteByEpid(ePaper.getEpid());
194
         ePaperAnalyzeMapper.deleteByEpid(ePaper.getEpid());
195
         //总体分析(主观题、客观题)
195
         //总体分析(主观题、客观题)
389
                 qpoint.setOrder(dq.getQorder());
389
                 qpoint.setOrder(dq.getQorder());
390
                 qpoint.setScore(dq.getScore());
390
                 qpoint.setScore(dq.getScore());
391
                 qpoint.setQlevel(dq.getQlevel());
391
                 qpoint.setQlevel(dq.getQlevel());
392
+                qpoint.setQuestionid(dq.getQuestionid());
392
                 if(qnstr == null){
393
                 if(qnstr == null){
393
                     qpoint.setQns(new String[]{dq.getQn()});
394
                     qpoint.setQns(new String[]{dq.getQn()});
394
                 }else{
395
                 }else{
439
                     qpoint.setName(pointmap.get("pointname").toString());
440
                     qpoint.setName(pointmap.get("pointname").toString());
440
                     qpoint.setOrder(dq.getQorder());
441
                     qpoint.setOrder(dq.getQorder());
441
                     qpoint.setQlevel(dq.getQlevel());
442
                     qpoint.setQlevel(dq.getQlevel());
443
+                    qpoint.setQuestionid(dq.getQuestionid());
444
+
442
 
445
 
443
                     Map quesmap = new HashMap();//试题对应知识点
446
                     Map quesmap = new HashMap();//试题对应知识点
444
                     quesmap.put("pointid",pointmap.get("pointid").toString());
447
                     quesmap.put("pointid",pointmap.get("pointid").toString());
518
         qtype.setOrder(dq.getQorder());
521
         qtype.setOrder(dq.getQorder());
519
         qtype.setScore(dq.getScore());
522
         qtype.setScore(dq.getScore());
520
         qtype.setQlevel(dq.getQlevel());
523
         qtype.setQlevel(dq.getQlevel());
524
+        qtype.setQuestionid(dq.getQuestionid());
521
         if(qnstr == null){
525
         if(qnstr == null){
522
             qtype.setQns(new String[]{dq.getQn()});
526
             qtype.setQns(new String[]{dq.getQn()});
523
         }else{
527
         }else{
539
         qtype.setOrder(dq.getQorder());
543
         qtype.setOrder(dq.getQorder());
540
         qtype.setScore(dq.getScore());
544
         qtype.setScore(dq.getScore());
541
         qtype.setQlevel(dq.getQlevel());
545
         qtype.setQlevel(dq.getQlevel());
546
+        qtype.setQuestionid(dq.getQuestionid());
542
         if(qnstr == null){
547
         if(qnstr == null){
543
             qtype.setQns(new String[]{dq.getQn()});
548
             qtype.setQns(new String[]{dq.getQn()});
544
         }else{
549
         }else{

+ 4
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

1497
                 List<Integer> eptqids = (List<Integer>) quesmap.get("eptqids");
1497
                 List<Integer> eptqids = (List<Integer>) quesmap.get("eptqids");
1498
                 Integer qlevel = Integer.parseInt(quesmap.get("qlevel").toString());
1498
                 Integer qlevel = Integer.parseInt(quesmap.get("qlevel").toString());
1499
                 String order = quesmap.get("order").toString();//试题母题题号
1499
                 String order = quesmap.get("order").toString();//试题母题题号
1500
+                String questionid = quesmap.get("questionid").toString();
1500
                 List<String> qnslist = (List<String>) quesmap.get("qns");
1501
                 List<String> qnslist = (List<String>) quesmap.get("qns");
1501
                 qns = qns + order + ",";
1502
                 qns = qns + order + ",";
1502
 
1503
 
1503
                 //获取集合中对应子题集合的数据
1504
                 //获取集合中对应子题集合的数据
1504
                 List<EPaperStudentQuestion> qgstulist = null;
1505
                 List<EPaperStudentQuestion> qgstulist = null;
1505
-                Integer eptqid = eptqids.get(0);
1506
+                Integer eptqid = null;
1506
                 if (qlevel == 1) {
1507
                 if (qlevel == 1) {
1507
                     //单题时直接为试题id
1508
                     //单题时直接为试题id
1509
+                    eptqid = eptqids.get(0);
1508
                     Integer teptqid = eptqid;
1510
                     Integer teptqid = eptqid;
1509
                     qgstulist = paperstulist.stream().filter(s -> teptqid.equals(s.getEptqid())).collect(Collectors.toList());
1511
                     qgstulist = paperstulist.stream().filter(s -> teptqid.equals(s.getEptqid())).collect(Collectors.toList());
1510
                 } else {
1512
                 } else {
1591
                     ercq.setSubjectid(examPaperClassVo.getSubjectid());
1593
                     ercq.setSubjectid(examPaperClassVo.getSubjectid());
1592
                     ercq.setEpid(examPaperClassVo.getEpid());
1594
                     ercq.setEpid(examPaperClassVo.getEpid());
1593
                     ercq.setEptqid(eptqid);
1595
                     ercq.setEptqid(eptqid);
1596
+                    ercq.setQuestionid(questionid);
1594
                     ercq.setQn(String.join(",", qnslist));
1597
                     ercq.setQn(String.join(",", qnslist));
1595
                     ercq.setQorder(Integer.parseInt(order));
1598
                     ercq.setQorder(Integer.parseInt(order));
1596
                     ercq.setClassscore(qcstuscore);
1599
                     ercq.setClassscore(qcstuscore);

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/QuestionOrderVo.java View File

22
     //试题题号(单题、母题) (子题不占题号)
22
     //试题题号(单题、母题) (子题不占题号)
23
     private Integer order;
23
     private Integer order;
24
 
24
 
25
+    private String questionid;//试题id(单题id,母题id)
26
+
25
     //试题题号对应子题在试卷中id(单题时数组长度为1)
27
     //试题题号对应子题在试卷中id(单题时数组长度为1)
26
     private Integer[] eptqids;
28
     private Integer[] eptqids;
27
 
29
 

Loading…
Cancel
Save