Переглянути джерело

发布时线下关联试题

tags/正式版本
王宁 2 роки тому
джерело
коміт
81f9d39c51

+ 18
- 3
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java Переглянути файл

@@ -8,6 +8,7 @@ import com.xhkjedu.sexam.mapper.exam.ESubjectMapper;
8 8
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
9 9
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
10 10
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
11
+import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
11 12
 import com.xhkjedu.sexam.mapper.system.UserMapper;
12 13
 import com.xhkjedu.sexam.model.exam.EBase;
13 14
 import com.xhkjedu.sexam.model.exam.EBaseMac;
@@ -54,6 +55,8 @@ public class EBaseService {
54 55
     private EBaseMacMapper eBaseMacMapper;
55 56
     @Resource
56 57
     private EPaperQtypeMapper ePaperQtypeMapper;
58
+    @Resource
59
+    private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
57 60
 
58 61
     /**
59 62
      * 发起考试
@@ -227,12 +230,24 @@ public class EBaseService {
227 230
                         epsq.setEpid(ps.getEpid());
228 231
                         epsq.setEpsid(ps.getId());
229 232
                         epsq.setEptqid(q.getEptqid());
230
-
233
+                        epsq.setCtype(q.getCtype());
234
+                        epsq.setQuestionid(q.getQuestionid());
235
+                        epsq.setQn(q.getQn());
236
+                        epsq.setQorder(q.getQorder());
237
+                        epsq.setAnswered(0);
238
+                        epsq.setAnswertype(0);
239
+                        epsq.setConverted(0);
240
+                        epsq.setCosttime(0);
241
+                        epsq.setQscore(q.getScore());
242
+                        epsq.setStuscore(0.0);
243
+                        epsq.setChecked(0);
244
+                        epsq.setGood(0);
245
+                        epsq.setBad(0);
246
+                        stuqlist.add(epsq);
231 247
                     }
232 248
                 }
233 249
             }
234
-
235
-
250
+            ePaperStudentQuestionMapper.insertList(stuqlist);
236 251
         }
237 252
     }
238 253
 

Завантаження…
Відмінити
Зберегти