|
@@ -82,7 +82,7 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
if (!CollectionUtils.isEmpty(examSyncStudents)) {
|
|
|
|
|
|
List<String> courses = Arrays.asList(record.getCourseCode().split(","));
|
|
|
- if(!CollectionUtils.isEmpty(examCourseMappings)){
|
|
|
+ if (!CollectionUtils.isEmpty(examCourseMappings)) {
|
|
|
courses = examCourseMappings.stream().map(ExamCourseMapping::getSyncCourseCode).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
@@ -168,7 +168,7 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
List<ExamCourseMapping> examCourseMappings = examCourseMappingService.listBySemesterIdAndExamTypeIdAndCloudMarkCourseCode(schoolId, semesterId, examTypeId, courseCode);
|
|
|
|
|
|
List<String> courses = Arrays.asList(courseCode.split(","));
|
|
|
- if(!CollectionUtils.isEmpty(examCourseMappings)){
|
|
|
+ if (!CollectionUtils.isEmpty(examCourseMappings)) {
|
|
|
courses = examCourseMappings.stream().map(ExamCourseMapping::getSyncCourseCode).collect(Collectors.toList());
|
|
|
}
|
|
|
return examAssignMapper.assignResultPreview(iPage, schoolId, collegeId, semesterId, examTypeId, courses, openCollege, kcCollege, clazzId, teacherCode, minAssignScore, maxAssignScore);
|
|
@@ -200,9 +200,17 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
}
|
|
|
int actualCount = 0;
|
|
|
List<String> kcxyList = new ArrayList<>();
|
|
|
+ // 查询关联课程
|
|
|
+ List<ExamCourseMapping> examCourseMappings = examCourseMappingService.listBySemesterIdAndExamTypeIdAndCloudMarkCourseCode(schoolId, semesterId, examTypeId, courseCode);
|
|
|
+
|
|
|
List<ExamSyncStudent> examSyncStudents = examSyncStudentService.listByExamSyncTotalId(examSyncTotal);
|
|
|
if (!CollectionUtils.isEmpty(examSyncStudents)) {
|
|
|
- List<ExamSyncStudent> syncStudents = examSyncStudents.stream().filter(m -> m.getKch().equals(courseCode) && m.getKkbm().equals(openCollege)).collect(Collectors.toList());
|
|
|
+ List<String> courses = Arrays.asList(courseCode.split(","));
|
|
|
+ if (!CollectionUtils.isEmpty(examCourseMappings)) {
|
|
|
+ courses = examCourseMappings.stream().map(ExamCourseMapping::getSyncCourseCode).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ List<String> finalCourses = courses;
|
|
|
+ List<ExamSyncStudent> syncStudents = examSyncStudents.stream().filter(m -> finalCourses.contains(m.getKch()) && m.getKkbm().equals(openCollege)).collect(Collectors.toList());
|
|
|
actualCount = syncStudents.size();
|
|
|
kcxyList = syncStudents.stream().map(ExamSyncStudent::getJgmc).distinct().collect(Collectors.toList());
|
|
|
}
|