Browse Source

题库作业添加字段

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

+ 1
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java View File

127
         }
127
         }
128
     }
128
     }
129
 
129
 
130
+    //保存题库作业
130
     @PostMapping("/saveq")
131
     @PostMapping("/saveq")
131
     public ResultVo saveQuestionPaper(@RequestBody TPaper paper) {
132
     public ResultVo saveQuestionPaper(@RequestBody TPaper paper) {
132
         String questionStr = paper.getQuestionStr();
133
         String questionStr = paper.getQuestionStr();

+ 12
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/model/paper/TPaperQtypeQuestion.java View File

40
 
40
 
41
     private String qn;//显示题号
41
     private String qn;//显示题号
42
 
42
 
43
+    //复合题对应母题id
44
+    private String questionpid;
45
+
46
+    //复合题母题分值
47
+    private double mscore;
48
+
49
+    //母题题型id
50
+    private String mqtypeid;
51
+
52
+    //母题题型名称
53
+    private String mqtypename;
54
+
43
     @Transient
55
     @Transient
44
     //处理题型1单选题2多选题3主观题4判断对错5判断✔6判断TF7完形填空8阅读理解
56
     //处理题型1单选题2多选题3主观题4判断对错5判断✔6判断TF7完形填空8阅读理解
45
     private Integer ctype;
57
     private Integer ctype;

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

363
                     ptq.setCreatetime(N_Utils.getSecondTimestamp());
363
                     ptq.setCreatetime(N_Utils.getSecondTimestamp());
364
                     ptq.setSchoolid(schoolid);
364
                     ptq.setSchoolid(schoolid);
365
                     ptq.setQn(ptq.getPtqorder().toString());
365
                     ptq.setQn(ptq.getPtqorder().toString());
366
+                    ptq.setQuestionpid(q.getQuestionid());
367
+                    ptq.setMscore(q.getScore());
368
+                    ptq.setMqtypeid(q.getQtypeid());
369
+                    ptq.setMqtypename(q.getQtypename());
366
                     ptqs.add(ptq);
370
                     ptqs.add(ptq);
367
                 } else {
371
                 } else {
368
                     Integer sorder = 1;
372
                     Integer sorder = 1;
377
                         ptq.setCreatetime(N_Utils.getSecondTimestamp());
381
                         ptq.setCreatetime(N_Utils.getSecondTimestamp());
378
                         ptq.setSchoolid(schoolid);
382
                         ptq.setSchoolid(schoolid);
379
                         ptq.setQn(qorder+"."+sorder);
383
                         ptq.setQn(qorder+"."+sorder);
384
+                        ptq.setQuestionpid(q.getQuestionid());
385
+                        ptq.setMscore(q.getScore());
386
+                        ptq.setMqtypeid(q.getQtypeid());
387
+                        ptq.setMqtypename(q.getQtypename());
380
                         sorder++;
388
                         sorder++;
381
                         ptqs.add(ptq);
389
                         ptqs.add(ptq);
382
                     }
390
                     }

Loading…
Cancel
Save