修改同步添加联系人
This commit is contained in:
parent
1c43e1dd61
commit
a2ff304ae0
|
|
@ -391,16 +391,17 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
|||
|
||||
/**
|
||||
* 数据脱敏
|
||||
*
|
||||
* @param crmModel
|
||||
*/
|
||||
private CrmModel encryptSensitiveData(CrmModel crmModel){
|
||||
private CrmModel encryptSensitiveData(CrmModel crmModel) {
|
||||
//遍历数据
|
||||
//crmModel.forEach((key, value) -> System.out.println("Key: " + key + ", Value: " + value));
|
||||
// 获取数据
|
||||
String contactsMobile = (String)crmModel.get("contactsMobile");
|
||||
String name = (String)crmModel.get("telephone");//详情页的联系人姓名
|
||||
String contactsName = (String)crmModel.get("contactsName");
|
||||
String email = (String)crmModel.get("email");
|
||||
String contactsMobile = (String) crmModel.get("contactsMobile");
|
||||
String name = (String) crmModel.get("telephone");//详情页的联系人姓名
|
||||
String contactsName = (String) crmModel.get("contactsName");
|
||||
String email = (String) crmModel.get("email");
|
||||
String fliedKjhmgc = (String) crmModel.get("fliedKjhmgc");//详情页的详细地址
|
||||
//String contactsAddress = (String) crmModel.get("contactsAddress");
|
||||
// 脱敏处理
|
||||
|
|
@ -422,6 +423,7 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
|||
|
||||
/**
|
||||
* 获取客户明文
|
||||
*
|
||||
* @param plaintextVO
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -456,14 +458,14 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
|||
//遍历数据
|
||||
//crmModel.forEach((key, value) -> System.out.println("Key: " + key + ", Value: " + value));
|
||||
String plaintext = null;
|
||||
if (plaintextVO.getField().equals("mobile")){
|
||||
if (plaintextVO.getField().equals("mobile")) {
|
||||
plaintext = (String) crmModel.get("mobile");
|
||||
} else if (plaintextVO.getField().equals("email")){
|
||||
} else if (plaintextVO.getField().equals("email")) {
|
||||
plaintext = (String) crmModel.get("email");
|
||||
} else if (plaintextVO.getField().equals("telephone")){ //详情页联系人姓名
|
||||
} else if (plaintextVO.getField().equals("telephone")) { //详情页联系人姓名
|
||||
int contactsId = (Integer) crmModel.get("contactsId");
|
||||
plaintext = crmContactsService.getContactsName(contactsId);
|
||||
} else if (plaintextVO.getField().equals("fliedKjhmgc")){
|
||||
} else if (plaintextVO.getField().equals("fliedKjhmgc")) {
|
||||
plaintext = (String) crmModel.get("fliedKjhmgc");
|
||||
}
|
||||
return plaintext;
|
||||
|
|
@ -471,10 +473,11 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
|||
|
||||
/**
|
||||
* 判断crmType
|
||||
*
|
||||
* @param plaintextVO
|
||||
*/
|
||||
@Override
|
||||
public String getPlaintext(CrmGetPlaintextVO plaintextVO){
|
||||
public String getPlaintext(CrmGetPlaintextVO plaintextVO) {
|
||||
// 判断类型
|
||||
String plaintext = null;
|
||||
if (plaintextVO.getCrmType().equals("customer")) {
|
||||
|
|
@ -598,28 +601,24 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
|||
|
||||
CrmCustomer finalCrmCustomer = crmCustomer;
|
||||
CrmModelFiledVO crmModelFiled = crmModel.getField().get(6);
|
||||
new Thread(() -> {
|
||||
if (finalCrmCustomer.getTelephone() != null && !finalCrmCustomer.getTelephone().isEmpty()) {
|
||||
// 客户填写
|
||||
addContacts(finalCrmCustomer.getCustomerId(), finalCrmCustomer.getTelephone(), crmModelFiled.getValue().toString(), finalCrmCustomer.getMobile(), "", finalCrmCustomer.getEmail());
|
||||
}
|
||||
if (finalCrmCustomer.getTelephone() != null && !finalCrmCustomer.getTelephone().isEmpty()) {
|
||||
// 客户填写
|
||||
addContacts(finalCrmCustomer.getCustomerId(), finalCrmCustomer.getTelephone(), crmModelFiled.getValue().toString(), finalCrmCustomer.getMobile(), "", finalCrmCustomer.getEmail());
|
||||
}
|
||||
|
||||
// 税局信息
|
||||
// 法定代表人
|
||||
if (StrUtil.isNotEmpty(qyjbxxByNsrmc.getFddbrxm()) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getFddbryddh())) {
|
||||
addContacts(finalCrmCustomer.getCustomerId(), qyjbxxByNsrmc.getFddbrxm(), "法定代表人", qyjbxxByNsrmc.getFddbryddh(), qyjbxxByNsrmc.getFddbrgddh(), qyjbxxByNsrmc.getFddbrdzxx());
|
||||
}
|
||||
// 财务负责人
|
||||
if (StrUtil.isNotEmpty(qyjbxxByNsrmc.getCwfzrxm()) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getCwfzryddh())) {
|
||||
addContacts(finalCrmCustomer.getCustomerId(), qyjbxxByNsrmc.getCwfzrxm(), "财务负责人", qyjbxxByNsrmc.getCwfzryddh(), qyjbxxByNsrmc.getCwfzrgddh(), qyjbxxByNsrmc.getCwfzrdzxx());
|
||||
}
|
||||
// 办税人
|
||||
if (StrUtil.isNotEmpty(qyjbxxByNsrmc.getBsrxm()) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getBsryddh())) {
|
||||
addContacts(finalCrmCustomer.getCustomerId(), qyjbxxByNsrmc.getBsrxm(), "办税人", qyjbxxByNsrmc.getBsryddh(), qyjbxxByNsrmc.getBsrgddh(), qyjbxxByNsrmc.getBsrdzxx());
|
||||
|
||||
}
|
||||
|
||||
}).start();
|
||||
// 税局信息
|
||||
// 法定代表人
|
||||
if (Objects.nonNull(qyjbxxByNsrmc) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getFddbrxm()) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getFddbryddh())) {
|
||||
addContacts(finalCrmCustomer.getCustomerId(), qyjbxxByNsrmc.getFddbrxm(), "法定代表人", qyjbxxByNsrmc.getFddbryddh(), qyjbxxByNsrmc.getFddbrgddh(), qyjbxxByNsrmc.getFddbrdzxx());
|
||||
}
|
||||
// 财务负责人
|
||||
if (Objects.nonNull(qyjbxxByNsrmc) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getCwfzrxm()) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getCwfzryddh())) {
|
||||
addContacts(finalCrmCustomer.getCustomerId(), qyjbxxByNsrmc.getCwfzrxm(), "财务负责人", qyjbxxByNsrmc.getCwfzryddh(), qyjbxxByNsrmc.getCwfzrgddh(), qyjbxxByNsrmc.getCwfzrdzxx());
|
||||
}
|
||||
// 办税人
|
||||
if (Objects.nonNull(qyjbxxByNsrmc) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getBsrxm()) && StrUtil.isNotEmpty(qyjbxxByNsrmc.getBsryddh())) {
|
||||
addContacts(finalCrmCustomer.getCustomerId(), qyjbxxByNsrmc.getBsrxm(), "办税人", qyjbxxByNsrmc.getBsryddh(), qyjbxxByNsrmc.getBsrgddh(), qyjbxxByNsrmc.getBsrdzxx());
|
||||
}
|
||||
|
||||
|
||||
map.put("customerId", crmCustomer.getCustomerId());
|
||||
|
|
@ -631,13 +630,13 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
|||
public void addCustomerByDjxx(CrmGsdjxx gsdjxx) {
|
||||
CrmBusinessSaveBO crmModel = new CrmBusinessSaveBO();
|
||||
Map<String, Object> entity = new HashMap<>();
|
||||
entity.put("customerName",gsdjxx.getNsrmc());
|
||||
entity.put("telephone","");
|
||||
entity.put("mobile","");
|
||||
entity.put("email","");
|
||||
entity.put("website","");
|
||||
entity.put("remark","");
|
||||
entity.put("address","");
|
||||
entity.put("customerName", gsdjxx.getNsrmc());
|
||||
entity.put("telephone", "");
|
||||
entity.put("mobile", "");
|
||||
entity.put("email", "");
|
||||
entity.put("website", "");
|
||||
entity.put("remark", "");
|
||||
entity.put("address", "");
|
||||
crmModel.setEntity(entity);
|
||||
List<CrmModelFiledVO> list = new ArrayList<>();
|
||||
//加入时间
|
||||
|
|
|
|||
Loading…
Reference in New Issue