Преглед изворни кода

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

tags/正式版本
王宁 пре 2 година
родитељ
комит
bde875636a

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/model/reportclass/ERclassQuestion.java Прегледај датотеку

@@ -28,6 +28,8 @@ public class ERclassQuestion extends BaseBean {
28 28
     //试题主键id
29 29
     private Integer eptqid;
30 30
 
31
+    private String questionid;//试题id(单题id,母题id)
32
+
31 33
     //序号
32 34
     private String qn;
33 35
 

+ 6
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java Прегледај датотеку

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

+ 4
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java Прегледај датотеку

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

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/QuestionOrderVo.java Прегледај датотеку

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

Loading…
Откажи
Сачувај