Commit cd3ee808 by lal

提交

parent 3f0e18aa
...@@ -164,6 +164,9 @@ public class CrmClientData extends Model<CrmClientData> { ...@@ -164,6 +164,9 @@ public class CrmClientData extends Model<CrmClientData> {
@ApiModelProperty(value = "跟进记录") @ApiModelProperty(value = "跟进记录")
private String followuprecord; private String followuprecord;
@ApiModelProperty(value = "隐藏客户(0:已隐藏;1:未隐藏)")
private Integer hidingcustomers;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
......
...@@ -704,6 +704,7 @@ public class CrmController { ...@@ -704,6 +704,7 @@ public class CrmController {
List<CrmClientData> list = CrmClientData.builder().build() List<CrmClientData> list = CrmClientData.builder().build()
.selectList(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode, orgCode) .selectList(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode, orgCode)
.eq(CrmClientData::getBelongUser, 0) .eq(CrmClientData::getBelongUser, 0)
.eq(CrmClientData::getHidingcustomers, 1)
.eq(type != null && type >= 0, CrmClientData::getClientType, type) .eq(type != null && type >= 0, CrmClientData::getClientType, type)
.eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId) .eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId)
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status) .eq(status != null && status >= 0, CrmClientData::getClientStatus, status)
...@@ -731,6 +732,7 @@ public class CrmController { ...@@ -731,6 +732,7 @@ public class CrmController {
List<CrmClientData> datas = CrmClientData.builder().build() List<CrmClientData> datas = CrmClientData.builder().build()
.selectList(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getBelongGroup, gid) .selectList(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getBelongGroup, gid)
.eq(CrmClientData::getBelongUser, 0) .eq(CrmClientData::getBelongUser, 0)
.eq(CrmClientData::getHidingcustomers, 1)
.eq(type != null && type >= 0, CrmClientData::getClientType, type) .eq(type != null && type >= 0, CrmClientData::getClientType, type)
.eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId) .eq(groupId != null && groupId >= 0, CrmClientData::getBelongGroup, groupId)
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status) .eq(status != null && status >= 0, CrmClientData::getClientStatus, status)
...@@ -1146,6 +1148,30 @@ public class CrmController { ...@@ -1146,6 +1148,30 @@ public class CrmController {
return ResultUtil.success("转移失败"); return ResultUtil.success("转移失败");
} }
@GetMapping("hidingcustomers")
@ApiOperation(value = "隐藏客户", httpMethod = "GET", notes = "接口发布说明")
public Result<Void> HidingCustomers(@CurrentUser UserBean userBean,@RequestParam Integer yid) {
CrmClientData crda = CrmClientData.builder().id(yid).build().selectById();
if(crda != null) {
// 当前操作人是否管理员
CrmBusinessGroupMember nowManager = CrmBusinessGroupMember.builder().build()
.selectOne(new QueryWrapper<CrmBusinessGroupMember>().lambda().eq(CrmBusinessGroupMember::getGid, crda.getBelongGroup())
.eq(CrmBusinessGroupMember::getEmpNum, getEmpNum(userBean))
.eq(CrmBusinessGroupMember::getType, 1));
if (nowManager == null)
return ResultUtil.error("没有操作权限,请联系组管理员进行操作");
CrmClientData.builder().id(yid).hidingcustomers(0).build().updateById();
}
return ResultUtil.success("成功");
}
/** /**
* *
...@@ -1519,15 +1545,24 @@ public class CrmController { ...@@ -1519,15 +1545,24 @@ public class CrmController {
.eq(CrmBusinessGroup::getName, belongGroupName).select(CrmBusinessGroup::getId)); .eq(CrmBusinessGroup::getName, belongGroupName).select(CrmBusinessGroup::getId));
if (crmBusinessGroup == null) if (crmBusinessGroup == null)
return ResultUtil.error("没有匹配的业务组名称"); return ResultUtil.error("没有匹配的业务组名称");
int industryid = 0;
if (StrUtil.isNotBlank(industryName)) { if (StrUtil.isNotBlank(industryName)) {
// 行业字典 // 行业字典
IndustryClass industryClass = IndustryClass.builder().build() IndustryClass industryClass = IndustryClass.builder().build()
.selectOne(new LambdaQueryWrapper<IndustryClass>().eq(IndustryClass::getName, industryName) .selectOne(new LambdaQueryWrapper<IndustryClass>().eq(IndustryClass::getName, industryName)
.select(IndustryClass::getId)); .select(IndustryClass::getId));
if (industryClass == null) if (industryClass == null) {
return ResultUtil.error("没有匹配的行业名称");
crmClientData.setIndustry(industryClass.getId()); IndustryClass incls = IndustryClass.builder().build();
incls.setName(industryName);
incls.insert();
industryid = incls.getId();
// return ResultUtil.error("没有匹配的行业名称");
}else {
industryid = industryClass.getId();
}
crmClientData.setIndustry(industryid);
} }
if (StrUtil.isNotBlank(clientTypeName)) { if (StrUtil.isNotBlank(clientTypeName)) {
......
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