|
@@ -891,8 +891,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
errorList.add(itemImport);
|
|
|
continue;
|
|
|
}
|
|
|
- if(Validator.isEmpty(itemImport.getIdCard())){
|
|
|
- itemImport.setCause("身份证不能为空");
|
|
|
+ String REGEX = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{3}([0-9Xx])$";
|
|
|
+ if(Validator.isEmpty(itemImport.getIdCard()) || !itemImport.getIdCard().matches(REGEX)){
|
|
|
+ itemImport.setCause("身份证不能为空或者格式不对");
|
|
|
errorList.add(itemImport);
|
|
|
continue;
|
|
|
}
|
|
@@ -915,6 +916,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
}
|
|
|
itemImport.setSubjectIds(ToolsUtils.join(",", sIdList));
|
|
|
}
|
|
|
+ User user1 = getOne(new LambdaQueryWrapper<User>()
|
|
|
+ .eq(User::getIdCard,EncryptHandler.encrypt(itemImport.getTelphone())).last("limit 1"));
|
|
|
+ if(Validator.isNotNull(user1)) {
|
|
|
+ if(Validator.isNotEmpty(user1.getIdCard())&&Validator.isNotEmpty(itemImport.getIdCard())&&!itemImport.getIdCard().equals(user1.getIdCard())){
|
|
|
+ itemImport.setCause("手机号码已被占用请检查");
|
|
|
+ errorList.add(itemImport);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
User user = getOne(new LambdaQueryWrapper<User>()
|
|
|
.eq(User::getIdCard,EncryptHandler.encrypt(itemImport.getIdCard())).last("limit 1"));
|
|
|
if(Validator.isNotNull(user)){
|