| | |
| | | import com.ruoyi.study.mapper.TSubjectRecordMapper; |
| | | import com.ruoyi.study.service.ITSubjectRecordService; |
| | | import com.ruoyi.study.vo.ExitLearnVO; |
| | | import com.ruoyi.study.vo.SubjectRecordResultVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | subjectRecord.setType(type); |
| | | // 答题次数与答题正确次数 |
| | | subjectRecord.setAnswerNumber(exitLearn.getAnswerNumber()); |
| | | subjectRecord.setSchedule(exitLearn.getSchedule()); |
| | | subjectRecord.setCorrectNumber(exitLearn.getCorrectNumber()); |
| | | subjectRecord.setType(type); |
| | | // 题目与题组需处理 |
| | | List<String> teamIdList = Arrays.stream(teamIds.split(",")).collect(Collectors.toList()); |
| | | List<String> topicIdList = Arrays.stream(topicIds.split(",")).collect(Collectors.toList()); |
| | | subjectRecord.setBeforeSubject(teamIdList.stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | subjectRecord.setCompleteSubject(topicIdList.stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | // List<String> teamIdList = Arrays.stream(teamIds.split(",")).collect(Collectors.toList()); |
| | | // List<String> topicIdList = Arrays.stream(topicIds.split(",")).collect(Collectors.toList()); |
| | | // subjectRecord.setBeforeSubject(teamIdList.stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | // subjectRecord.setCompleteSubject(topicIdList.stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | return this.save(subjectRecord); |
| | | } |
| | | |