feat: 企业管理-人员信息导入变更

导入的时候修改导入逻辑:
1、系统已存在的人员信息(以手机号为唯一值匹配),则跳过不再处理
2、系统中不存在 但是数据格式正确的数据 直接导入成功
3、错误的数据,提示哪行错误
This commit is contained in:
2024-02-28 15:17:01 +08:00
parent 445fd9b99f
commit 4c731202d2
@@ -955,6 +955,15 @@ public class PayContactsManagementController extends JeroController<PayContactsM
List<PayContactsManagement> finalListContactsAll = listContactsAll;
List<PayContactsManagement> finalListContactsNameAll = listContactsNameAll;
list.forEach(p->{
// 变更 以手机号为唯一值判断已存在的数据不再参加导入
if(!CollectionUtils.isEmpty(finalListContactsAll)){
// 校验 表中是否存手机号
List<PayContactsManagement> listCompanyEquals = finalListContactsAll.stream().filter(p1->Objects.equals(p1.getPhone(),PasswordUtil.encrypt(p.getPhone()))).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listCompanyEquals)){
listRemove.add(p);
return;
}
}
int count = list.indexOf(p);
// 校验excel表中是否存在重复手机号
List<PayContactsManagement> listContactsPhone = listContacts.stream().filter(p1->Objects.equals(p1.getPhone(),p.getPhone())).collect(Collectors.toList());