This commit is contained in:
parent
b2638f3552
commit
ce525ad955
|
|
@ -6,6 +6,7 @@ public enum CrmPoolEnum {
|
||||||
PXQDMDPOOL("培训签到企业名单公海",34553),
|
PXQDMDPOOL("培训签到企业名单公海",34553),
|
||||||
XDMRPOOL("系统默认公海",34552),
|
XDMRPOOL("系统默认公海",34552),
|
||||||
GSMGWZKH("公司门户网站客户",34556),
|
GSMGWZKH("公司门户网站客户",34556),
|
||||||
|
GSXKYDJXX("工商新开业登记信息",34557),
|
||||||
;
|
;
|
||||||
private final String name;
|
private final String name;
|
||||||
private final int id;
|
private final int id;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ public class CrmQyjbxxController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICrmQyjbxxService crmQyjbxxService;
|
private ICrmQyjbxxService crmQyjbxxService;
|
||||||
|
|
||||||
@ParamAspect
|
|
||||||
@PostMapping("/sync")
|
@PostMapping("/sync")
|
||||||
public void syncQyjbxx(){
|
public void syncQyjbxx(){
|
||||||
crmQyjbxxService.syncQyjbxx();
|
crmQyjbxxService.syncQyjbxx();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package com.kakarote.crm.entity.PO;
|
package com.kakarote.crm.entity.PO;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFilter;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.kakarote.core.security.converter.SensitiveDataConverter;
|
import com.kakarote.core.security.converter.SensitiveDataConverter;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import com.kakarote.crm.entity.BO.*;
|
||||||
import com.kakarote.crm.entity.PO.CrmContacts;
|
import com.kakarote.crm.entity.PO.CrmContacts;
|
||||||
import com.kakarote.crm.entity.PO.CrmCustomer;
|
import com.kakarote.crm.entity.PO.CrmCustomer;
|
||||||
import com.kakarote.crm.entity.PO.CrmCustomerSetting;
|
import com.kakarote.crm.entity.PO.CrmCustomerSetting;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmGsdjxx;
|
||||||
import com.kakarote.crm.entity.VO.CrmDataCheckVO;
|
import com.kakarote.crm.entity.VO.CrmDataCheckVO;
|
||||||
import com.kakarote.crm.entity.VO.CrmGetPlaintextVO;
|
import com.kakarote.crm.entity.VO.CrmGetPlaintextVO;
|
||||||
import com.kakarote.crm.entity.VO.CrmInfoNumVO;
|
import com.kakarote.crm.entity.VO.CrmInfoNumVO;
|
||||||
|
|
@ -66,6 +67,8 @@ public interface ICrmCustomerService extends BaseService<CrmCustomer> {
|
||||||
*/
|
*/
|
||||||
Map<String,Object> addOrUpdate(CrmModelSaveBO crmModel,boolean isExcel,Integer poolId);
|
Map<String,Object> addOrUpdate(CrmModelSaveBO crmModel,boolean isExcel,Integer poolId);
|
||||||
|
|
||||||
|
void addCustomerByDjxx(CrmGsdjxx gsdjxx);
|
||||||
|
|
||||||
CrmCustomer addOrUpdateByOpenApi(CrmModelSaveBO crmModel);
|
CrmCustomer addOrUpdateByOpenApi(CrmModelSaveBO crmModel);
|
||||||
/**
|
/**
|
||||||
* 删除客户数据
|
* 删除客户数据
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,9 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICrmContactsService contactsService;
|
private ICrmContactsService contactsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmOpenApiService crmOpenApiService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询字段配置
|
* 查询字段配置
|
||||||
*
|
*
|
||||||
|
|
@ -624,6 +627,151 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
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",gsdjxx.getScjydz());
|
||||||
|
crmModel.setEntity(entity);
|
||||||
|
List<CrmModelFiledVO> list = new ArrayList<>();
|
||||||
|
//加入时间
|
||||||
|
CrmModelFiledVO fieldDomqff = new CrmModelFiledVO();
|
||||||
|
fieldDomqff.setFieldId(1101923);
|
||||||
|
fieldDomqff.setFieldName("fieldDomqff");
|
||||||
|
fieldDomqff.setName("加入时间");
|
||||||
|
fieldDomqff.setFieldType(0);
|
||||||
|
fieldDomqff.setType(13);
|
||||||
|
fieldDomqff.setValue(new Date());
|
||||||
|
list.add(fieldDomqff);
|
||||||
|
//企业税号
|
||||||
|
CrmModelFiledVO fieldZzmdcm = new CrmModelFiledVO();
|
||||||
|
fieldZzmdcm.setFieldId(1101926);
|
||||||
|
fieldZzmdcm.setFieldName("fliedMjrdbe");
|
||||||
|
fieldZzmdcm.setName("纳税人识别号");
|
||||||
|
fieldZzmdcm.setFieldType(0);
|
||||||
|
fieldZzmdcm.setType(1);
|
||||||
|
fieldZzmdcm.setValue("");
|
||||||
|
list.add(fieldZzmdcm);
|
||||||
|
// 所属税务局
|
||||||
|
CrmModelFiledVO fieldAvfjfa = new CrmModelFiledVO();
|
||||||
|
fieldAvfjfa.setFieldId(1101925);
|
||||||
|
fieldAvfjfa.setFieldName("fliedJhsivt");
|
||||||
|
fieldAvfjfa.setName("所属税务局");
|
||||||
|
fieldAvfjfa.setFieldType(0);
|
||||||
|
fieldAvfjfa.setType(3);
|
||||||
|
fieldAvfjfa.setValue("");
|
||||||
|
list.add(fieldAvfjfa);
|
||||||
|
//用户标记
|
||||||
|
CrmModelFiledVO fliedMtfnrf = new CrmModelFiledVO();
|
||||||
|
fliedMtfnrf.setFieldId(1101920);
|
||||||
|
fliedMtfnrf.setFieldName("fliedMtfnrf");
|
||||||
|
fliedMtfnrf.setName("用户标记");
|
||||||
|
fliedMtfnrf.setFieldType(0);
|
||||||
|
fliedMtfnrf.setType(3);
|
||||||
|
fliedMtfnrf.setValue("");
|
||||||
|
list.add(fliedMtfnrf);
|
||||||
|
//fliedGrasid 金财云联客户 1101921
|
||||||
|
CrmModelFiledVO fliedGrasid = new CrmModelFiledVO();
|
||||||
|
fliedGrasid.setFieldId(1101921);
|
||||||
|
fliedGrasid.setFieldName("fliedGrasid");
|
||||||
|
fliedGrasid.setName("金财云联客户");
|
||||||
|
fliedGrasid.setFieldType(0);
|
||||||
|
fliedGrasid.setType(3);
|
||||||
|
fliedGrasid.setValue("否");
|
||||||
|
list.add(fliedGrasid);
|
||||||
|
//fliedKjhmgc 客户详细地址
|
||||||
|
CrmModelFiledVO fliedKjhmgc = new CrmModelFiledVO();
|
||||||
|
fliedKjhmgc.setFieldId(1101927);
|
||||||
|
fliedKjhmgc.setFieldName("fliedKjhmgc");
|
||||||
|
fliedKjhmgc.setName("客户详细地址");
|
||||||
|
fliedKjhmgc.setFieldType(0);
|
||||||
|
fliedKjhmgc.setType(2);
|
||||||
|
fliedKjhmgc.setValue("");
|
||||||
|
list.add(fliedKjhmgc);
|
||||||
|
//姓名 fliedJeqgso 1101928
|
||||||
|
CrmModelFiledVO fliedJeqgso = new CrmModelFiledVO();
|
||||||
|
fliedJeqgso.setFieldId(1101928);
|
||||||
|
fliedJeqgso.setFieldName("fliedJeqgso");
|
||||||
|
fliedJeqgso.setName("联系人职位");
|
||||||
|
fliedJeqgso.setFieldType(0);
|
||||||
|
fliedJeqgso.setType(1);
|
||||||
|
fliedJeqgso.setValue("");
|
||||||
|
list.add(fliedJeqgso);
|
||||||
|
//客户所在地区 industry 1101832
|
||||||
|
CrmModelFiledVO industry = new CrmModelFiledVO();
|
||||||
|
industry.setFieldId(1101832);
|
||||||
|
industry.setFieldName("industry");
|
||||||
|
industry.setName("客户所在地区");
|
||||||
|
industry.setFieldType(2);
|
||||||
|
industry.setType(3);
|
||||||
|
industry.setValue("");
|
||||||
|
list.add(industry);
|
||||||
|
//客户级别 level 1101833
|
||||||
|
CrmModelFiledVO level = new CrmModelFiledVO();
|
||||||
|
level.setFieldId(1101833);
|
||||||
|
level.setFieldName("level");
|
||||||
|
level.setName("客户级别");
|
||||||
|
level.setFieldType(2);
|
||||||
|
level.setType(3);
|
||||||
|
level.setValue("");
|
||||||
|
list.add(level);
|
||||||
|
//开通时间 fieldAcqnin 1101917
|
||||||
|
CrmModelFiledVO fieldAcqnin = new CrmModelFiledVO();
|
||||||
|
fieldAcqnin.setFieldId(1101917);
|
||||||
|
fieldAcqnin.setFieldName("fieldAcqnin");
|
||||||
|
fieldAcqnin.setName("开通时间");
|
||||||
|
fieldAcqnin.setFieldType(0);
|
||||||
|
fieldAcqnin.setType(13);
|
||||||
|
fieldAcqnin.setValue("");
|
||||||
|
list.add(fieldAcqnin);
|
||||||
|
//客户来源 source 1101828
|
||||||
|
CrmModelFiledVO source = new CrmModelFiledVO();
|
||||||
|
source.setFieldId(1101828);
|
||||||
|
source.setFieldName("source");
|
||||||
|
source.setName("客户来源");
|
||||||
|
source.setFieldType(2);
|
||||||
|
source.setType(3);
|
||||||
|
source.setValue("");
|
||||||
|
list.add(source);
|
||||||
|
// //5 新开票数 fieldYbwemm 1101919
|
||||||
|
// CrmModelFiledVO fieldYbwemm = new CrmModelFiledVO();
|
||||||
|
// fieldYbwemm.setFieldId(1101919);
|
||||||
|
// fieldYbwemm.setFieldName("fieldYbwemm");
|
||||||
|
// fieldYbwemm.setName("新开票数");
|
||||||
|
// fieldYbwemm.setFieldType(0);
|
||||||
|
// fieldYbwemm.setType(5);
|
||||||
|
// fieldYbwemm.setValue("");
|
||||||
|
// list.add(fieldYbwemm);
|
||||||
|
// //总开票数 fliedBcethz 1101918
|
||||||
|
// CrmModelFiledVO fliedBcethz = new CrmModelFiledVO();
|
||||||
|
// fliedBcethz.setFieldId(1101918);
|
||||||
|
// fliedBcethz.setFieldName("fliedBcethz");
|
||||||
|
// fliedBcethz.setName("总开票数");
|
||||||
|
// fliedBcethz.setFieldType(0);
|
||||||
|
// fliedBcethz.setType(5);
|
||||||
|
// fliedBcethz.setValue("");
|
||||||
|
// list.add(fliedBcethz);
|
||||||
|
// crmModel.setField(list);
|
||||||
|
//添加客户数据
|
||||||
|
Integer customerId = crmOpenApiService.crmAddCustomer(crmModel, "工商新开业登记信息");
|
||||||
|
//添加联系人数据
|
||||||
|
// 税局信息
|
||||||
|
// 法定代表人
|
||||||
|
if (StrUtil.isNotEmpty(gsdjxx.getFddbrxm()) && StrUtil.isNotEmpty(gsdjxx.getFddbryddh())) {
|
||||||
|
addContacts(customerId, gsdjxx.getFddbrxm(), "法定代表人", gsdjxx.getFddbryddh(), gsdjxx.getFddbrgddh(), "");
|
||||||
|
}
|
||||||
|
// 财务负责人
|
||||||
|
if (StrUtil.isNotEmpty(gsdjxx.getCwfzrxm()) && StrUtil.isNotEmpty(gsdjxx.getCwfzryddh())) {
|
||||||
|
addContacts(customerId, gsdjxx.getCwfzrxm(), "财务负责人", gsdjxx.getCwfzryddh(), gsdjxx.getCwfzrgddh(), "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param customerId 客户id
|
* @param customerId 客户id
|
||||||
* @param name 联系人名称
|
* @param name 联系人名称
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.kakarote.crm.service.impl;
|
||||||
import cn.hutool.log.Log;
|
import cn.hutool.log.Log;
|
||||||
import cn.hutool.log.LogFactory;
|
import cn.hutool.log.LogFactory;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.kakarote.core.servlet.BaseServiceImpl;
|
import com.kakarote.core.servlet.BaseServiceImpl;
|
||||||
|
|
||||||
|
|
@ -12,6 +13,7 @@ import com.kakarote.crm.entity.DTO.CrmWebServiceResponseDTO;
|
||||||
import com.kakarote.crm.entity.PO.CrmGsdjxx;
|
import com.kakarote.crm.entity.PO.CrmGsdjxx;
|
||||||
import com.kakarote.crm.entity.VO.CrmQueryGsdjxxVO;
|
import com.kakarote.crm.entity.VO.CrmQueryGsdjxxVO;
|
||||||
import com.kakarote.crm.mapper.CrmGsdjxxMapper;
|
import com.kakarote.crm.mapper.CrmGsdjxxMapper;
|
||||||
|
import com.kakarote.crm.service.ICrmCustomerService;
|
||||||
import com.kakarote.crm.service.ICrmGsdjxxService;
|
import com.kakarote.crm.service.ICrmGsdjxxService;
|
||||||
import com.kakarote.crm.util.JsonUtil;
|
import com.kakarote.crm.util.JsonUtil;
|
||||||
import com.kakarote.crm.util.WebServiceHandlerUtil;
|
import com.kakarote.crm.util.WebServiceHandlerUtil;
|
||||||
|
|
@ -19,9 +21,11 @@ import com.kakarote.crm.webService.config.TaxWebServiceConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
|
@ -33,6 +37,9 @@ public class CrmGsdjxxServiceImpl extends BaseServiceImpl<CrmGsdjxxMapper,CrmGsd
|
||||||
@Autowired
|
@Autowired
|
||||||
private TaxWebServiceConfig config;
|
private TaxWebServiceConfig config;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmCustomerService customerService;
|
||||||
|
|
||||||
private static final Log log = LogFactory.get();
|
private static final Log log = LogFactory.get();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -60,6 +67,7 @@ public class CrmGsdjxxServiceImpl extends BaseServiceImpl<CrmGsdjxxMapper,CrmGsd
|
||||||
|
|
||||||
List<CrmGsdjxx> crmGsdjxxList = responseDTO.getData();
|
List<CrmGsdjxx> crmGsdjxxList = responseDTO.getData();
|
||||||
|
|
||||||
|
|
||||||
return processAndSaveData(crmGsdjxxList, crmQueryGsdjxxDTO);
|
return processAndSaveData(crmGsdjxxList, crmQueryGsdjxxDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,16 +123,24 @@ public class CrmGsdjxxServiceImpl extends BaseServiceImpl<CrmGsdjxxMapper,CrmGsd
|
||||||
|
|
||||||
private List<CrmQueryGsdjxxVO> processAndSaveData(List<CrmGsdjxx> crmGsdjxxList,CrmQueryGsdjxxDTO crmQueryGsdjxxDTO) {
|
private List<CrmQueryGsdjxxVO> processAndSaveData(List<CrmGsdjxx> crmGsdjxxList,CrmQueryGsdjxxDTO crmQueryGsdjxxDTO) {
|
||||||
log.info(crmGsdjxxList.toString());
|
log.info(crmGsdjxxList.toString());
|
||||||
|
List<CrmGsdjxx> crmGsdjxxesNew = new ArrayList<>();
|
||||||
crmGsdjxxList.forEach(crmGsdjxx -> {
|
crmGsdjxxList.forEach(crmGsdjxx -> {
|
||||||
crmGsdjxx.setYf(crmQueryGsdjxxDTO.getYf());
|
CrmGsdjxx one = new LambdaQueryChainWrapper<>(crmGsdjxxMapper)
|
||||||
crmGsdjxx.setXzqhDm(crmQueryGsdjxxDTO.getXzqhDm());
|
.eq(CrmGsdjxx::getNsrmc, crmGsdjxx.getNsrmc())
|
||||||
|
.last("limit 1").one();
|
||||||
|
if (one == null) {
|
||||||
|
crmGsdjxx.setYf(crmQueryGsdjxxDTO.getYf());
|
||||||
|
crmGsdjxx.setXzqhDm(crmQueryGsdjxxDTO.getXzqhDm());
|
||||||
|
crmGsdjxxesNew.add(crmGsdjxx);
|
||||||
|
customerService.addCustomerByDjxx(crmGsdjxx);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
new Thread(() -> {
|
||||||
|
int inserted = crmGsdjxxMapper.insertBatch(crmGsdjxxesNew);
|
||||||
|
log.info("成功插入了" + inserted + "条数据");
|
||||||
|
}).start();
|
||||||
|
|
||||||
int inserted = crmGsdjxxMapper.insertBatch(crmGsdjxxList);
|
return convertListToVO(crmGsdjxxesNew);
|
||||||
|
|
||||||
log.info("成功插入了" + inserted + "条数据");
|
|
||||||
|
|
||||||
return convertListToVO(crmGsdjxxList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -442,6 +442,15 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
CrmModelSaveBO crmModelSaveBO = new CrmModelSaveBO();
|
CrmModelSaveBO crmModelSaveBO = new CrmModelSaveBO();
|
||||||
crmModelSaveBO.setEntity(BeanUtil.beanToMap(crmCustomer));
|
crmModelSaveBO.setEntity(BeanUtil.beanToMap(crmCustomer));
|
||||||
List<CrmModelFiledVO> collect = customerDataList.stream().map(field -> BeanUtil.copyProperties(field, CrmModelFiledVO.class)).collect(Collectors.toList());
|
List<CrmModelFiledVO> collect = customerDataList.stream().map(field -> BeanUtil.copyProperties(field, CrmModelFiledVO.class)).collect(Collectors.toList());
|
||||||
|
//fliedKjhmgc 客户详细地址
|
||||||
|
CrmModelFiledVO fliedKjhmgc = new CrmModelFiledVO();
|
||||||
|
fliedKjhmgc.setFieldId(1101927);
|
||||||
|
fliedKjhmgc.setFieldName("fliedKjhmgc");
|
||||||
|
fliedKjhmgc.setName("客户详细地址");
|
||||||
|
fliedKjhmgc.setFieldType(0);
|
||||||
|
fliedKjhmgc.setType(2);
|
||||||
|
fliedKjhmgc.setValue(crmLeads.getAddress());
|
||||||
|
collect.add(fliedKjhmgc);
|
||||||
crmModelSaveBO.setField(collect);
|
crmModelSaveBO.setField(collect);
|
||||||
crmModelSaveBoMap.put(customerId,crmModelSaveBO);
|
crmModelSaveBoMap.put(customerId,crmModelSaveBO);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,7 @@ import java.util.*;
|
||||||
|
|
||||||
import static com.kakarote.core.common.SystemCodeEnum.SYSTEM_NO_AUTH;
|
import static com.kakarote.core.common.SystemCodeEnum.SYSTEM_NO_AUTH;
|
||||||
import static com.kakarote.crm.constant.CrmCodeEnum.CUSTOMER_XX_Y;
|
import static com.kakarote.crm.constant.CrmCodeEnum.CUSTOMER_XX_Y;
|
||||||
import static com.kakarote.crm.constant.CrmPoolEnum.GSMGWZKH;
|
import static com.kakarote.crm.constant.CrmPoolEnum.*;
|
||||||
import static com.kakarote.crm.constant.CrmPoolEnum.PXQDMDPOOL;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
|
|
@ -230,6 +229,8 @@ public class CrmOpenApiServiceImpl implements ICrmOpenApiService {
|
||||||
poolBO.setPoolId(PXQDMDPOOL.getId());
|
poolBO.setPoolId(PXQDMDPOOL.getId());
|
||||||
}else if ("公司门户网站客户".equals(source)){
|
}else if ("公司门户网站客户".equals(source)){
|
||||||
poolBO.setPoolId(GSMGWZKH.getId());
|
poolBO.setPoolId(GSMGWZKH.getId());
|
||||||
|
}else if ("工商新开业登记信息".equals(source)){
|
||||||
|
poolBO.setPoolId(GSXKYDJXX.getId());
|
||||||
}
|
}
|
||||||
customerService.updateCustomerByIds(poolBO);
|
customerService.updateCustomerByIds(poolBO);
|
||||||
return customerId;
|
return customerId;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import com.kakarote.crm.entity.DTO.CrmWebServiceResponseDTO;
|
||||||
import com.kakarote.crm.entity.PO.CrmQyjbxx;
|
import com.kakarote.crm.entity.PO.CrmQyjbxx;
|
||||||
import com.kakarote.crm.entity.PO.CrmQyjbxxDjrqDetail;
|
import com.kakarote.crm.entity.PO.CrmQyjbxxDjrqDetail;
|
||||||
import com.kakarote.crm.entity.PO.CrmSwjgDm;
|
import com.kakarote.crm.entity.PO.CrmSwjgDm;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmSyQyjbxxErr;
|
||||||
import com.kakarote.crm.mapper.CrmQyjbxxMapper;
|
import com.kakarote.crm.mapper.CrmQyjbxxMapper;
|
||||||
import com.kakarote.crm.service.*;
|
import com.kakarote.crm.service.*;
|
||||||
import com.kakarote.crm.util.AecUtils;
|
import com.kakarote.crm.util.AecUtils;
|
||||||
|
|
@ -54,6 +55,8 @@ public class CrmQyjbxxServiceImpl extends BaseServiceImpl<CrmQyjbxxMapper, CrmQy
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICrmGsdjxxService crmGsdjxxService;
|
private ICrmGsdjxxService crmGsdjxxService;
|
||||||
|
|
||||||
|
private ICrmSyQyjbxxErrService crmSyQyjbxxErrService;
|
||||||
|
|
||||||
// 在类中定义线程池
|
// 在类中定义线程池
|
||||||
private ExecutorService executorService = Executors.newFixedThreadPool(30);
|
private ExecutorService executorService = Executors.newFixedThreadPool(30);
|
||||||
|
|
||||||
|
|
@ -240,6 +243,12 @@ public class CrmQyjbxxServiceImpl extends BaseServiceImpl<CrmQyjbxxMapper, CrmQy
|
||||||
this.syncDataBySwjgdmAndTime(crmSyncQyjbxxDTO);
|
this.syncDataBySwjgdmAndTime(crmSyncQyjbxxDTO);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("同步企业出现异常:{}", e.getMessage());
|
log.error("同步企业出现异常:{}", e.getMessage());
|
||||||
|
//记录失败信息
|
||||||
|
CrmSyQyjbxxErr crmSyQyjbxxErr = new CrmSyQyjbxxErr();
|
||||||
|
crmSyQyjbxxErr.setKs(monthRange.getStartDate());
|
||||||
|
crmSyQyjbxxErr.setJs(monthRange.getEndDate());
|
||||||
|
crmSyQyjbxxErr.setErr(e.getMessage());
|
||||||
|
crmSyQyjbxxErrService.insert(crmSyQyjbxxErr);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue