联系人管理修改
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ package com.jero.common.enums;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @Description 企业端消息
|
||||
* @Description 企业端模板编码消息
|
||||
* @Author lqt
|
||||
* @Date 2021/9/22
|
||||
* @Param
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package com.jero.common.enums;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
/**
|
||||
* @Description 管理端消息
|
||||
* @Description 管理端模板编码消息
|
||||
* @Author lqt
|
||||
* @Date 2021/9/22
|
||||
* @Param
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
package com.jero.common.enums;
|
||||
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
|
||||
/**
|
||||
* @Description 消息模板,跳转路径
|
||||
* @Author lqt
|
||||
* @Date 2021/9/27
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
public enum MessageUrlEnums {
|
||||
|
||||
// 管理端
|
||||
|
||||
+31
-10
@@ -601,12 +601,28 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
List<PayContactsManagement> listSigning = new ArrayList<>();
|
||||
List<PayContactsManagement> listRemove = new ArrayList<>();
|
||||
List<String> phoneList = list.stream().map(PayContactsManagement::getPhone).collect(Collectors.toList());
|
||||
List<PayContactsManagement> listContactsAll = payContactsManagementService.listPayContactsManagement(phoneList);
|
||||
List<String> companyList = list.stream().map(PayContactsManagement::getCompanyName).collect(Collectors.toList());
|
||||
List<PayCompanyManagement> listCompanyAll = payCompanyManagementService.listPayCompanyManagement(companyList);
|
||||
List<String> phoneList = new ArrayList<>();
|
||||
List<String> companyList = new ArrayList<>();
|
||||
list.forEach(p->{
|
||||
if(!StringUtils.isEmpty(p.getPhone())){
|
||||
phoneList.add(PasswordUtil.encrypt(p.getPhone()));
|
||||
}
|
||||
if(!StringUtils.isEmpty(p.getCompanyName())){
|
||||
companyList.add(p.getCompanyName());
|
||||
}
|
||||
});
|
||||
List<PayContactsManagement> listContactsAll = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(phoneList)){
|
||||
listContactsAll = payContactsManagementService.listPayContactsManagement(phoneList);
|
||||
}
|
||||
List<PayCompanyManagement> listCompanyAll = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(companyList)){
|
||||
listCompanyAll = payCompanyManagementService.listPayCompanyManagement(companyList);
|
||||
}
|
||||
List<PayContactsManagement> listContacts = new ArrayList<>();
|
||||
StringBuilder msg = new StringBuilder();
|
||||
List<PayCompanyManagement> finalListCompanyAll = listCompanyAll;
|
||||
List<PayContactsManagement> finalListContactsAll = listContactsAll;
|
||||
list.forEach(p->{
|
||||
int count = list.indexOf(p);
|
||||
// 校验excel表中是否存在重复手机号
|
||||
@@ -617,7 +633,7 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
||||
// 校验excel表中是否存在重复联系人
|
||||
List<PayContactsManagement> listContactsName = listContacts.stream().filter(p1->Objects.equals(p1.getName(),p.getName())
|
||||
&& Objects.equals(p1.getCompanyId(),p.getCompanyId())).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(listContactsName)){
|
||||
if(!CollectionUtils.isEmpty(listContactsName)){
|
||||
msg.append("第 ").append(count + 3).append(" 行:联系人姓名在excel中重复,请修改。<br/>");
|
||||
}
|
||||
listContacts.add(p);
|
||||
@@ -626,23 +642,28 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
||||
if(!StringUtils.isBlank(s)){
|
||||
msg.append(s);
|
||||
}
|
||||
if(StringUtils.isEmpty(p.getCompanyName())){
|
||||
msg.append("第 ").append(count + 3).append(" 行:企业名称不能为空,请修改。<br/>");
|
||||
}
|
||||
// 根据企业名称获取企业id
|
||||
if(!CollectionUtils.isEmpty(listCompanyAll)){
|
||||
List<PayCompanyManagement> listCompany = listCompanyAll.stream().filter(p2->Objects.equals(p2.getCompanyName(),p.getCompanyName())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(finalListCompanyAll)){
|
||||
List<PayCompanyManagement> listCompany = finalListCompanyAll.stream().filter(p2->Objects.equals(p2.getCompanyName(),p.getCompanyName())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listCompany)){
|
||||
p.setCompanyId(listCompany.get(0).getId());
|
||||
}else{
|
||||
msg.append("第 ").append(count + 3).append(" 行:企业名称不存在,请修改。<br/>");
|
||||
}
|
||||
}else{
|
||||
msg.append("第 ").append(count + 3).append(" 行:企业名称不存在,请修改。<br/>");
|
||||
}
|
||||
// 校验 手机号,姓名
|
||||
if(!CollectionUtils.isEmpty(listContactsAll)){
|
||||
if(!CollectionUtils.isEmpty(finalListContactsAll)){
|
||||
// 校验 表中是否存手机号
|
||||
List<PayContactsManagement> listCompanyEquals = listContactsAll.stream().filter(p1->Objects.equals(p1.getPhone(),p.getPhone())).collect(Collectors.toList());
|
||||
List<PayContactsManagement> listCompanyEquals = finalListContactsAll.stream().filter(p1->Objects.equals(p1.getPhone(),PasswordUtil.encrypt(p.getPhone()))).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listCompanyEquals)){
|
||||
msg.append("第").append(count + 3).append("行:手机号已经存在,请修改。<br/>");
|
||||
}
|
||||
List<PayContactsManagement> listContactsEquals = listContactsAll.stream().filter(p1->Objects.equals(p1.getCompanyId(),p.getCompanyId())
|
||||
List<PayContactsManagement> listContactsEquals = finalListContactsAll.stream().filter(p1->Objects.equals(p1.getCompanyId(),p.getCompanyId())
|
||||
&& Objects.equals(p1.getName(),p.getName())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listContactsEquals)){
|
||||
msg.append("第").append(count + 3).append("行:联系人姓名已经存在,请修改。<br/>");
|
||||
|
||||
Reference in New Issue
Block a user