Commit 2380d291 by 284718418@qq.com

1.CRM导入联系人手机号码问题

2.CRM添加跟进人统计图
3.CRM获取行业列表获取当前企业
4.CRM所有客户添加是否有联系手机号码搜索条件
5.CRM修改BUG添加联系人
6.CRM修改行业类型新增无org_code BUG
parent 76b342de
......@@ -127,7 +127,7 @@ public class CrmController {
@GetMapping("getIndustry")
@ApiOperation(value = "获取行业列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<IndustryClass>> getIndustry(@CurrentUser UserBean userBean) {
return ResultUtil.data(IndustryClass.builder().build().selectAll());
return ResultUtil.data(IndustryClass.builder().build().selectList(new QueryWrapper<IndustryClass>().lambda().eq(IndustryClass::getOrgCode,userBean.getOrgCode())));
}
......@@ -761,6 +761,7 @@ public class CrmController {
@RequestParam(required = false) String endCreateTime,
@RequestParam(required = false) String startFollowTime,
@RequestParam(required = false) String endFollowTime,
@RequestParam(required = false) String ifPhone,
@RequestParam(required = false, defaultValue = "1") int pageNumber,
@RequestParam(required = false, defaultValue = "10") int pageSize) {
......@@ -801,11 +802,13 @@ public class CrmController {
.in(QyzxEmpEntAsso::getUserType, "0,1")
.count();
if(count > 0) {
//qw -> qw.like(ZpglRcxx::getName, query).or().eq(ZpglRcxx::getMobile, query).or().eq(ZpglRcxx::getMail, query)
datas = CrmClientData.builder().build().selectPage(page,
new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode, orgCode)
.eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId)
.eq(type != null && type >= 0, CrmClientData::getClientType, type)
.likeRight(!StringUtils.isBlank(ifPhone)&&"1".equals(ifPhone),CrmClientData::getClientCellphone,"1")
.and(!StringUtils.isBlank(ifPhone)&&"2".equals(ifPhone),qw -> qw.isNull(CrmClientData::getClientCellphone).or().eq(CrmClientData::getClientCellphone,""))
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status).like(!StrUtil.isBlank(customerowner), CrmClientData::getBelongUserName, customerowner)
.ge(StringUtils.isNotBlank(startCreateTime), CrmClientData::getCreateTime, startCreateTime)
.le(StringUtils.isNotBlank(endCreateTime), CrmClientData::getCreateTime, endCreateTime)
......@@ -828,6 +831,8 @@ public class CrmController {
.eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId)
.eq(type != null && type >= 0, CrmClientData::getClientType, type).like(!StrUtil.isBlank(customerowner), CrmClientData::getBelongUserName, customerowner)
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status).in(CrmClientData::getBelongGroup, keywordStr)
.likeRight(!StringUtils.isBlank(ifPhone)&&"1".equals(ifPhone),CrmClientData::getClientCellphone,"1")
.and(!StringUtils.isBlank(ifPhone)&&"2".equals(ifPhone),qw -> qw.isNull(CrmClientData::getClientCellphone).or().eq(CrmClientData::getClientCellphone,""))
.ge(StringUtils.isNotBlank(startCreateTime), CrmClientData::getCreateTime, startCreateTime)
.le(StringUtils.isNotBlank(endCreateTime), CrmClientData::getCreateTime, endCreateTime)
.ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getCreateTime, startFollowTime)
......@@ -850,6 +855,8 @@ public class CrmController {
.eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId)
.eq(type != null && type >= 0, CrmClientData::getClientType, type).like(!StrUtil.isBlank(customerowner), CrmClientData::getBelongUserName, customerowner)
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status)
.likeRight(!StringUtils.isBlank(ifPhone)&&"1".equals(ifPhone),CrmClientData::getClientCellphone,"1")
.and(!StringUtils.isBlank(ifPhone)&&"2".equals(ifPhone),qw -> qw.isNull(CrmClientData::getClientCellphone).or().eq(CrmClientData::getClientCellphone,""))
.ge(StringUtils.isNotBlank(startCreateTime), CrmClientData::getCreateTime, startCreateTime)
.le(StringUtils.isNotBlank(endCreateTime), CrmClientData::getCreateTime, endCreateTime)
.ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getCreateTime, startFollowTime)
......@@ -957,6 +964,7 @@ public class CrmController {
.lastFollowTime(new Date()).build().updateById(); // 更新客户最近跟进时间
crmClientFollow.setOrgCode(orgCode);
crmClientFollow.setCreateUser(empNum);
crmClientFollow.setCreateUserName(getEmpName(orgCode, empNum));
if (crmClientFollow.insert())
......@@ -1225,6 +1233,8 @@ public class CrmController {
List<CrmCartogramDto> cartogram6 = getCartogram6(orgCode, belonger, groupId, startCreateTime, endCreateTime);
listAll.add(cartogram6);
// 跟进图
listAll.add(cartogram(orgCode, groupId, 7, belonger, startCreateTime, endCreateTime));
return ResultUtil.data(listAll, "获取成功");
}
......@@ -1282,13 +1292,24 @@ public class CrmController {
private Map<String, Object> selectMap(Integer orgCode, Integer groupId, Integer belonger, Integer status,
String startCreateTime, String endCreateTime) {
Map<String, Object> map = new HashMap<String, Object>();
Integer num = CrmClientData.builder().build()
Integer num = 0;
if(status.intValue() == 7){
/*** 跟进统计 ***/
num = CrmClientFollow.builder().build()
.selectCount(new QueryWrapper<CrmClientFollow>().lambda().eq(CrmClientFollow::getOrgCode, orgCode)
.eq(belonger != null, CrmClientFollow::getCreateUser, belonger)
.ge(StringUtils.isNotBlank(startCreateTime), CrmClientFollow::getCreateTime, startCreateTime)
.le(StringUtils.isNotBlank(endCreateTime), CrmClientFollow::getCreateTime, endCreateTime));
}else {
num = CrmClientData.builder().build()
.selectCount(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode, orgCode)
.eq(CrmClientData::getClientStatus, status)
.eq(belonger != null, CrmClientData::getBelongUser, belonger)
.eq(groupId != null, CrmClientData::getBelongGroup, groupId)
.ge(StringUtils.isNotBlank(startCreateTime), CrmClientData::getCreateTime, startCreateTime)
.le(StringUtils.isNotBlank(endCreateTime), CrmClientData::getCreateTime, endCreateTime));
}
String name = "未知";
if (belonger == 0)
name = "公海客户";
......@@ -1500,7 +1521,7 @@ public class CrmController {
reader.addHeaderAlias("邮箱", "clientEmail");
reader.addHeaderAlias("地址", "address");
reader.addHeaderAlias("联系人姓名", "linkName");
reader.addHeaderAlias("手机号码", "cellphone");
reader.addHeaderAlias("*手机号码(必填)", "cellphone");
reader.addHeaderAlias("所属公司", "company");
reader.addHeaderAlias("性别", "gender");
reader.addHeaderAlias("职位", "position");
......@@ -1559,6 +1580,7 @@ public class CrmController {
IndustryClass incls = IndustryClass.builder().build();
incls.setName(industryName);
incls.setOrgCode(orgCode);
incls.insert();
industryid = incls.getId();
// return ResultUtil.error("没有匹配的行业名称");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment