Commit 88a757b6 authored by jay's avatar jay

平台客户需求提交

parent 7b037749
...@@ -9,6 +9,7 @@ import com.house365.web.system.controller.BaseController; ...@@ -9,6 +9,7 @@ import com.house365.web.system.controller.BaseController;
import com.house365.web.util.*; import com.house365.web.util.*;
import com.house365.ws.beans.request.*; import com.house365.ws.beans.request.*;
import com.house365.ws.beans.response.*; import com.house365.ws.beans.response.*;
import com.house365.ws.beans.util.HResult;
import com.house365.ws.interfaces.server.*; import com.house365.ws.interfaces.server.*;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -182,14 +183,47 @@ public class PlatformManagementController extends BaseController { ...@@ -182,14 +183,47 @@ public class PlatformManagementController extends BaseController {
searchParams.put("EQ_platformCreateSource", "PT"); searchParams.put("EQ_platformCreateSource", "PT");
//过滤公海、跟进中 //过滤公海、跟进中
String eqPlatProjectStatus = String.valueOf(searchParams.get("EQ_platProjectStatus")); String eqPlatProjectStatus = String.valueOf(searchParams.get("EQ_platProjectStatus"));
if (eqPlatProjectStatus != null && "7".equals(eqPlatProjectStatus)) {//跟进中 //跟进中
if (eqPlatProjectStatus != null && "7".equals(eqPlatProjectStatus)) {
searchParams.remove("EQ_platProjectStatus"); searchParams.remove("EQ_platProjectStatus");
searchParams.put("EQ_platProjectStatus7", "7"); searchParams.put("EQ_platProjectStatus7", "7");
} }
if (eqPlatProjectStatus != null && "8".equals(eqPlatProjectStatus)) {//回公海 //回公海
if (eqPlatProjectStatus != null && "8".equals(eqPlatProjectStatus)) {
searchParams.remove("EQ_platProjectStatus"); searchParams.remove("EQ_platProjectStatus");
searchParams.put("EQ_platManager", "8"); searchParams.put("EQ_platManager", "8");
} }
//添加部门查询
if (searchParams.get("EQ_dept") != null) {
String dept = searchParams.get("EQ_dept").toString();
//查询部门用户
if (org.apache.commons.lang.StringUtils.isNotBlank(dept)) {
Map<String, Object> deptMap = new HashMap<>(5);
if ("1".equals(dept)) {
deptMap.put("likeName", "直销一");
} else if ("2".equals(dept)) {
deptMap.put("likeName", "直销二");
} else if ("3".equals(dept)) {
deptMap.put("likeName", "直销三");
}
List<DepartmentEntity> list = department.queryByCondition(deptMap);
StringBuilder builder = new StringBuilder();
List<Integer> deptList = new ArrayList<>();
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(list)) {
list.forEach(l -> deptList.add(l.getId()));
}
Map<String, Object> userMap = new HashMap<>(5);
userMap.put("deptIdList", deptList);
List<UserEntity> userList = iuser.queryByConditions(userMap);
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(userList)) {
userList.forEach(u -> builder.append(u.getId()).append(","));
String deptManagerId = builder.toString();
deptManagerId = deptManagerId.substring(0, deptManagerId.lastIndexOf(","));
searchParams.put("EQ_deptManagerId", deptManagerId);
}
}
}
CustomerListRequest listRequest = new CustomerListRequest(); CustomerListRequest listRequest = new CustomerListRequest();
listRequest.setPaging(page); listRequest.setPaging(page);
listRequest.setSearchParams(searchParams); listRequest.setSearchParams(searchParams);
...@@ -228,7 +262,8 @@ public class PlatformManagementController extends BaseController { ...@@ -228,7 +262,8 @@ public class PlatformManagementController extends BaseController {
//先去查询该客户的所有id //先去查询该客户的所有id
idList = customer.getCustomerIds(customerEntity.getId(), cityCode); idList = customer.getCustomerIds(customerEntity.getId(), cityCode);
} else { } else {
idList.add(customerEntity);//平台客户回公海 //平台客户回公海
idList.add(customerEntity);
} }
//再获取所有id的回访记录 //再获取所有id的回访记录
List<Integer> ids = new ArrayList<>(); List<Integer> ids = new ArrayList<>();
...@@ -427,7 +462,6 @@ public class PlatformManagementController extends BaseController { ...@@ -427,7 +462,6 @@ public class PlatformManagementController extends BaseController {
managers = iuser.queryRuleManagers(csMap); managers = iuser.queryRuleManagers(csMap);
} }
model.addAttribute("managers", managers); model.addAttribute("managers", managers);
//活动来源 //活动来源
model.addAttribute("sources", cslrs.getObjectList()); model.addAttribute("sources", cslrs.getObjectList());
...@@ -458,15 +492,14 @@ public class PlatformManagementController extends BaseController { ...@@ -458,15 +492,14 @@ public class PlatformManagementController extends BaseController {
DepartmentResponse departmentResponse = department.getDepartmentById(Integer.valueOf(cityId)); DepartmentResponse departmentResponse = department.getDepartmentById(Integer.valueOf(cityId));
DepartmentEntity city = departmentResponse.getEntity(); DepartmentEntity city = departmentResponse.getEntity();
CustomerEntity customerEntity = vo.getEntity(); CustomerEntity customerEntity = vo.getEntity();
Date newdate = new Date(); Date newDate = new Date();
CustomerRequest cr = new CustomerRequest(); CustomerRequest cr = new CustomerRequest();
customerEntity.setCreateTime(newdate); customerEntity.setCreateTime(newDate);
if (!Strings.isNullOrEmpty(customerEntity.getRemark())) { if (!Strings.isNullOrEmpty(customerEntity.getRemark())) {
customerEntity.setLastCallTime(newdate); customerEntity.setLastCallTime(newDate);
} }
customerEntity.setUpdateTime(newdate); customerEntity.setUpdateTime(newDate);
customerEntity.setCreater(String.valueOf(userEntity.getId())); customerEntity.setCreater(String.valueOf(userEntity.getId()));
// customerEntity.setManagerId();
customerEntity.setIsRecycled(0); customerEntity.setIsRecycled(0);
customerEntity.setManagerName(selectedManager); customerEntity.setManagerName(selectedManager);
customerEntity.setCityName(city.getName()); customerEntity.setCityName(city.getName());
...@@ -477,8 +510,9 @@ public class PlatformManagementController extends BaseController { ...@@ -477,8 +510,9 @@ public class PlatformManagementController extends BaseController {
customerEntity.setCreateSource("PT"); customerEntity.setCreateSource("PT");
//修改客户表默认值null改为11 //修改客户表默认值null改为11
customerEntity.setStatus(Constant.statu); customerEntity.setStatus(Constant.statu);
customerEntity.setBindTime(newdate); customerEntity.setBindTime(newDate);
customerEntity.setCustomerSourceType(8);//8:平台导入类型 //8:平台导入类型
customerEntity.setCustomerSourceType(8);
CustomerSourceEntity cse = customerSource.getCustomerSourceById(customerEntity.getActSourceId()).getEntity(); CustomerSourceEntity cse = customerSource.getCustomerSourceById(customerEntity.getActSourceId()).getEntity();
customerEntity.setActSource(cse == null ? "" : cse.getSourceName()); customerEntity.setActSource(cse == null ? "" : cse.getSourceName());
cr.setEntity(customerEntity); cr.setEntity(customerEntity);
...@@ -500,18 +534,18 @@ public class PlatformManagementController extends BaseController { ...@@ -500,18 +534,18 @@ public class PlatformManagementController extends BaseController {
} else { } else {
mergeCustomerUtil.checkMergeCustomer(customerEntity, oldentity, userEntity.getId(), userEntity.getRealName()); mergeCustomerUtil.checkMergeCustomer(customerEntity, oldentity, userEntity.getId(), userEntity.getRealName());
// 意向等级、跟踪状态更新 // 意向等级、跟踪状态更新
oldentity.setUpdateTime(newdate); oldentity.setUpdateTime(newDate);
oldentity.setCreateTime(newdate); oldentity.setCreateTime(newDate);
oldentity.setBindTime(newdate); oldentity.setBindTime(newDate);
if (!Strings.isNullOrEmpty(customerEntity.getRemark())) { if (!Strings.isNullOrEmpty(customerEntity.getRemark())) {
oldentity.setLastCallTime(newdate); oldentity.setLastCallTime(newDate);
} }
oldentity.setUpdater(String.valueOf(userEntity.getId())); oldentity.setUpdater(String.valueOf(userEntity.getId()));
customerEntity.setId(oldentity.getId()); customerEntity.setId(oldentity.getId());
customer.updateCustomerMerge(oldentity); customer.updateCustomerMerge(oldentity);
} }
if (!Strings.isNullOrEmpty(customerEntity.getRemark())) { if (!Strings.isNullOrEmpty(customerEntity.getRemark())) {
addCallBack(userEntity, String.valueOf(newCustomerEntity.getId()), customerEntity.getRemark(), newdate); addCallBack(userEntity, String.valueOf(newCustomerEntity.getId()), customerEntity.getRemark(), newDate);
} }
model.addAttribute("vo", vo); model.addAttribute("vo", vo);
...@@ -527,7 +561,7 @@ public class PlatformManagementController extends BaseController { ...@@ -527,7 +561,7 @@ public class PlatformManagementController extends BaseController {
* @param newdate * @param newdate
* @return * @return
*/ */
private CustomerCallbackLogResponse addCallBack(UserEntity userEntity, String customerId, String content, Date newdate) { private void addCallBack(UserEntity userEntity, String customerId, String content, Date newdate) {
CustomerCallbackLogEntity customerCallbackLogEntity = new CustomerCallbackLogEntity(); CustomerCallbackLogEntity customerCallbackLogEntity = new CustomerCallbackLogEntity();
customerCallbackLogEntity.setCustomerId(Integer.valueOf(customerId)); customerCallbackLogEntity.setCustomerId(Integer.valueOf(customerId));
customerCallbackLogEntity.setContent(content); customerCallbackLogEntity.setContent(content);
...@@ -538,8 +572,7 @@ public class PlatformManagementController extends BaseController { ...@@ -538,8 +572,7 @@ public class PlatformManagementController extends BaseController {
CustomerCallbackLogRequest callRequest = new CustomerCallbackLogRequest(); CustomerCallbackLogRequest callRequest = new CustomerCallbackLogRequest();
callRequest.setEntity(customerCallbackLogEntity); callRequest.setEntity(customerCallbackLogEntity);
CustomerCallbackLogResponse response = customerCallbackLog.addCustomerCallbackLog(callRequest); customerCallbackLog.addCustomerCallbackLog(callRequest);
return response;
} }
/** /**
...@@ -642,7 +675,7 @@ public class PlatformManagementController extends BaseController { ...@@ -642,7 +675,7 @@ public class PlatformManagementController extends BaseController {
model.addAttribute("backToSeaDate", backToSeaDate); model.addAttribute("backToSeaDate", backToSeaDate);
//查询客户日志 //查询客户日志
Map<String, Object> map = new HashMap<>(10); Map<String, Object> map = new HashMap<>(10);
List<CustomerLogEntity> list = new ArrayList<>(); List<CustomerLogEntity> list;
if (StringUtils.isEmpty(managerId)) { if (StringUtils.isEmpty(managerId)) {
map.put("relateId", customerEntity.getId()); map.put("relateId", customerEntity.getId());
list = logInterface.queryByConditions(map); list = logInterface.queryByConditions(map);
...@@ -910,4 +943,25 @@ public class PlatformManagementController extends BaseController { ...@@ -910,4 +943,25 @@ public class PlatformManagementController extends BaseController {
return "success"; return "success";
} }
/**
* 逻辑删除平台客户
*
* @param id 客户id
* @return
*/
@RequestMapping(value = "deleteById/{id}")
@ResponseBody
public HResult deleteById(@PathVariable int id, HttpServletRequest request) {
HResult result = new HResult();
try {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
result = customer.deleteById(id, userEntity.getId(), userEntity.getRealName());
} catch (Exception e) {
e.printStackTrace();
result.setStatus(500);
result.setErrorMessage("删除失败");
}
return result;
}
} }
...@@ -220,7 +220,8 @@ ...@@ -220,7 +220,8 @@
padding: 0; padding: 0;
width: 33%; width: 33%;
} }
.mangerId_avar2{
.mangerId_avar2 {
overflow: hidden; overflow: hidden;
width: 75px; width: 75px;
height: 16px; height: 16px;
...@@ -263,63 +264,63 @@ ...@@ -263,63 +264,63 @@
style="border-style: solid;border-width: thin;border-color: #d5d5d5;padding: 20px;margin-bottom: 20px;line-height: 43px;"> style="border-style: solid;border-width: thin;border-color: #d5d5d5;padding: 20px;margin-bottom: 20px;line-height: 43px;">
<div class="span12"> <div class="span12">
添加时间: <input style="width: 7rem;border: 1px solid #d5d5d5;" type="text" 添加时间: <input style="width: 7rem;border: 1px solid #d5d5d5;" type="text"
name="search_GTE_createTimeStart" name="search_GTE_createTimeStart"
id="search_GTE_createTimeStart" value="${param['search_GTE_createTimeStart']}" id="search_GTE_createTimeStart" value="${param['search_GTE_createTimeStart']}"
class="m-wrap small span2"> class="m-wrap small span2">
<input style="width: 7rem;margin-left: 15px;border: 1px solid #d5d5d5;" type="text" <input style="width: 7rem;margin-left: 15px;border: 1px solid #d5d5d5;" type="text"
name="search_LTE_createTimeEnd" name="search_LTE_createTimeEnd"
id="search_LTE_createTimeEnd" value="${param['search_LTE_createTimeEnd']}" id="search_LTE_createTimeEnd" value="${param['search_LTE_createTimeEnd']}"
class="m-wrap small span2" class="m-wrap small span2"
> >
<span id="createTimeRecentSeven" <span id="createTimeRecentSeven"
style="cursor: pointer;<c:if test="${'2' eq timePeriod}">color: #30A3DE;</c:if>" style="cursor: pointer;<c:if test="${'2' eq timePeriod}">color: #30A3DE;</c:if>"
onclick="createTimeClick('2')">近7天</span>&nbsp;&nbsp; onclick="createTimeClick('2')">近7天</span>&nbsp;&nbsp;
<span id="createTimeRecentThirty" <span id="createTimeRecentThirty"
style="cursor: pointer;<c:if test="${'1' eq timePeriod}">color: #30A3DE;</c:if>" style="cursor: pointer;<c:if test="${'1' eq timePeriod}">color: #30A3DE;</c:if>"
onclick="createTimeClick('1')">30天</span>&nbsp;&nbsp; onclick="createTimeClick('1')">30天</span>&nbsp;&nbsp;
<span id="createTimeAll" <span id="createTimeAll"
style="cursor: pointer;<c:if test="${'0' eq timePeriod}">color: #30A3DE;</c:if>" style="cursor: pointer;<c:if test="${'0' eq timePeriod}">color: #30A3DE;</c:if>"
onclick="createTimeClick('0')">全部</span>&nbsp;&nbsp; onclick="createTimeClick('0')">全部</span>&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;
<select style="width: 6rem" name="search_EQ_customTimeType" id="search_EQ_customTimeType"> <select style="width: 6rem" name="search_EQ_customTimeType" id="search_EQ_customTimeType">
<option value="1" <option value="1"
<c:if test="${'1' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>> <c:if test="${'1' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>>
回访时间 回访时间
</option> </option>
<option value="2" <option value="2"
<c:if test="${'2' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>> <c:if test="${'2' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>>
约看时间 约看时间
</option> </option>
<option value="3" <option value="3"
<c:if test="${'3' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>> <c:if test="${'3' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>>
到访时间 到访时间
</option> </option>
<option value="4" <option value="4"
<c:if test="${'4' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>> <c:if test="${'4' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>>
认筹时间 认筹时间
</option> </option>
<option value="5" <option value="5"
<c:if test="${'5' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>> <c:if test="${'5' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>>
认购时间 认购时间
</option> </option>
<option value="6" <option value="6"
<c:if test="${'6' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>> <c:if test="${'6' eq param['search_EQ_customTimeType']}">selected="selected"</c:if>>
签约时间 签约时间
</option> </option>
</select> </select>
<input style="width: 7rem;border: 1px solid #d5d5d5;" type="text" <input style="width: 7rem;border: 1px solid #d5d5d5;" type="text"
name="search_GTE_customTimeStart" name="search_GTE_customTimeStart"
id="search_GTE_customTimeStart" value="${param['search_GTE_customTimeStart']}" id="search_GTE_customTimeStart" value="${param['search_GTE_customTimeStart']}"
class="m-wrap small span2" class="m-wrap small span2"
> >
<input style="width: 7rem;margin-left: 15px;;border: 1px solid #d5d5d5;" type="text" <input style="width: 7rem;margin-left: 15px;;border: 1px solid #d5d5d5;" type="text"
name="search_LTE_customTimeEnd" name="search_LTE_customTimeEnd"
id="search_LTE_customTimeEnd" value="${param['search_LTE_customTimeEnd']}" id="search_LTE_customTimeEnd" value="${param['search_LTE_customTimeEnd']}"
class="m-wrap small span2" class="m-wrap small span2"
> >
购房意向:<select style="width: 6rem" name="search_EQ_buyIntention" id="search_EQ_buyIntention"> 购房意向:<select style="width: 6rem" name="search_EQ_buyIntention" id="search_EQ_buyIntention">
<option value="all"> <option value="all">
...@@ -346,54 +347,76 @@ ...@@ -346,54 +347,76 @@
E E
</option> </option>
</select>&nbsp;&nbsp;&nbsp;&nbsp; </select>&nbsp;&nbsp;&nbsp;&nbsp;
<br/> <br/>
客户姓名:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_name" name="search_LIKE_name" value="${param['search_LIKE_name']}" 客户姓名:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_name"
class="m-wrap small" placeholder="客户姓名">&nbsp;&nbsp;&nbsp;&nbsp; name="search_LIKE_name" value="${param['search_LIKE_name']}"
客户手机:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_phone" name="search_LIKE_phone" value="${param['search_LIKE_phone']}" class="m-wrap small" placeholder="客户姓名">&nbsp;&nbsp;&nbsp;&nbsp;
class="m-wrap small" placeholder="客户手机">&nbsp;&nbsp;&nbsp;&nbsp; 客户手机:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_phone"
置业顾问:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_managerName" name="search_LIKE_managerName" value="${param['search_LIKE_managerName']}" name="search_LIKE_phone" value="${param['search_LIKE_phone']}"
class="m-wrap small" placeholder="置业顾问">&nbsp;&nbsp;&nbsp;&nbsp; class="m-wrap small" placeholder="客户手机">&nbsp;&nbsp;&nbsp;&nbsp;
回访记录:<input type="text" id="search_LIKE_callbackLog" style="border: 1px solid #d5d5d5;" name="search_LIKE_callbackLog" value="${param['search_LIKE_callbackLog']}" 置业顾问:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_managerName"
class="m-wrap small" placeholder="回访记录"> name="search_LIKE_managerName" value="${param['search_LIKE_managerName']}"
class="m-wrap small" placeholder="置业顾问">&nbsp;&nbsp;&nbsp;&nbsp;
回访记录:<input type="text" id="search_LIKE_callbackLog" style="border: 1px solid #d5d5d5;"
客户状态:<select style="width: 6rem" name="search_EQ_platProjectStatus" id="search_EQ_platProjectStatus"> name="search_LIKE_callbackLog" value="${param['search_LIKE_callbackLog']}"
<option value=""> class="m-wrap small" placeholder="回访记录">
全部
</option>
<option value="7" 客户状态:<select style="width: 6rem" name="search_EQ_platProjectStatus" id="search_EQ_platProjectStatus">
<c:if test="${'7' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <option value="">
跟进中 全部
</option> </option>
<option value="8" <option value="7"
<c:if test="${'8' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'7' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
回公海 跟进中
</option> </option>
<option value="1" <option value="8"
<c:if test="${'1' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'8' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
约看 回公海
</option> </option>
<option value="2" <option value="1"
<c:if test="${'2' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'1' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
到访 约看
</option> </option>
<option value="3" <option value="2"
<c:if test="${'3' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'2' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
认筹 到访
</option> </option>
<option value="4" <option value="3"
<c:if test="${'4' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'3' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
认购 认筹
</option> </option>
<option value="5" <option value="4"
<c:if test="${'5' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'4' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
签约 认购
</option> </option>
<option value="6" <option value="5"
<c:if test="${'6' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>> <c:if test="${'5' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
退房 签约
</option> </option>
</select>&nbsp;&nbsp;&nbsp;&nbsp; <option value="6"
<c:if test="${'6' eq param['search_EQ_platProjectStatus']}">selected="selected"</c:if>>
退房
</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;
部门:<select style="width: 6rem" name="search_EQ_dept" id="search_EQ_dept">
<option value="">
全部
</option>
<option value="1"
<c:if test="${'1' eq param['search_EQ_dept']}">selected="selected"</c:if>>
直销一部
</option>
<option value="2"
<c:if test="${'2' eq param['search_EQ_dept']}">selected="selected"</c:if>>
直销二部
</option>
<option value="3"
<c:if test="${'3' eq param['search_EQ_dept']}">selected="selected"</c:if>>
直销三部
</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;
<%--</c:if>--%> <%--</c:if>--%>
<div style="float: right"> <div style="float: right">
...@@ -417,53 +440,53 @@ ...@@ -417,53 +440,53 @@
<div class="row-fluid"> <div class="row-fluid">
<ul class="nav nav-tabs" style="margin-bottom: 0;position: relative;"> <ul class="nav nav-tabs" style="margin-bottom: 0;position: relative;">
<%--</c:if>--%> <%--</c:if>--%>
<a href="javascript:linkTypeUrl('')">全部</a> <a href="javascript:linkTypeUrl('')">全部</a>
<li style="float: right;padding-top: 10px;padding-right: 10px;"> <li style="float: right;padding-top: 10px;padding-right: 10px;">
<select style="width: 120px" name="search_EQ_orderByTime" id="search_EQ_orderByTime" <select style="width: 120px" name="search_EQ_orderByTime" id="search_EQ_orderByTime"
onchange="$('#filterForm').submit();"> onchange="$('#filterForm').submit();">
<option value="1" <option value="1"
<c:if test="${'1' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>> <c:if test="${'1' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>>
添加时间降序 添加时间降序
</option> </option>
<option value="2" <option value="2"
<c:if test="${'2' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>> <c:if test="${'2' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>>
添加时间升序 添加时间升序
</option> </option>
<option value="3" <option value="3"
<c:if test="${'3' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>> <c:if test="${'3' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>>
派工时间降序 派工时间降序
</option> </option>
<option value="4" <option value="4"
<c:if test="${'4' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>> <c:if test="${'4' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>>
派工时间升序 派工时间升序
</option> </option>
<option value="5" <option value="5"
<c:if test="${'5' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>> <c:if test="${'5' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>>
回访时间降序 回访时间降序
</option> </option>
<option value="6" <option value="6"
<c:if test="${'6' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>> <c:if test="${'6' eq param['search_EQ_orderByTime']}">selected="selected"</c:if>>
回访时间升序 回访时间升序
</option> </option>
</select> </select>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</form> </form>
<table class="table table-advance mine"> <table class="table table-advance mine">
<tbody> <tbody>
<c:forEach items="${customers}" var="customer" varStatus="vs"> <c:forEach items="${customers}" var="customer" varStatus="vs">
<tr id="customerId_${customer.id}" class="header expand <tr id="customerId_${customer.id}" class="header expand
<c:if test="${customer.star ne 'on' && vs.index%2==0}">table-complex</c:if> <c:if test="${customer.star ne 'on' && vs.index%2==0}">table-complex</c:if>
<c:if test="${customer.star eq 'on'}">table-star</c:if>"> <c:if test="${customer.star eq 'on'}">table-star</c:if>">
<td class="mangerId mangerItem mine"> <td class="mangerId mangerItem mine">
<div class="mangerItem__border"></div> <div class="mangerItem__border"></div>
<input type="checkbox" name="memberCheck" value="${customer.id}" <input type="checkbox" name="memberCheck" value="${customer.id}"
onclick="checkMember(this)"> onclick="checkMember(this)">
<span class="mangerId_num mine">${customer.id}</span> <span class="mangerId_num mine">${customer.id}</span>
<span class="mangerId_name"> <span class="mangerId_name">
<c:if test="${null ne customer.name && '' ne customer.name}"> <c:if test="${null ne customer.name && '' ne customer.name}">
<c:choose> <c:choose>
<c:when test="${fn:length(customer.name) > 3}"> <c:when test="${fn:length(customer.name) > 3}">
...@@ -478,168 +501,168 @@ ...@@ -478,168 +501,168 @@
&nbsp; &nbsp;
</c:if> </c:if>
</span> </span>
<div class="mangerId_content"> <div class="mangerId_content">
<div class="mangerId_phone"> <div class="mangerId_phone">
<c:if test="${null ne customer.phone && '' ne customer.phone}"> <c:if test="${null ne customer.phone && '' ne customer.phone}">
<a href="javascript:void(0)" onclick="getCRM(${customer.id})"><c:out <a href="javascript:void(0)" onclick="getCRM(${customer.id})"><c:out
value="${customer.phone}"/></a> value="${customer.phone}"/></a>
</c:if> </c:if>
<c:if test="${null eq customer.phone || '' eq customer.phone}"> <c:if test="${null eq customer.phone || '' eq customer.phone}">
&nbsp; &nbsp;
</c:if> </c:if>
<%--<c:if test="${hasPhone == 1}">--%> </div>
<%--<span id="star" class="icon-phone-sign"--%> <div class="mangerId_person">
<%--onclick="callCustomer('${customer.phone}','${customer.markedLabelId}','${customer.managerId}', '${customer.id}','${customer.buyIntention}','0','${customer.isPeer}', '${customer.starCustomer}')"></span>--%> <div class="mangerId_avar2" style="float: inherit">
<%--</c:if>--%> <c:out value="${customer.creater}"/>
</div>
<div class="mangerId_avar"
style="float: inherit;display: flex;width: 80%;margin-top: 5px;justify-content: space-between;">
<c:if test="${null ne customer.managerName && '' ne customer.managerName}">
<c:out value="${customer.managerName}"/>
</c:if>
<c:if test="${null eq customer.managerName || '' eq customer.managerName}">
&nbsp;
</c:if>
<div class="mangerId_up">
<c:choose>
<c:when test="${customer.buyIntention eq '1'}">
A
</c:when>
<c:when test="${customer.buyIntention eq '2'}">
B
</c:when>
<c:when test="${customer.buyIntention eq '3'}">
C
</c:when>
<c:when test="${customer.buyIntention eq '4'}">
D
</c:when>
<c:when test="${customer.buyIntention eq '5'}">
E
</c:when>
<c:otherwise>
待定
</c:otherwise>
</c:choose>
</div> </div>
<div class="mangerId_person"> </div>
<div class="mangerId_avar2" style="float: inherit">
<c:out value="${customer.creater}"/> </div>
</div> </div>
<div class="mangerId_avar" style="float: inherit;display: flex;width: 80%;margin-top: 5px;justify-content: space-between;"> <div class="mangerId_state">
<c:if test="${null ne customer.managerName && '' ne customer.managerName}"> <span class="inline">${customer.platCustomerStatus}</span>
<c:out value="${customer.managerName}"/> </div>
</c:if> </td>
<c:if test="${null eq customer.managerName || '' eq customer.managerName}"> <td class="mangerlist mangerItem" style="width: 40%">
&nbsp; <c:if test="${0 ne fn:length(customer.callbackLogEntities)}">
<div class="mangerlist__txt" style="width: 60%">
<div class="mangerlist__item">
<c:forEach items="${customer.callbackLogEntities}" var="callbackLog"
varStatus="index">
<p>
<c:if test="${empty callbackLog.content && index.count<=3}">
<c:if test="${empty callbackLog.callRecordId}">
[电话已拨,但未接通或被挂断]
</c:if>
<c:if test="${not empty callbackLog.callRecordId && index.count<=3}">
[语音记录]
</c:if>
</c:if> </c:if>
<div class="mangerId_up" > <c:if test="${not empty callbackLog.content && index.count<=3}">
<c:choose> <c:choose>
<c:when test="${customer.buyIntention eq '1'}"> <c:when test="${fn:length(callbackLog.content) > 20}">
A <c:out value="${fn:substring(callbackLog.content, 0, 20)}..."/>
</c:when>
<c:when test="${customer.buyIntention eq '2'}">
B
</c:when>
<c:when test="${customer.buyIntention eq '3'}">
C
</c:when>
<c:when test="${customer.buyIntention eq '4'}">
D
</c:when>
<c:when test="${customer.buyIntention eq '5'}">
E
</c:when> </c:when>
<c:otherwise> <c:otherwise>
待定 <c:out value="${callbackLog.content}"/>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</div> </c:if>
</div> </p>
</c:forEach>
</div>
</div> </div>
<div class="mangerId_state"> </div>
<span class="inline">${customer.platCustomerStatus}</span> <div class="mangerlist__date">
<div class="mangerlist__dateC">
<c:forEach items="${customer.callbackLogEntities}" var="callbackLog"
varStatus="index">
<p><c:if test="${index.count<=3}">
<f:formatDate value='${callbackLog.createTime}' pattern='MM-dd HH:mm'/>
</c:if>
</p>
</c:forEach>
</div> </div>
</td> </div>
<td class="mangerlist mangerItem" style="width: 40%"> <div class="mangerlist__record"
<c:if test="${0 ne fn:length(customer.callbackLogEntities)}"> onclick="showCustomerCallbackLogs('${customer.id}', '${customer.managerId}')">
<div class="mangerlist__txt" style="width: 60%"> 查看回访记录
<div class="mangerlist__item"> </div>
<c:forEach items="${customer.callbackLogEntities}" var="callbackLog" </c:if>
varStatus="index"> <c:if test="${0 eq fn:length(customer.callbackLogEntities)}">
<p> <div class="mangerlist__txt">
<c:if test="${empty callbackLog.content && index.count<=3}"> <div class="mangerlist__item">
<c:if test="${empty callbackLog.callRecordId}"> 暂无回访记录!
[电话已拨,但未接通或被挂断]
</c:if>
<c:if test="${not empty callbackLog.callRecordId && index.count<=3}">
[语音记录]
</c:if>
</c:if>
<c:if test="${not empty callbackLog.content && index.count<=3}">
<c:choose>
<c:when test="${fn:length(callbackLog.content) > 20}">
<c:out value="${fn:substring(callbackLog.content, 0, 20)}..."/>
</c:when>
<c:otherwise>
<c:out value="${callbackLog.content}"/>
</c:otherwise>
</c:choose>
</c:if>
</p>
</c:forEach>
</div>
</div>
<div class="mangerlist__date">
<div class="mangerlist__dateC">
<c:forEach items="${customer.callbackLogEntities}" var="callbackLog"
varStatus="index">
<p><c:if test="${index.count<=3}">
<f:formatDate value='${callbackLog.createTime}' pattern='MM-dd HH:mm'/>
</c:if>
</p>
</c:forEach>
</div>
</div>
<div class="mangerlist__record" onclick="showCustomerCallbackLogs('${customer.id}', '${customer.managerId}')">
查看回访记录
</div>
</c:if>
<c:if test="${0 eq fn:length(customer.callbackLogEntities)}">
<div class="mangerlist__txt">
<div class="mangerlist__item">
暂无回访记录!
</div>
</div>
<div class="mangerlist__date">
<div class="mangerlist__dateC">
</div>
</div>
</c:if>
<%--<div class="mangerItem__border"></div>--%>
</td>
<%--<td class="mangerItem mangerCollect ${customer.star}"--%>
<%--onclick="toggleCollect(this,'${customer.id}', '${customer.starUserId}', '${customer.star}', '${customer.managerId}')">--%>
<%--<div class="mangerItem__border"></div>--%>
<%--</td>--%>
<td class="mangerItem mangerOperate" style="display: table;padding: 0;overflow:visible;">
<div class="mangerOperate__time" style="right:160px;width:150px;">
<c:if test="${null ne customer.bindTime && '' ne customer.bindTime}">
派工:<f:formatDate value='${customer.bindTime}'
pattern='MM-dd HH:mm'/>
</c:if>
<c:if test="${null eq customer.bindTime || '' eq customer.bindTime}">
&nbsp;
</c:if>
</div> </div>
<div class="mangerOperate__time" style="right:0px"> </div>
<c:if test="${null ne customer.createTime && '' ne customer.createTime}"> <div class="mangerlist__date">
<f:formatDate value='${customer.createTime}' <div class="mangerlist__dateC">
pattern='MM-dd HH:mm'/>
</c:if>
<c:if test="${null eq customer.createTime || '' eq customer.createTime}">
&nbsp;
</c:if>
</div> </div>
<div style="display: table-cell;vertical-align: middle"> </div>
<c:if test="${customer.hasCustomerProjects}"> </c:if>
<div class="mangerOperate__record" onclick="showCustomerProjects('${customer.id}', '${customer.managerId}')" </td>
style="position: relative;">
约看记录 <td class="mangerItem mangerOperate" style="display: table;padding: 0;overflow:visible;">
<c:if test="${customer.hasNewCustomerProjects}"> <div class="mangerOperate__time" style="right:160px;width:150px;">
<div style="position: absolute; width: 8px;height: 8px;background-color: red;border-radius: 50%;top: 5px;right: -7px;"></div> <c:if test="${null ne customer.bindTime && '' ne customer.bindTime}">
</c:if> 派工:<f:formatDate value='${customer.bindTime}'
</div> pattern='MM-dd HH:mm'/>
</c:if> </c:if>
<c:if test="${!customer.hasCustomerProjects}"> <c:if test="${null eq customer.bindTime || '' eq customer.bindTime}">
<div class="mangerOperate__record none" &nbsp;
style="position: relative;cursor: default;color:grey;"> </c:if>
约看记录 </div>
</div> <div class="mangerOperate__time" style="right:0px">
<c:if test="${null ne customer.createTime && '' ne customer.createTime}">
<f:formatDate value='${customer.createTime}'
pattern='MM-dd HH:mm'/>
</c:if>
<c:if test="${null eq customer.createTime || '' eq customer.createTime}">
&nbsp;
</c:if>
</div>
<div style="display: table-cell;vertical-align: middle">
<c:if test="${customer.hasCustomerProjects}">
<div class="mangerOperate__record"
onclick="showCustomerProjects('${customer.id}', '${customer.managerId}')"
style="position: relative;">
约看记录
<c:if test="${customer.hasNewCustomerProjects}">
<div style="position: absolute; width: 8px;height: 8px;background-color: red;border-radius: 50%;top: 5px;right: -7px;"></div>
</c:if> </c:if>
<div class="mangerOperate__detail" onclick="customerInfo(${customer.id}, '${customer.managerId}', ${customer.phone})">查看详情</div>
</div> </div>
</td> </c:if>
</tr> <c:if test="${!customer.hasCustomerProjects}">
</c:forEach> <div class="mangerOperate__record none"
</tbody> style="position: relative;cursor: default;color:grey;">
</table> 约看记录
<div class="row-fluid" style="position: relative"> </div>
<house365:newPagination page="${page}"/> </c:if>
</div> <div class="mangerOperate__detail"
onclick="customerInfo(${customer.id}, '${customer.managerId}', ${customer.phone})">查看详情
</div>
<%--<div class="mangerOperate__detail"--%>
<%--onclick="deleteById(${customer.id})">删除--%>
<%--</div>--%>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="row-fluid" style="position: relative">
<house365:newPagination page="${page}"/>
</div>
<script type="text/html" id="customerProjectsTemplate"> <script type="text/html" id="customerProjectsTemplate">
...@@ -793,7 +816,7 @@ ...@@ -793,7 +816,7 @@
} }
} }
return fmt; return fmt;
} };
function getCRM(customerId) { function getCRM(customerId) {
$.ajax({ $.ajax({
...@@ -819,6 +842,28 @@ ...@@ -819,6 +842,28 @@
window.open("/house365-hgs-web/platformmanagement/customerInfo?customerId=" + id + "&managerId=" + managerId + "&phone=" + phone, "_blank"); window.open("/house365-hgs-web/platformmanagement/customerInfo?customerId=" + id + "&managerId=" + managerId + "&phone=" + phone, "_blank");
} }
function deleteById(customerId) {
House365Util.createModal("删除客户", "删除后将无法恢复,请确认是否继续?", function () {
var url = "${ctx}/platformmanagement/deleteById/" + customerId;
$.ajax({
url: url,
type: 'post',
contentType: 'application/json',
data: '',
dataType: 'json',
cache: false,
success: function (result) {
if (result.status == 0) {
alert("删除成功");
window.location.reload();
} else{
alert(result.errorMessage);
}
}
});
});
}
function showCustomerCallbackLogs(_customerId, managerId) { function showCustomerCallbackLogs(_customerId, managerId) {
setCookie("lastChoseCustomerId", _customerId); setCookie("lastChoseCustomerId", _customerId);
$.ajax({ $.ajax({
......
...@@ -23,6 +23,7 @@ import com.house365.ws.beans.request.MapListRequest; ...@@ -23,6 +23,7 @@ import com.house365.ws.beans.request.MapListRequest;
import com.house365.ws.beans.response.CustomerListResponse; import com.house365.ws.beans.response.CustomerListResponse;
import com.house365.ws.beans.response.CustomerResponse; import com.house365.ws.beans.response.CustomerResponse;
import com.house365.ws.beans.response.MapListResponse; import com.house365.ws.beans.response.MapListResponse;
import com.house365.ws.beans.util.HResult;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -241,9 +242,9 @@ public interface ICustomer extends IService { ...@@ -241,9 +242,9 @@ public interface ICustomer extends IService {
void updateOldCustomerStar(int customerId, int starCustomer); void updateOldCustomerStar(int customerId, int starCustomer);
int queryCount (Map<String, Object> map); int queryCount(Map<String, Object> map);
MapListResponse successList(MapListRequest listRequest,UserEntity userEntity); MapListResponse successList(MapListRequest listRequest, UserEntity userEntity);
Integer countCustomer(Map<String, Object> map); Integer countCustomer(Map<String, Object> map);
...@@ -261,6 +262,8 @@ public interface ICustomer extends IService { ...@@ -261,6 +262,8 @@ public interface ICustomer extends IService {
List<CustomerEntity> getAllCustomer4(Map<String, Object> map); List<CustomerEntity> getAllCustomer4(Map<String, Object> map);
MapListResponse seaList(MapListRequest listRequest,String type); MapListResponse seaList(MapListRequest listRequest, String type);
HResult deleteById(int id, int userId, String userName);
} }
...@@ -37,6 +37,7 @@ import com.house365.ws.beans.request.MapListRequest; ...@@ -37,6 +37,7 @@ import com.house365.ws.beans.request.MapListRequest;
import com.house365.ws.beans.response.CustomerListResponse; import com.house365.ws.beans.response.CustomerListResponse;
import com.house365.ws.beans.response.CustomerResponse; import com.house365.ws.beans.response.CustomerResponse;
import com.house365.ws.beans.response.MapListResponse; import com.house365.ws.beans.response.MapListResponse;
import com.house365.ws.beans.util.HResult;
import com.house365.ws.cached.RedisUtilsInterface; import com.house365.ws.cached.RedisUtilsInterface;
import com.house365.ws.dao.mapper.*; import com.house365.ws.dao.mapper.*;
import com.house365.ws.interfaces.server.ICustomer; import com.house365.ws.interfaces.server.ICustomer;
...@@ -142,6 +143,8 @@ public class CustomerImpl implements ICustomer { ...@@ -142,6 +143,8 @@ public class CustomerImpl implements ICustomer {
private CloudCustomerMapper cloudCustomerMapper; private CloudCustomerMapper cloudCustomerMapper;
@Autowired @Autowired
private UserMapper userMapper; private UserMapper userMapper;
@Autowired
private DepartMapper departMapper;
@Value("${crm.sync.url}") @Value("${crm.sync.url}")
...@@ -392,7 +395,6 @@ public class CustomerImpl implements ICustomer { ...@@ -392,7 +395,6 @@ public class CustomerImpl implements ICustomer {
if (inOtherUser.length() > 0) { if (inOtherUser.length() > 0) {
msg += "客户" + inCurrentUser.toString() + "已存在于当前帐号下"; msg += "客户" + inCurrentUser.toString() + "已存在于当前帐号下";
// msg += "<hr/>客户" + inOtherUser.toString() + "已存在于他人帐号下";
} }
} }
...@@ -3080,6 +3082,22 @@ public class CustomerImpl implements ICustomer { ...@@ -3080,6 +3082,22 @@ public class CustomerImpl implements ICustomer {
return response; return response;
} }
@Override
public HResult deleteById(int id, int userId, String userName) {
HResult result = new HResult();
CustomerEntity customer = customerMapper.queryById(id);
if (null == customer.getManagerId()) {
customer.setIsDelete(1);
customerService.update(customer);
//新增客户删除日志
logUtils.saveCustomerLog(customer, 3, userId, userName);
} else {
result.setStatus(500);
result.setErrorMessage("客户未回公海,不能删除");
}
return result;
}
/** /**
* 以下均为自动生成 * 以下均为自动生成
*/ */
......
...@@ -73,7 +73,6 @@ public class GetOnlineLogImpl implements IGetOnlineLog { ...@@ -73,7 +73,6 @@ public class GetOnlineLogImpl implements IGetOnlineLog {
String endTime = time + " 23:59:59"; String endTime = time + " 23:59:59";
searchMap.put("startTime", startTime); searchMap.put("startTime", startTime);
searchMap.put("endTime", endTime); searchMap.put("endTime", endTime);
// searchMap.put("order", 1);
searchMap.put("userId", u.getId()); searchMap.put("userId", u.getId());
List<OnlineLogEntity> logList = logMapper.queryByConditions(searchMap); List<OnlineLogEntity> logList = logMapper.queryByConditions(searchMap);
if (CollectionUtils.isNotEmpty(logList)) { if (CollectionUtils.isNotEmpty(logList)) {
......
...@@ -912,6 +912,11 @@ ...@@ -912,6 +912,11 @@
(manager_id in ($searchFilters.userIds.value$) ) (manager_id in ($searchFilters.userIds.value$) )
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.deptManagerId">
<![CDATA[
(manager_id in ($searchFilters.deptManagerId.value$) )
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.customerIds"> <isNotEmpty prepend="AND" property="searchFilters.customerIds">
<![CDATA[ <![CDATA[
(id in ($searchFilters.customerIds.value$) ) (id in ($searchFilters.customerIds.value$) )
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND name = #{name} AND name = #{name}
</if> </if>
<if test="likeName != null and likeName != ''">
AND name LIKE CONCAT('',#{likeName},'%')
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -150,6 +150,12 @@ ...@@ -150,6 +150,12 @@
<if test="deptId != null and deptId >= 0 "> <if test="deptId != null and deptId >= 0 ">
AND deptId = #{deptId} AND deptId = #{deptId}
</if> </if>
<if test="deptIdList != null and deptIdList.size() > 0 ">
AND deptId in
<foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="order != null and order > 0 "> <if test="order != null and order > 0 ">
ORDER BY name ASC ORDER BY name ASC
</if> </if>
......
...@@ -912,6 +912,11 @@ ...@@ -912,6 +912,11 @@
(manager_id in ($searchFilters.userIds.value$) ) (manager_id in ($searchFilters.userIds.value$) )
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.deptManagerId">
<![CDATA[
(manager_id in ($searchFilters.deptManagerId.value$) )
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.customerIds"> <isNotEmpty prepend="AND" property="searchFilters.customerIds">
<![CDATA[ <![CDATA[
(id in ($searchFilters.customerIds.value$) ) (id in ($searchFilters.customerIds.value$) )
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND name = #{name} AND name = #{name}
</if> </if>
<if test="likeName != null and likeName != ''">
AND name LIKE CONCAT('',#{likeName},'%')
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -150,6 +150,12 @@ ...@@ -150,6 +150,12 @@
<if test="deptId != null and deptId >= 0 "> <if test="deptId != null and deptId >= 0 ">
AND deptId = #{deptId} AND deptId = #{deptId}
</if> </if>
<if test="deptIdList != null and deptIdList.size() > 0 ">
AND deptId in
<foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="order != null and order > 0 "> <if test="order != null and order > 0 ">
ORDER BY name ASC ORDER BY name ASC
</if> </if>
......
...@@ -912,6 +912,11 @@ ...@@ -912,6 +912,11 @@
(manager_id in ($searchFilters.userIds.value$) ) (manager_id in ($searchFilters.userIds.value$) )
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.deptManagerId">
<![CDATA[
(manager_id in ($searchFilters.deptManagerId.value$) )
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.customerIds"> <isNotEmpty prepend="AND" property="searchFilters.customerIds">
<![CDATA[ <![CDATA[
(id in ($searchFilters.customerIds.value$) ) (id in ($searchFilters.customerIds.value$) )
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND name = #{name} AND name = #{name}
</if> </if>
<if test="likeName != null and likeName != ''">
AND name LIKE CONCAT('',#{likeName},'%')
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -150,6 +150,12 @@ ...@@ -150,6 +150,12 @@
<if test="deptId != null and deptId >= 0 "> <if test="deptId != null and deptId >= 0 ">
AND deptId = #{deptId} AND deptId = #{deptId}
</if> </if>
<if test="deptIdList != null and deptIdList.size() > 0 ">
AND deptId in
<foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="order != null and order > 0 "> <if test="order != null and order > 0 ">
ORDER BY name ASC ORDER BY name ASC
</if> </if>
......
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