|
@@ -16,7 +16,6 @@ import com.xhkjedu.smarking.utils.MarkingUtil;
|
16
|
16
|
import com.xhkjedu.smarking.vo.paper.MsPaperParams;
|
17
|
17
|
import com.xhkjedu.smarking.vo.system.SchoolCloudVo;
|
18
|
18
|
import com.xhkjedu.utils.N_Utils;
|
19
|
|
-import com.xhkjedu.vo.system.UserVo;
|
20
|
19
|
import lombok.extern.slf4j.Slf4j;
|
21
|
20
|
import org.springframework.stereotype.Service;
|
22
|
21
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -278,16 +277,16 @@ public class MsTemplateService {
|
278
|
277
|
Integer examid = paper.getExamid();
|
279
|
278
|
String subjectid = paper.getSubjectid();
|
280
|
279
|
//获取试卷中所有学生信息
|
281
|
|
- List<UserVo> students = userMapper.listStuForExamByExamId(examid);
|
|
280
|
+ List<Integer> students = userMapper.listStuForExamByExamIdAndSubjectid(examid,subjectid);
|
282
|
281
|
Integer timestamp = N_Utils.getSecondTimestamp();
|
283
|
282
|
List<MsPaperStudent> savePaperStudents = new ArrayList<>();
|
284
|
|
- for(UserVo student : students) {
|
|
283
|
+ for(Integer stuid : students) {
|
285
|
284
|
MsPaperStudent es = new MsPaperStudent();
|
286
|
285
|
es.setExamid(examid);
|
287
|
286
|
es.setMsid(paper.getMsid());
|
288
|
287
|
es.setMpid(mpid);
|
289
|
288
|
es.setSubjectid(subjectid);
|
290
|
|
- es.setStudentid(student.getUserid());
|
|
289
|
+ es.setStudentid(stuid);
|
291
|
290
|
es.setSstate(0);
|
292
|
291
|
es.setChecked(0);
|
293
|
292
|
es.setPnum(paper.getPnum());
|
|
@@ -297,6 +296,8 @@ public class MsTemplateService {
|
297
|
296
|
es.setCreatetime(timestamp);
|
298
|
297
|
es.setHasbad(0);
|
299
|
298
|
es.setStuscoretype(0);
|
|
299
|
+ es.setPagenum(0);
|
|
300
|
+ es.setSubmittype(0);
|
300
|
301
|
savePaperStudents.add(es);
|
301
|
302
|
}
|
302
|
303
|
msPaperStudentMapper.insertList(savePaperStudents);//保存试卷学生信息
|
|
@@ -321,8 +322,6 @@ public class MsTemplateService {
|
321
|
322
|
psblock.setStudentid(studentid);
|
322
|
323
|
psblock.setMblockid(mblockid);
|
323
|
324
|
psblock.setMpsid(mpsid);
|
324
|
|
- psblock.setConverted(0);
|
325
|
|
- psblock.setChecked(0);
|
326
|
325
|
psblock.setCreatetime(timestamp);
|
327
|
326
|
savePaperStudentBlocks.add(psblock);
|
328
|
327
|
|
|
@@ -360,17 +359,12 @@ public class MsTemplateService {
|
360
|
359
|
psquestion.setQn(q.getQn());
|
361
|
360
|
psquestion.setQorder(q.getQorder());
|
362
|
361
|
psquestion.setQscore(q.getQscore());
|
363
|
|
- psquestion.setStuscore(0.0);
|
364
|
|
- psquestion.setAnswered(0);
|
365
|
|
- psquestion.setAnswertype(0);
|
366
|
|
- psquestion.setConverted(0);
|
367
|
|
- psquestion.setChecked(0);
|
368
|
362
|
|
369
|
363
|
savePaperStudentQuestions.add(psquestion);
|
370
|
364
|
}
|
371
|
365
|
}
|
372
|
|
- msPaperStudentBlockMapper.insertList(savePaperStudentBlocks);//保存试卷学生题块信息
|
373
|
|
- msPaperStudentQuestionMapper.insertList(savePaperStudentQuestions);//保存试卷学生试题信息
|
|
366
|
+ msPaperStudentBlockMapper.insertBatchStudentBlock(savePaperStudentBlocks);//保存试卷学生题块信息
|
|
367
|
+ msPaperStudentQuestionMapper.saveBatchStuPaperQuestion(savePaperStudentQuestions);//保存试卷学生试题信息
|
374
|
368
|
|
375
|
369
|
}
|
376
|
370
|
|