Commit 74d1e19b authored by Ryan Loong's avatar Ryan Loong

fix 导入学生时不传学号的时候报错的bug (BUG #3980)

parent 6d8e9559
......@@ -312,7 +312,8 @@ public class StudentInfoService {
}
public List<StudentInfoExcelImportResultVo> checkImportByExcel(Collection<StudentInfoExcelImportVo> importVoList, Integer classId) {
Map<String, StudentInfo> existStudent = selectStudentInfoByUniqueId(importVoList.stream().map(StudentInfoExcelImportVo::getStudentUid).filter(org.apache.commons.lang3.StringUtils::isNotBlank).collect(Collectors.toSet()))
Set<String> studentUidSet = importVoList.stream().map(StudentInfoExcelImportVo::getStudentUid).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
Map<String, StudentInfo> existStudent = CollectionUtils.isEmpty(studentUidSet) ? Collections.emptyMap() : selectStudentInfoByUniqueId(studentUidSet)
.stream().collect(Collectors.toMap(StudentInfo::getStudentUniqueId, x -> x, (k1, k2) -> k1));
Set<String> duplicateStudentUid = importVoList.stream()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment