| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | if (null!=paper.getScoreId()){ |
| | | //随机分类信息 |
| | | List<ExamSubjectChoicesVO> examSubjectChoicesVOS = baseMapper.queryRandomSubject(paper); |
| | | // long before = System.currentTimeMillis(); |
| | | List<ExamExaminationSubject> list = new ArrayList<>(); |
| | | examSubjectChoicesVOS.forEach(examSubjectChoicesVO -> { |
| | | //新增个人对应每场考试成绩试卷 |
| | | ExamExaminationSubject ksxtSginup = new ExamExaminationSubject(); |
| | |
| | | ksxtSginup.setCategoryId(examSubjectChoicesVO.getChoicesType()); |
| | | ksxtSginup.setSubjectId(examSubjectChoicesVO.getId()); |
| | | //新增 |
| | | examExaminationSubjectService.save(ksxtSginup); |
| | | // examExaminationSubjectService.save(ksxtSginup); |
| | | list.add(ksxtSginup); |
| | | }); |
| | | //批量新增 |
| | | baseMapper.insertBatch(list); |
| | | // long after = System.currentTimeMillis(); |
| | | // System.out.println("时间差"+(after-before)); |
| | | //新增试卷关联信息 |
| | | return examSubjectChoicesVOS; |
| | | } |