Commit 0bf4ba3e by dengshichuan

Merge branch 'dsc' into 'develop'

Dsc

See merge request 8timerv2/8timerapiv200!168
parents 9c91041f 42e860c0
......@@ -8,6 +8,8 @@
package cn.timer.api.controller.crm;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
......@@ -426,6 +428,7 @@ public class CrmController {
.eq(status != null && status >= 0, CrmClientData::getClientStatus, status)
.like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or()
.like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like));
if (crmClientData != null)
myCrmClientAssociates.add(crmClientData);
}
return myCrmClientAssociates;
......@@ -462,10 +465,11 @@ public class CrmController {
Integer empNum = getEmpNum(userBean);
Integer orgCode = getOrgCode(userBean);
List<CrmClientData> crmClientDatas = null;
if (type == null || type == 0) // 全部客户(去重)
crmClientDatas = CheckUtil.distinct(getMyCilent(empNum, orgCode, groupId, status, like),
getMyAssociateCilent(empNum, orgCode, groupId, status, like), true);
else if (type == 1) // 我负责的客户
if (type == null || type == 0) { // 全部客户(去重)
List<CrmClientData> myClient = getMyCilent(empNum, orgCode, groupId, status, like);
List<CrmClientData> myAsso = getMyAssociateCilent(empNum, orgCode, groupId, status, like);
crmClientDatas = CheckUtil.distinct(myClient, myAsso, true);
} else if (type == 1) // 我负责的客户
crmClientDatas = getMyCilent(empNum, orgCode, groupId, status, like);
else if (type == 2) // 我协作的客户
crmClientDatas = getMyAssociateCilent(empNum, orgCode, groupId, status, like);
......@@ -476,7 +480,7 @@ public class CrmController {
else
return ResultUtil.error("查询失败");
// TODO 排序
// Collections.sort(crmClientDatas, Comparator.comparing(CrmClientData::getCreateTime).reversed()); // 按时间降序排序
Collections.sort(crmClientDatas, Comparator.comparing(CrmClientData::getCreateTime).reversed()); // 按时间降序排序
return ResultUtil.data(crmClientDatas, "查询成功");
}
......@@ -986,4 +990,6 @@ public class CrmController {
return map;
}
// TODO 导入客户
}
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