|
@@ -486,17 +486,20 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
|
|
|
int msgRowNo = rowIndex + 1;
|
|
|
student.checkValid().forEach(err -> errMsg.add(String.format("第%s行%s", msgRowNo, err)));
|
|
|
|
|
|
- if (phoneMap.containsKey(student.getPhone())) {
|
|
|
- errMsg.add(String.format("第%s行手机号重复", msgRowNo));
|
|
|
- } else {
|
|
|
- phoneMap.put(student.getPhone(), msgRowNo);
|
|
|
+ if (StringUtils.isNotEmpty(student.getPhone())) {
|
|
|
+ if (phoneMap.containsKey(student.getPhone())) {
|
|
|
+ errMsg.add(String.format("第%s行手机号重复", msgRowNo));
|
|
|
+ } else {
|
|
|
+ phoneMap.put(student.getPhone(), msgRowNo);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (!subjectNames.contains(student.getSubjectName())) {
|
|
|
+ if (StringUtils.isNotEmpty(student.getSubjectName()) && !subjectNames.contains(student.getSubjectName())) {
|
|
|
errMsg.add(String.format("第%s行声部不支持", msgRowNo));
|
|
|
}
|
|
|
|
|
|
- if (!groupNameIdMap.containsKey(student.getTenantGroupName())) {
|
|
|
+ if (StringUtils.isNotEmpty(student.getTenantGroupName()) &&
|
|
|
+ !groupNameIdMap.containsKey(student.getTenantGroupName())) {
|
|
|
errMsg.add(String.format("第%s行小组不存在", msgRowNo));
|
|
|
}
|
|
|
|