查询工商登记开业信息
This commit is contained in:
parent
8dc69d4870
commit
e8808e805c
|
|
@ -181,13 +181,11 @@ private static Object decryptValue(String key, Object value) {
|
||||||
return SensitiveDataMaskUtil.maskName(value);
|
return SensitiveDataMaskUtil.maskName(value);
|
||||||
}else if ("address".equals(key)) {
|
}else if ("address".equals(key)) {
|
||||||
return SensitiveDataMaskUtil.maskAddress(value);
|
return SensitiveDataMaskUtil.maskAddress(value);
|
||||||
}else if ("telephone".equals(key)) {
|
}else if ("telephone".equals(key)) { //详情页联系人姓名
|
||||||
return SensitiveDataMaskUtil.maskPhone(value);
|
|
||||||
}else if ("name".equals(key)) {
|
|
||||||
return SensitiveDataMaskUtil.maskName(value);
|
return SensitiveDataMaskUtil.maskName(value);
|
||||||
}else if ("fliedKjhmgc".equals(key)) {
|
}else if ("fliedKjhmgc".equals(key)) {
|
||||||
return SensitiveDataMaskUtil.maskAddress(value);
|
return SensitiveDataMaskUtil.maskAddress(value);
|
||||||
}else if ("fieldCbiasz".equals(key)) {
|
} else if ("name".equals(key)) { //联系人模块中的联系人姓名
|
||||||
return SensitiveDataMaskUtil.maskName(value);
|
return SensitiveDataMaskUtil.maskName(value);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|
@ -204,6 +202,12 @@ private static Object decryptValue(String key, Object value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ("fieldDomqff".equals(fieldName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if ("fieldAcqnin".equals(fieldName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.kakarote.crm.controller;
|
||||||
|
|
||||||
|
import com.kakarote.core.common.R;
|
||||||
|
import com.kakarote.core.common.Result;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmDjzclx;
|
||||||
|
import com.kakarote.crm.service.ICrmDjzclxService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/CrmDjzclx")
|
||||||
|
@Api(tags = "登记注册类型")
|
||||||
|
public class CrmDjzclxController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmDjzclxService crmDjzclxService;
|
||||||
|
|
||||||
|
@PostMapping("/queryByDjzclxDm/{djzclxDm}")
|
||||||
|
public Result<CrmDjzclx> queryByDjzclxDm(@PathVariable("djzclxDm") String djzclxDm) {
|
||||||
|
CrmDjzclx crmDjzclx = crmDjzclxService.queryByDjzclxDm(djzclxDm);
|
||||||
|
return R.ok(crmDjzclx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/insert")
|
||||||
|
public Result<Integer> insert(@RequestBody CrmDjzclx crmDjzclx) {
|
||||||
|
return R.ok(crmDjzclxService.insert(crmDjzclx));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public Result<Integer> delete(@RequestBody CrmDjzclx crmDjzclx) {
|
||||||
|
return R.ok(crmDjzclxService.delete(crmDjzclx));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/update")
|
||||||
|
public Result<Integer> update(@RequestBody CrmDjzclx crmDjzclx) {
|
||||||
|
return R.ok(crmDjzclxService.update(crmDjzclx));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package com.kakarote.crm.controller;
|
||||||
|
|
||||||
import com.kakarote.core.common.R;
|
import com.kakarote.core.common.R;
|
||||||
import com.kakarote.core.common.Result;
|
import com.kakarote.core.common.Result;
|
||||||
|
import com.kakarote.core.entity.BasePage;
|
||||||
import com.kakarote.crm.entity.DTO.CrmQueryGsdjxxDTO;
|
import com.kakarote.crm.entity.DTO.CrmQueryGsdjxxDTO;
|
||||||
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;
|
||||||
|
|
@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/crmGsdjxx")
|
@RequestMapping("/crmGsdjxx")
|
||||||
|
|
@ -34,4 +36,11 @@ public class CrmGsdjxxController {
|
||||||
List<CrmGsdjxx> crmGsdjxxList = iCrmGsdjxxService.queryByNsrmc(nsrmc);
|
List<CrmGsdjxx> crmGsdjxxList = iCrmGsdjxxService.queryByNsrmc(nsrmc);
|
||||||
return R.ok(crmGsdjxxList);
|
return R.ok(crmGsdjxxList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryGsdjxxByDate/{date}")
|
||||||
|
@ApiOperation("根据日期查询(默认是当天)")
|
||||||
|
public Result<BasePage<Map<String, Object>>> queryGsdjxxByDate(@PathVariable String date) {
|
||||||
|
BasePage<Map<String, Object>> basePage = iCrmGsdjxxService.queryGsdjxxByDate(date);
|
||||||
|
return R.ok(basePage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ public class CrmQyjbxxController {
|
||||||
private ICrmQyjbxxService crmQyjbxxService;
|
private ICrmQyjbxxService crmQyjbxxService;
|
||||||
|
|
||||||
@PostMapping("/sync")
|
@PostMapping("/sync")
|
||||||
|
@ParamAspect
|
||||||
public void syncQyjbxx(){
|
public void syncQyjbxx(){
|
||||||
crmQyjbxxService.syncQyjbxx();
|
crmQyjbxxService.syncQyjbxx();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,15 @@ public class CrmQueryGsdjxxDTO implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
// 登记序号
|
// 月份
|
||||||
private String yf;
|
private String yf;
|
||||||
|
|
||||||
private String rq;
|
private String rq;
|
||||||
|
|
||||||
// 评价年度
|
// 行政区划代码
|
||||||
private String xzqhDm;
|
private String xzqhDm;
|
||||||
|
|
||||||
//地址
|
// 地址
|
||||||
private String xzqhMc;
|
private String xzqhMc;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.kakarote.crm.entity.PO;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("wk_crm_djzclx")
|
||||||
|
@ApiModel(value = "CrmDjzclx对象", description = "登记注册类型表")
|
||||||
|
public class CrmDjzclx implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 登记注册类型代码
|
||||||
|
private String djzclxDm;
|
||||||
|
|
||||||
|
//登记注册类型名称
|
||||||
|
private String djzclxmc;
|
||||||
|
|
||||||
|
//顶类标志
|
||||||
|
private String dlbz;
|
||||||
|
|
||||||
|
//中类标志
|
||||||
|
private String zlbz;
|
||||||
|
|
||||||
|
//小类标志
|
||||||
|
private String xlbz;
|
||||||
|
|
||||||
|
//上级登记注册类型代码
|
||||||
|
private String sjdjzclxDm;
|
||||||
|
|
||||||
|
//选用标志
|
||||||
|
private String xybz;
|
||||||
|
|
||||||
|
//有效标志
|
||||||
|
private String yxbz;
|
||||||
|
}
|
||||||
|
|
@ -52,7 +52,6 @@ public class CrmGsdjxx implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 登记注册类型代码
|
* 登记注册类型代码
|
||||||
*/
|
*/
|
||||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
|
||||||
private String djzclxDm; // 对应SQL: djzclx_dm
|
private String djzclxDm; // 对应SQL: djzclx_dm
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -46,20 +47,20 @@ public class CrmLeads implements Serializable {
|
||||||
@ApiModelProperty(value = "下次联系时间")
|
@ApiModelProperty(value = "下次联系时间")
|
||||||
private Date nextTime;
|
private Date nextTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "电话")
|
@ApiModelProperty(value = "联系人姓名")
|
||||||
@TableField(typeHandler = SensitiveDataConverter.class)
|
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||||
private String telephone;
|
private String telephone;
|
||||||
|
|
||||||
@ApiModelProperty(value = "手机号")
|
@ApiModelProperty(value = "手机号")
|
||||||
@TableField(typeHandler = SensitiveDataConverter.class)
|
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
@ApiModelProperty(value = "邮箱")
|
@ApiModelProperty(value = "邮箱")
|
||||||
@TableField(typeHandler = SensitiveDataConverter.class)
|
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@ApiModelProperty(value = "地址")
|
@ApiModelProperty(value = "地址")
|
||||||
@TableField(typeHandler = SensitiveDataConverter.class)
|
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.kakarote.crm.mapper;
|
||||||
|
|
||||||
|
import com.kakarote.core.servlet.BaseMapper;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmDjzclx;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface CrmDjzclxMapper extends BaseMapper<CrmDjzclx> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.kakarote.crm.mapper.CrmDjzclxMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.kakarote.crm.entity.PO.CrmDjzclx">
|
||||||
|
<result column="djzclx_dm" jdbcType="VARCHAR" property="djzclxDm" />
|
||||||
|
<result column="djzclxmc" jdbcType="VARCHAR" property="djzclxmc" />
|
||||||
|
<result column="dlbz" jdbcType="VARCHAR" property="dlbz" />
|
||||||
|
<result column="zlbz" jdbcType="VARCHAR" property="zlbz" />
|
||||||
|
<result column="xlbz" jdbcType="VARCHAR" property="xlbz" />
|
||||||
|
<result column="sjdjzclx_dm" jdbcType="VARCHAR" property="sjdjzclxDm" />
|
||||||
|
<result column="xybz" jdbcType="VARCHAR" property="xybz" />
|
||||||
|
<result column="yxbz" jdbcType="VARCHAR" property="yxbz" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.kakarote.crm.service;
|
||||||
|
|
||||||
|
import com.kakarote.core.servlet.BaseService;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmDjzclx;
|
||||||
|
|
||||||
|
|
||||||
|
public interface ICrmDjzclxService extends BaseService<CrmDjzclx> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过登记注册类型代码查询
|
||||||
|
*/
|
||||||
|
CrmDjzclx queryByDjzclxDm(String djzclxDm);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*/
|
||||||
|
int update(CrmDjzclx djzclx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
int insert(CrmDjzclx djzclx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
int delete(CrmDjzclx djzclx);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.kakarote.crm.service;
|
package com.kakarote.crm.service;
|
||||||
|
|
||||||
|
import com.kakarote.core.common.Result;
|
||||||
|
import com.kakarote.core.entity.BasePage;
|
||||||
import com.kakarote.core.servlet.BaseService;
|
import com.kakarote.core.servlet.BaseService;
|
||||||
import com.kakarote.crm.entity.DTO.CrmQueryGsdjxxDTO;
|
import com.kakarote.crm.entity.DTO.CrmQueryGsdjxxDTO;
|
||||||
import com.kakarote.crm.entity.PO.CrmGsdjxx;
|
import com.kakarote.crm.entity.PO.CrmGsdjxx;
|
||||||
|
|
@ -7,6 +9,7 @@ import com.kakarote.crm.entity.PO.CrmQyxxfp;
|
||||||
import com.kakarote.crm.entity.VO.CrmQueryGsdjxxVO;
|
import com.kakarote.crm.entity.VO.CrmQueryGsdjxxVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ICrmGsdjxxService extends BaseService<CrmGsdjxx> {
|
public interface ICrmGsdjxxService extends BaseService<CrmGsdjxx> {
|
||||||
|
|
||||||
|
|
@ -20,4 +23,9 @@ public interface ICrmGsdjxxService extends BaseService<CrmGsdjxx> {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CrmGsdjxx> queryByNsrmc(String nsrmc);
|
List<CrmGsdjxx> queryByNsrmc(String nsrmc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据日期查询(默认是当天)
|
||||||
|
*/
|
||||||
|
BasePage<Map<String, Object>> queryGsdjxxByDate(String date);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.kakarote.crm.entity.BO.CrmModelSaveBO;
|
||||||
import com.kakarote.crm.entity.BO.CrmSearchBO;
|
import com.kakarote.crm.entity.BO.CrmSearchBO;
|
||||||
import com.kakarote.crm.entity.BO.CrmUpdateInformationBO;
|
import com.kakarote.crm.entity.BO.CrmUpdateInformationBO;
|
||||||
import com.kakarote.crm.entity.PO.CrmLeads;
|
import com.kakarote.crm.entity.PO.CrmLeads;
|
||||||
|
import com.kakarote.crm.entity.VO.CrmGetPlaintextVO;
|
||||||
import com.kakarote.crm.entity.VO.CrmInfoNumVO;
|
import com.kakarote.crm.entity.VO.CrmInfoNumVO;
|
||||||
import com.kakarote.crm.entity.VO.CrmModelFiledVO;
|
import com.kakarote.crm.entity.VO.CrmModelFiledVO;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
@ -136,4 +137,9 @@ public interface ICrmLeadsService extends BaseService<CrmLeads> {
|
||||||
List<String> eventLeads(CrmEventBO crmEventBO);
|
List<String> eventLeads(CrmEventBO crmEventBO);
|
||||||
|
|
||||||
BasePage<Map<String, Object>> eventLeadsPageList(QueryEventCrmPageBO eventCrmPageBO);
|
BasePage<Map<String, Object>> eventLeadsPageList(QueryEventCrmPageBO eventCrmPageBO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 剧哦去铭文
|
||||||
|
*/
|
||||||
|
String getLeadsPlaintext(CrmGetPlaintextVO plaintextVO);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,6 @@ public class CrmContactsServiceImpl extends BaseServiceImpl<CrmContactsMapper, C
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public CrmModel queryById(Integer id) {
|
public CrmModel queryById(Integer id) {
|
||||||
System.out.println("loading......");
|
|
||||||
CrmModel crmModel;
|
CrmModel crmModel;
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
crmModel = getBaseMapper().queryById(id, UserUtil.getUserId());
|
crmModel = getBaseMapper().queryById(id, UserUtil.getUserId());
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,12 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICrmOpenApiService crmOpenApiService;
|
private ICrmOpenApiService crmOpenApiService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmLeadsService crmLeadsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmDjzclxService crmDjzclxService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询字段配置
|
* 查询字段配置
|
||||||
*
|
*
|
||||||
|
|
@ -391,17 +397,13 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据脱敏
|
* 数据脱敏
|
||||||
*
|
|
||||||
* @param crmModel
|
* @param crmModel
|
||||||
*/
|
*/
|
||||||
private CrmModel encryptSensitiveData(CrmModel crmModel) {
|
private CrmModel encryptSensitiveData(CrmModel crmModel){
|
||||||
//遍历数据
|
String contactsMobile = (String)crmModel.get("mobile");
|
||||||
//crmModel.forEach((key, value) -> System.out.println("Key: " + key + ", Value: " + value));
|
String name = (String)crmModel.get("telephone");//详情页的联系人姓名
|
||||||
// 获取数据
|
String contactsName = (String)crmModel.get("contactsName");
|
||||||
String contactsMobile = (String) crmModel.get("contactsMobile");
|
String email = (String)crmModel.get("email");
|
||||||
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 fliedKjhmgc = (String) crmModel.get("fliedKjhmgc");//详情页的详细地址
|
||||||
//String contactsAddress = (String) crmModel.get("contactsAddress");
|
//String contactsAddress = (String) crmModel.get("contactsAddress");
|
||||||
// 脱敏处理
|
// 脱敏处理
|
||||||
|
|
@ -423,7 +425,6 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取客户明文
|
* 获取客户明文
|
||||||
*
|
|
||||||
* @param plaintextVO
|
* @param plaintextVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -458,14 +459,13 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
//遍历数据
|
//遍历数据
|
||||||
//crmModel.forEach((key, value) -> System.out.println("Key: " + key + ", Value: " + value));
|
//crmModel.forEach((key, value) -> System.out.println("Key: " + key + ", Value: " + value));
|
||||||
String plaintext = null;
|
String plaintext = null;
|
||||||
if (plaintextVO.getField().equals("mobile")) {
|
if (plaintextVO.getField().equals("mobile")){
|
||||||
plaintext = (String) crmModel.get("mobile");
|
plaintext = (String) crmModel.get("mobile");
|
||||||
} else if (plaintextVO.getField().equals("email")) {
|
} else if (plaintextVO.getField().equals("email")){
|
||||||
plaintext = (String) crmModel.get("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 = (String) crmModel.get("telephone");
|
||||||
plaintext = crmContactsService.getContactsName(contactsId);
|
} else if (plaintextVO.getField().equals("fliedKjhmgc")){
|
||||||
} else if (plaintextVO.getField().equals("fliedKjhmgc")) {
|
|
||||||
plaintext = (String) crmModel.get("fliedKjhmgc");
|
plaintext = (String) crmModel.get("fliedKjhmgc");
|
||||||
}
|
}
|
||||||
return plaintext;
|
return plaintext;
|
||||||
|
|
@ -473,17 +473,18 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断crmType
|
* 判断crmType
|
||||||
*
|
|
||||||
* @param plaintextVO
|
* @param plaintextVO
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getPlaintext(CrmGetPlaintextVO plaintextVO) {
|
public String getPlaintext(CrmGetPlaintextVO plaintextVO){
|
||||||
// 判断类型
|
// 判断类型
|
||||||
String plaintext = null;
|
String plaintext = null;
|
||||||
if (plaintextVO.getCrmType().equals("customer")) {
|
if (plaintextVO.getCrmType().equals("customer")) {
|
||||||
plaintext = getCustomerPlaintext(plaintextVO);
|
plaintext = getCustomerPlaintext(plaintextVO);
|
||||||
} else if (plaintextVO.getCrmType().equals("contacts")) {
|
} else if (plaintextVO.getCrmType().equals("contacts")) {
|
||||||
plaintext = crmContactsService.getContactsPlaintext(plaintextVO);
|
plaintext = crmContactsService.getContactsPlaintext(plaintextVO);
|
||||||
|
} else if (plaintextVO.getCrmType().equals("leads")) {
|
||||||
|
plaintext = crmLeadsService.getLeadsPlaintext(plaintextVO);
|
||||||
}
|
}
|
||||||
return plaintext;
|
return plaintext;
|
||||||
}
|
}
|
||||||
|
|
@ -625,6 +626,7 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
map.put("customerName", crmCustomer.getCustomerName());
|
map.put("customerName", crmCustomer.getCustomerName());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addCustomerByGsdjxx(CrmGsdjxx gsdjxx) {
|
public void addCustomerByGsdjxx(CrmGsdjxx gsdjxx) {
|
||||||
CrmBusinessSaveBO crmModel = new CrmBusinessSaveBO();
|
CrmBusinessSaveBO crmModel = new CrmBusinessSaveBO();
|
||||||
Map<String, Object> entity = new HashMap<>();
|
Map<String, Object> entity = new HashMap<>();
|
||||||
|
|
@ -655,6 +657,9 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
field.setValue(gsdjxx.getKyrq());
|
field.setValue(gsdjxx.getKyrq());
|
||||||
}else if ("客户名称".equals(crmField.getName())){
|
}else if ("客户名称".equals(crmField.getName())){
|
||||||
field.setValue(gsdjxx.getNsrmc());
|
field.setValue(gsdjxx.getNsrmc());
|
||||||
|
}else if("登记注册类型".equals(crmField.getName())){
|
||||||
|
CrmDjzclx crmDjzclx = crmDjzclxService.queryByDjzclxDm(gsdjxx.getDjzclxDm());
|
||||||
|
field.setValue(crmDjzclx.getDjzclxmc());
|
||||||
}else {
|
}else {
|
||||||
field.setValue("");
|
field.setValue("");
|
||||||
}
|
}
|
||||||
|
|
@ -708,14 +713,14 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
fieldZzmdcm.setValue("");
|
fieldZzmdcm.setValue("");
|
||||||
list.add(fieldZzmdcm);
|
list.add(fieldZzmdcm);
|
||||||
// 所属税务局
|
// 所属税务局
|
||||||
CrmModelFiledVO fieldAvfjfa = new CrmModelFiledVO();
|
CrmModelFiledVO fliedJhsivt = new CrmModelFiledVO();
|
||||||
fieldAvfjfa.setFieldId(1101925);
|
fliedJhsivt.setFieldId(1101925);
|
||||||
fieldAvfjfa.setFieldName("fliedJhsivt");
|
fliedJhsivt.setFieldName("fliedJhsivt");
|
||||||
fieldAvfjfa.setName("所属税务局");
|
fliedJhsivt.setName("所属税务局");
|
||||||
fieldAvfjfa.setFieldType(0);
|
fliedJhsivt.setFieldType(0);
|
||||||
fieldAvfjfa.setType(3);
|
fliedJhsivt.setType(3);
|
||||||
fieldAvfjfa.setValue("");
|
fliedJhsivt.setValue("");
|
||||||
list.add(fieldAvfjfa);
|
list.add(fliedJhsivt);
|
||||||
//用户标记
|
//用户标记
|
||||||
CrmModelFiledVO fliedMtfnrf = new CrmModelFiledVO();
|
CrmModelFiledVO fliedMtfnrf = new CrmModelFiledVO();
|
||||||
fliedMtfnrf.setFieldId(1101920);
|
fliedMtfnrf.setFieldId(1101920);
|
||||||
|
|
@ -788,6 +793,7 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl<CrmCustomerMapper, C
|
||||||
source.setType(3);
|
source.setType(3);
|
||||||
source.setValue("");
|
source.setValue("");
|
||||||
list.add(source);
|
list.add(source);
|
||||||
|
//开业日期
|
||||||
// //5 新开票数 fieldYbwemm 1101919
|
// //5 新开票数 fieldYbwemm 1101919
|
||||||
// CrmModelFiledVO fieldYbwemm = new CrmModelFiledVO();
|
// CrmModelFiledVO fieldYbwemm = new CrmModelFiledVO();
|
||||||
// fieldYbwemm.setFieldId(1101919);
|
// fieldYbwemm.setFieldId(1101919);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.kakarote.crm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.kakarote.core.servlet.BaseServiceImpl;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmDjzclx;
|
||||||
|
import com.kakarote.crm.mapper.CrmDjzclxMapper;
|
||||||
|
import com.kakarote.crm.service.ICrmDjzclxService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class CrmDjzclxServiceImpl extends BaseServiceImpl<CrmDjzclxMapper, CrmDjzclx> implements ICrmDjzclxService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CrmDjzclxMapper djzclxMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrmDjzclx queryByDjzclxDm(String djzclxDm) {
|
||||||
|
LambdaQueryWrapper<CrmDjzclx> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(CrmDjzclx::getDjzclxDm, djzclxDm);
|
||||||
|
return djzclxMapper.selectOne(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int update(CrmDjzclx djzclx) {
|
||||||
|
LambdaQueryWrapper<CrmDjzclx> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(CrmDjzclx::getDjzclxDm, djzclx.getDjzclxDm());
|
||||||
|
return djzclxMapper.update(djzclx,wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(CrmDjzclx djzclx) {
|
||||||
|
return djzclxMapper.insert(djzclx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int delete(CrmDjzclx djzclx) {
|
||||||
|
LambdaQueryWrapper<CrmDjzclx> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(CrmDjzclx::getDjzclxDm, djzclx.getDjzclxDm());
|
||||||
|
return djzclxMapper.delete(wrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,14 +5,18 @@ 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.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.kakarote.core.common.Result;
|
||||||
|
import com.kakarote.core.entity.BasePage;
|
||||||
import com.kakarote.core.servlet.BaseServiceImpl;
|
import com.kakarote.core.servlet.BaseServiceImpl;
|
||||||
|
|
||||||
import com.kakarote.crm.constant.CrmTaxServiceIdEnum;
|
import com.kakarote.crm.constant.CrmTaxServiceIdEnum;
|
||||||
|
import com.kakarote.crm.entity.BO.CrmSearchBO;
|
||||||
import com.kakarote.crm.entity.DTO.CrmQueryGsdjxxDTO;
|
import com.kakarote.crm.entity.DTO.CrmQueryGsdjxxDTO;
|
||||||
import com.kakarote.crm.entity.DTO.CrmWebServiceResponseDTO;
|
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.ICrmCustomerPoolService;
|
||||||
import com.kakarote.crm.service.ICrmCustomerService;
|
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;
|
||||||
|
|
@ -21,11 +25,8 @@ 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.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
|
@ -40,6 +41,9 @@ public class CrmGsdjxxServiceImpl extends BaseServiceImpl<CrmGsdjxxMapper,CrmGsd
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICrmCustomerService customerService;
|
private ICrmCustomerService customerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmCustomerPoolService crmCustomerPoolService;
|
||||||
|
|
||||||
private static final Log log = LogFactory.get();
|
private static final Log log = LogFactory.get();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -68,6 +72,10 @@ public class CrmGsdjxxServiceImpl extends BaseServiceImpl<CrmGsdjxxMapper,CrmGsd
|
||||||
|
|
||||||
List<CrmGsdjxx> crmGsdjxxList = responseDTO.getData();
|
List<CrmGsdjxx> crmGsdjxxList = responseDTO.getData();
|
||||||
|
|
||||||
|
if (crmGsdjxxList == null || crmGsdjxxList.isEmpty()) {
|
||||||
|
log.info("未查询到数据!");
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
return processAndSaveData(crmGsdjxxList, crmQueryGsdjxxDTO);
|
return processAndSaveData(crmGsdjxxList, crmQueryGsdjxxDTO);
|
||||||
}
|
}
|
||||||
|
|
@ -145,4 +153,29 @@ public class CrmGsdjxxServiceImpl extends BaseServiceImpl<CrmGsdjxxMapper,CrmGsd
|
||||||
return convertListToVO(crmGsdjxxesNew);
|
return convertListToVO(crmGsdjxxesNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BasePage<Map<String, Object>> queryGsdjxxByDate(String date) {
|
||||||
|
System.out.println(date);
|
||||||
|
|
||||||
|
List<String> values = new ArrayList<>();
|
||||||
|
values.add(date);
|
||||||
|
|
||||||
|
CrmSearchBO.Search search = new CrmSearchBO.Search();
|
||||||
|
search.setFormType("text");
|
||||||
|
search.setName("website");
|
||||||
|
search.setValues(values);
|
||||||
|
search.setSearchEnum(CrmSearchBO.FieldSearchEnum.IS);
|
||||||
|
|
||||||
|
List<CrmSearchBO.Search> searchList = new ArrayList<>();
|
||||||
|
searchList.add(search);
|
||||||
|
|
||||||
|
CrmSearchBO searchBO = new CrmSearchBO();
|
||||||
|
searchBO.setPoolId(34557);
|
||||||
|
searchBO.setSearch("");
|
||||||
|
searchBO.setSearchList(searchList);
|
||||||
|
|
||||||
|
BasePage<Map<String, Object>> basePage = crmCustomerPoolService.queryPageList(searchBO, false);
|
||||||
|
|
||||||
|
return basePage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.kakarote.core.feign.crm.entity.CrmEventBO;
|
||||||
import com.kakarote.core.feign.crm.entity.QueryEventCrmPageBO;
|
import com.kakarote.core.feign.crm.entity.QueryEventCrmPageBO;
|
||||||
import com.kakarote.core.feign.crm.entity.SimpleCrmEntity;
|
import com.kakarote.core.feign.crm.entity.SimpleCrmEntity;
|
||||||
import com.kakarote.core.field.FieldService;
|
import com.kakarote.core.field.FieldService;
|
||||||
|
import com.kakarote.core.security.util.SensitiveDataMaskUtil;
|
||||||
import com.kakarote.core.servlet.ApplicationContextHolder;
|
import com.kakarote.core.servlet.ApplicationContextHolder;
|
||||||
import com.kakarote.core.servlet.BaseServiceImpl;
|
import com.kakarote.core.servlet.BaseServiceImpl;
|
||||||
import com.kakarote.core.servlet.upload.FileEntity;
|
import com.kakarote.core.servlet.upload.FileEntity;
|
||||||
|
|
@ -40,6 +41,7 @@ import com.kakarote.crm.entity.BO.CrmSearchBO;
|
||||||
import com.kakarote.crm.entity.BO.CrmUpdateInformationBO;
|
import com.kakarote.crm.entity.BO.CrmUpdateInformationBO;
|
||||||
import com.kakarote.crm.entity.PO.*;
|
import com.kakarote.crm.entity.PO.*;
|
||||||
import com.kakarote.crm.entity.VO.CrmFieldSortVO;
|
import com.kakarote.crm.entity.VO.CrmFieldSortVO;
|
||||||
|
import com.kakarote.crm.entity.VO.CrmGetPlaintextVO;
|
||||||
import com.kakarote.crm.entity.VO.CrmInfoNumVO;
|
import com.kakarote.crm.entity.VO.CrmInfoNumVO;
|
||||||
import com.kakarote.crm.entity.VO.CrmModelFiledVO;
|
import com.kakarote.crm.entity.VO.CrmModelFiledVO;
|
||||||
import com.kakarote.crm.mapper.CrmLeadsMapper;
|
import com.kakarote.crm.mapper.CrmLeadsMapper;
|
||||||
|
|
@ -235,10 +237,9 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
} else {
|
} else {
|
||||||
crmModel = new CrmModel(CrmEnum.LEADS.getType());
|
crmModel = new CrmModel(CrmEnum.LEADS.getType());
|
||||||
}
|
}
|
||||||
// 数据脱敏
|
|
||||||
return encryptSensitiveData(crmModel);
|
return encryptSensitiveData(crmModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解密线索敏感数据
|
* 解密线索敏感数据
|
||||||
* @param model 线索数据模型
|
* @param model 线索数据模型
|
||||||
|
|
@ -258,7 +259,7 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据脱敏
|
* 数据脱敏
|
||||||
* @param crmModel 线索数据模型
|
* @param crmModel 线索数据模型
|
||||||
|
|
@ -267,16 +268,16 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
private CrmModel encryptSensitiveData(CrmModel crmModel) {
|
private CrmModel encryptSensitiveData(CrmModel crmModel) {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
String mobile = (String)crmModel.get("mobile");
|
String mobile = (String)crmModel.get("mobile");
|
||||||
String telephone = (String)crmModel.get("telephone");
|
String telephone = (String)crmModel.get("telephone");//联系人姓名
|
||||||
String email = (String)crmModel.get("email");
|
String email = (String)crmModel.get("email");
|
||||||
String address = (String)crmModel.get("address");
|
String address = (String)crmModel.get("address");
|
||||||
|
|
||||||
// 脱敏处理
|
// 脱敏处理
|
||||||
String maskMobile = mobile != null ? SensitiveDataMaskUtil.maskPhone(mobile) : null;
|
String maskMobile = mobile != null ? SensitiveDataMaskUtil.maskPhone(mobile) : null;
|
||||||
String maskTelephone = telephone != null ? SensitiveDataMaskUtil.maskPhone(telephone) : null;
|
String maskTelephone = telephone != null ? SensitiveDataMaskUtil.maskName(telephone) : null;
|
||||||
String maskEmail = email != null ? SensitiveDataMaskUtil.maskEmail(email) : null;
|
String maskEmail = email != null ? SensitiveDataMaskUtil.maskEmail(email) : null;
|
||||||
String maskAddress = address != null ? SensitiveDataMaskUtil.maskAddress(address) : null;
|
String maskAddress = address != null ? SensitiveDataMaskUtil.maskAddress(address) : null;
|
||||||
|
|
||||||
// 重新组装crmModel
|
// 重新组装crmModel
|
||||||
if (maskMobile != null) {
|
if (maskMobile != null) {
|
||||||
crmModel.replace("mobile", maskMobile);
|
crmModel.replace("mobile", maskMobile);
|
||||||
|
|
@ -290,10 +291,25 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
if (maskAddress != null) {
|
if (maskAddress != null) {
|
||||||
crmModel.replace("address", maskAddress);
|
crmModel.replace("address", maskAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
return crmModel;
|
return crmModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLeadsPlaintext(CrmGetPlaintextVO plaintextVO) {
|
||||||
|
CrmLeads leads = lambdaQuery().eq(CrmLeads::getLeadsId, plaintextVO.getId()).one();
|
||||||
|
String plaintext = null;
|
||||||
|
if (plaintextVO.getField().equals("mobile")){
|
||||||
|
plaintext = leads.getMobile();
|
||||||
|
} else if (plaintextVO.getField().equals("email")){
|
||||||
|
plaintext = leads.getEmail();
|
||||||
|
} else if (plaintextVO.getField().equals("telephone")){ //详情页联系人姓名
|
||||||
|
plaintext = leads.getTelephone();
|
||||||
|
} else if (plaintextVO.getField().equals("address")){
|
||||||
|
plaintext = leads.getAddress();
|
||||||
|
}
|
||||||
|
return plaintext;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存或新增信息
|
* 保存或新增信息
|
||||||
|
|
@ -406,6 +422,49 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
updateField(map, leadsIds);
|
updateField(map, leadsIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字段中的下划线去掉,并且将下划线后面的字母大写
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String removeUnderscoresAndCapitalize(String str) {
|
||||||
|
if (str == null || str.isEmpty()) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < str.length(); i++) {
|
||||||
|
char currentChar = str.charAt(i);
|
||||||
|
if (currentChar == '_') {
|
||||||
|
// 跳过下划线,并将下一个字符大写
|
||||||
|
i++;
|
||||||
|
if (i < str.length()) {
|
||||||
|
sb.append(Character.toUpperCase(str.charAt(i)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sb.append(currentChar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 不加密直接返回
|
||||||
|
private CrmModel fetchById(Integer id) {
|
||||||
|
CrmModel crmModel;
|
||||||
|
if (id != null) {
|
||||||
|
crmModel = getBaseMapper().queryById(id, UserUtil.getUserId());
|
||||||
|
crmModel.setLabel(CrmEnum.LEADS.getType());
|
||||||
|
crmModel.setOwnerUserName(UserCacheUtil.getUserName(crmModel.getOwnerUserId()));
|
||||||
|
crmLeadsDataService.setDataByBatchId(crmModel);
|
||||||
|
List<String> stringList = ApplicationContextHolder.getBean(ICrmRoleFieldService.class).queryNoAuthField(crmModel.getLabel());
|
||||||
|
stringList.forEach(crmModel::remove);
|
||||||
|
|
||||||
|
// 解密敏感数据
|
||||||
|
decryptSensitiveData(crmModel);
|
||||||
|
} else {
|
||||||
|
crmModel = new CrmModel(CrmEnum.LEADS.getType());
|
||||||
|
}
|
||||||
|
return crmModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -414,7 +473,7 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
List<Integer> customerIds = new ArrayList<>();
|
List<Integer> customerIds = new ArrayList<>();
|
||||||
Map<Integer, CrmModelSaveBO> crmModelSaveBoMap = new HashMap<>(8);
|
Map<Integer, CrmModelSaveBO> crmModelSaveBoMap = new HashMap<>(8);
|
||||||
for (Integer leadsId : leadsIds) {
|
for (Integer leadsId : leadsIds) {
|
||||||
CrmModel leadsMap = queryById(leadsId);
|
CrmModel leadsMap = fetchById(leadsId);
|
||||||
CrmLeads crmLeads = BeanUtil.copyProperties(leadsMap,CrmLeads.class);
|
CrmLeads crmLeads = BeanUtil.copyProperties(leadsMap,CrmLeads.class);
|
||||||
if (crmLeads.getIsTransform() == 1) {
|
if (crmLeads.getIsTransform() == 1) {
|
||||||
throw new CrmException(CrmCodeEnum.CRM_LEADS_TRANSFER_ERROR);
|
throw new CrmException(CrmCodeEnum.CRM_LEADS_TRANSFER_ERROR);
|
||||||
|
|
@ -430,7 +489,8 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
crmCustomer.setCreateTime(new Date());
|
crmCustomer.setCreateTime(new Date());
|
||||||
crmCustomer.setUpdateTime(new Date());
|
crmCustomer.setUpdateTime(new Date());
|
||||||
crmCustomer.setReceiveTime(new Date());
|
crmCustomer.setReceiveTime(new Date());
|
||||||
crmCustomer.setDetailAddress(crmLeads.getAddress());
|
//crmCustomer.setDetailAddress(crmLeads.getAddress());
|
||||||
|
crmCustomer.setDetailAddress("");
|
||||||
crmCustomer.setLocation("");
|
crmCustomer.setLocation("");
|
||||||
crmCustomer.setAddress("");
|
crmCustomer.setAddress("");
|
||||||
crmCustomer.setLng("");
|
crmCustomer.setLng("");
|
||||||
|
|
@ -442,16 +502,19 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
crmCustomer.setLastTime(crmLeads.getLastTime());
|
crmCustomer.setLastTime(crmLeads.getLastTime());
|
||||||
String customerBatchId = IdUtil.simpleUUID();
|
String customerBatchId = IdUtil.simpleUUID();
|
||||||
crmCustomer.setBatchId(customerBatchId);
|
crmCustomer.setBatchId(customerBatchId);
|
||||||
|
//处理拓展字段
|
||||||
List<CrmField> leadsFields = crmFieldService.list(CrmEnum.LEADS.getType(), false);
|
List<CrmField> leadsFields = crmFieldService.list(CrmEnum.LEADS.getType(), false);
|
||||||
List<CrmField> customerFields = crmFieldService.list(CrmEnum.CUSTOMER.getType(), true);
|
List<CrmField> customerFields = crmFieldService.list(CrmEnum.CUSTOMER.getType(), true);
|
||||||
List<CrmCustomerData> customerDataList = new ArrayList<>();
|
List<CrmCustomerData> customerDataList = new ArrayList<>(); //CrmCustomerData客户拓展字段数据表
|
||||||
Map<String, Object> customerExtraMap = new HashMap<>();
|
Map<String, Object> customerExtraMap = new HashMap<>();
|
||||||
for (CrmField leadsField : leadsFields) {
|
for (CrmField leadsField : leadsFields) {
|
||||||
for (CrmField customerField : customerFields) {
|
for (CrmField customerField : customerFields) {
|
||||||
Integer isUnique = customerField.getIsUnique();
|
Integer isUnique = customerField.getIsUnique();
|
||||||
boolean bol = ("客户来源".equals(customerField.getName()) && "线索来源".equals(leadsField.getName()))
|
boolean bol = ("客户来源".equals(customerField.getName()) && "线索来源".equals(leadsField.getName()))
|
||||||
|| ("客户行业".equals(customerField.getName()) && "客户行业".equals(leadsField.getName()))
|
|| ("客户行业".equals(customerField.getName()) && "客户行业".equals(leadsField.getName()))
|
||||||
|| ("客户级别".equals(customerField.getName()) && "客户级别".equals(leadsField.getName()));
|
|| ("客户级别".equals(customerField.getName()) && "客户级别".equals(leadsField.getName())
|
||||||
|
|| ("客户详细地址".equals(customerField.getName()) && "地址".equals(leadsField.getName()))
|
||||||
|
);
|
||||||
if (bol) {
|
if (bol) {
|
||||||
if (isUnique == 1 && crmFieldService.queryCustomerFieldDuplicateByNoFixed(customerField.getName(), leadsMap.get(leadsField.getName())) > 0) {
|
if (isUnique == 1 && crmFieldService.queryCustomerFieldDuplicateByNoFixed(customerField.getName(), leadsMap.get(leadsField.getName())) > 0) {
|
||||||
throw new CrmException(CrmCodeEnum.CRM_FIELD_EXISTED, customerField.getName());
|
throw new CrmException(CrmCodeEnum.CRM_FIELD_EXISTED, customerField.getName());
|
||||||
|
|
@ -460,7 +523,8 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
crmCustomerData.setValue((String) leadsMap.get(leadsField.getFieldName()));
|
crmCustomerData.setValue((String) leadsMap.get(leadsField.getFieldName()));
|
||||||
crmCustomerData.setFieldId(customerField.getFieldId());
|
crmCustomerData.setFieldId(customerField.getFieldId());
|
||||||
crmCustomerData.setName(customerField.getName());
|
crmCustomerData.setName(customerField.getName());
|
||||||
crmCustomerData.setFieldName(customerField.getFieldName());
|
//crmCustomerData.setFieldName(customerField.getFieldName());
|
||||||
|
crmCustomerData.setFieldName(removeUnderscoresAndCapitalize(customerField.getFieldName()));
|
||||||
customerDataList.add(crmCustomerData);
|
customerDataList.add(crmCustomerData);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -796,4 +860,4 @@ public class CrmLeadsServiceImpl extends BaseServiceImpl<CrmLeadsMapper, CrmLead
|
||||||
crmSearchBO.setLimit(eventCrmPageBO.getLimit());
|
crmSearchBO.setLimit(eventCrmPageBO.getLimit());
|
||||||
return queryPageList(crmSearchBO);
|
return queryPageList(crmSearchBO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue