Commit 5bde56a4 authored by 徐州's avatar 徐州

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	house365-hgs-ws/src/main/resources/development/mybatis/CustomerMergeMapper.xml
#	house365-hgs-ws/src/main/resources/test/mybatis/CustomerMergeMapper.xml
parents 2e896941 73385a63
...@@ -19,6 +19,7 @@ public class DutyStaffEntity extends DomainObject { ...@@ -19,6 +19,7 @@ public class DutyStaffEntity extends DomainObject {
private String userId; private String userId;
private String onduty; private String onduty;
private Date updateTime; private Date updateTime;
private Integer order;
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
...@@ -51,4 +52,12 @@ public class DutyStaffEntity extends DomainObject { ...@@ -51,4 +52,12 @@ public class DutyStaffEntity extends DomainObject {
public void setOnduty(String onduty) { public void setOnduty(String onduty) {
this.onduty = onduty; this.onduty = onduty;
} }
public Integer getOrder() {
return order;
}
public void setOrder(Integer order) {
this.order = order;
}
} }
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<sitemesh.version>2.4.2</sitemesh.version> <sitemesh.version>2.4.2</sitemesh.version>
<jackson.version>2.4.4</jackson.version> <jackson.version>2.4.4</jackson.version>
<swagger.version>0.9.4</swagger.version> <swagger.version>0.9.4</swagger.version>
<shiro.version>1.2.5</shiro.version> <shiro.version>1.7.0</shiro.version>
<house365.version>1.0.0-SNAPSHOT</house365.version> <house365.version>1.0.0-SNAPSHOT</house365.version>
<jdk.version>1.8</jdk.version> <jdk.version>1.8</jdk.version>
</properties> </properties>
......
...@@ -172,6 +172,14 @@ public class CloudActivityController extends BaseController { ...@@ -172,6 +172,14 @@ public class CloudActivityController extends BaseController {
return "----------addCloudActivityNew success---------"; return "----------addCloudActivityNew success---------";
} }
@RequestMapping(value = "/addCloudActivity")
@ResponseBody
public String addCloudActivity() {
activityInterface.addCloudActivity();
System.out.println("----------添加云迹活动成功---------");
return "----------addCloudActivity success---------";
}
@RequestMapping(value = "/updateStatus") @RequestMapping(value = "/updateStatus")
@ResponseBody @ResponseBody
public String updateStatus() { public String updateStatus() {
......
...@@ -24,6 +24,7 @@ import com.house365.beans.vo.CustomerProjectStatusDetailVo; ...@@ -24,6 +24,7 @@ import com.house365.beans.vo.CustomerProjectStatusDetailVo;
import com.house365.beans.vo.CustomerProjectStatusProgressVo; import com.house365.beans.vo.CustomerProjectStatusProgressVo;
import com.house365.beans.vo.CustomerProjectVo; import com.house365.beans.vo.CustomerProjectVo;
import com.house365.beans.vo.CustomerVo; import com.house365.beans.vo.CustomerVo;
import com.house365.rest.exception.IllegalServiceParameterException;
import com.house365.rest.exception.ServiceRunException; import com.house365.rest.exception.ServiceRunException;
import com.house365.rest.parameter.House365RestObject; import com.house365.rest.parameter.House365RestObject;
import com.house365.rest.parameter.House365RestResponse; import com.house365.rest.parameter.House365RestResponse;
...@@ -34,8 +35,10 @@ import com.house365.ws.beans.request.*; ...@@ -34,8 +35,10 @@ 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.beans.util.HResult;
import com.house365.ws.interfaces.server.*; import com.house365.ws.interfaces.server.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.http.util.TextUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -52,6 +55,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -52,6 +55,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -3038,6 +3042,7 @@ public class CustomerController extends BaseController { ...@@ -3038,6 +3042,7 @@ public class CustomerController extends BaseController {
} }
} }
//查询回访记录 //查询回访记录
cpMap.put("customerId", customerEntity.getId()); cpMap.put("customerId", customerEntity.getId());
List<CustomerCallbackLogEntity> backLogList = customerCallbackLog.queryByConditions(cpMap); List<CustomerCallbackLogEntity> backLogList = customerCallbackLog.queryByConditions(cpMap);
...@@ -3167,6 +3172,151 @@ public class CustomerController extends BaseController { ...@@ -3167,6 +3172,151 @@ public class CustomerController extends BaseController {
return getAutoUrl("transferCreator"); return getAutoUrl("transferCreator");
} }
/**
* 获取批量转移客户人员列表
* @param model
* @param request
* @return
*/
@RequestMapping(value = "batchQuery", method = RequestMethod.GET)
public String batchQuery(Model model, HttpServletRequest request) {
String mobilesStr = request.getParameter("mobiles");
if(TextUtils.isEmpty(mobilesStr)) {
return getAutoUrl();
}
model.addAttribute("mobiles", mobilesStr);
String[] mobiles = mobilesStr.split("\r\n");
List<String> phoneList = Arrays.stream(mobiles).distinct().map(i->i.trim()).filter(i -> !TextUtils.isEmpty(i)).collect(Collectors.toList());
if(mobiles.length > 100) {
addErrorMessage(model, "最多可搜索100个手机号");
return getAutoUrl();
}
/**
* 公海
*/
List<String> ghPhones = customer.getExistByPhone(phoneList,0).stream().map(i-> i.getPhone()).collect(Collectors.toList());
/**
* 待派
*/
List<String> dpPhones = new ArrayList<>();
//待派1:客户营销
List<String> dpKhyx = marketCustomer.getExistPhone(phoneList);
dpPhones.addAll(dpKhyx);
//待派2:云迹
List<String> dpYj = cloudCustomerInterface.getExistByPhone(phoneList,0);
dpPhones.addAll(dpYj);
// 待派3:公海CRM导入
List<String> dpGh = customer.getExistByPhone(phoneList,1).stream().map(i-> i.getPhone()).collect(Collectors.toList());
dpPhones.addAll(dpGh);
dpPhones = dpPhones.stream().distinct().collect(Collectors.toList());
/**
* 私客
*/
List<String> skPhones = new ArrayList<>();
List<CustomerEntity> skkh = customer.getExistByPhone(phoneList, 3);
List<CustomerEntity> skdhf = customer.getExistByPhone(phoneList, 2);
for (int i = 0; i < skkh.size(); i++) {
if(getBackSeaTime(request,skkh.get(i)) > System.currentTimeMillis()) {
skPhones.add(skkh.get(i).getPhone());
} else if(!ghPhones.contains(skkh.get(i).getPhone())) {
ghPhones.add(skkh.get(i).getPhone());
}
}
for (int i = 0; i < skdhf.size(); i++) {
if(getBackSeaTime(request,skdhf.get(i)) > System.currentTimeMillis()) {
skPhones.add(skdhf.get(i).getPhone());
} else if(!ghPhones.contains(skdhf.get(i).getPhone())) {
ghPhones.add(skdhf.get(i).getPhone());
}
}
// skPhones.addAll(customer.getExistByPhone(phoneList,3));
// 待回访
// skPhones.addAll(customer.getExistByPhone(phoneList,2));
skPhones = skPhones.stream().distinct().collect(Collectors.toList());
/**
* 判断重复数据
*/
final List<String> sk = new ArrayList<>(skPhones);
final List<String> gh = new ArrayList<>(ghPhones);
final List<String> dp = new ArrayList<>(dpPhones);
dpPhones = dpPhones.stream().map(i-> {
if(sk.contains(i) || gh.contains(i)) {
return i+ "(多客户池)";
}
return i;
}).collect(Collectors.toList());
skPhones = skPhones.stream().map(i-> {
if(dp.contains(i) || gh.contains(i)) {
return i+ "(多客户池)";
}
return i;
}).collect(Collectors.toList());
ghPhones = ghPhones.stream().map(i-> {
if(dp.contains(i) || sk.contains(i)) {
return i+ "(多客户池)";
}
return i;
}).collect(Collectors.toList());
if(dpPhones != null) {
StringBuilder dpSb = new StringBuilder();
dpPhones.stream().forEach(i-> {
dpSb.append(i).append("\r\n");
});
phoneList.removeAll(dp);
model.addAttribute("dpPhones",dpSb.toString());
}
if(skPhones != null) {
StringBuilder skSb = new StringBuilder();
skPhones.stream().forEach(i-> {
skSb.append(i).append("\r\n");
});
phoneList.removeAll(sk);
model.addAttribute("skPhones",skSb.toString());
}
if(ghPhones != null) {
StringBuilder ghSb = new StringBuilder();
ghPhones.stream().forEach(i-> {
ghSb.append(i).append("\r\n");
});
phoneList.removeAll(gh);
model.addAttribute("ghPhones",ghSb.toString());
}
if(phoneList != null) {
StringBuilder qtSb = new StringBuilder();
phoneList.stream().forEach(i-> {
qtSb.append(i).append("\r\n");
});
model.addAttribute("qtPhones",qtSb.toString());
}
model.addAttribute("dpSize",dpPhones == null ? 0 : dpPhones.size());
model.addAttribute("skSize",skPhones == null ? 0 : skPhones.size());
model.addAttribute("ghSize",ghPhones == null ? 0 : ghPhones.size());
model.addAttribute("qtSize",phoneList.size());
return getAutoUrl();
}
/** /**
* 批量转移平台客户创建人 * 批量转移平台客户创建人
* @param request * @param request
...@@ -3193,4 +3343,54 @@ public class CustomerController extends BaseController { ...@@ -3193,4 +3343,54 @@ public class CustomerController extends BaseController {
return restResponse; return restResponse;
} }
public long getBackSeaTime(HttpServletRequest request,CustomerEntity customerEntity) {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
String cityId = departmentEntity.getCityID();
DepartmentResponse departmentResponse = department.getDepartmentById(Integer.valueOf(cityId));
String cityCode = departmentResponse.getEntity().getDescripition();
customerEntity = customer.getCustomerMerge(customerEntity.getPhone(),customerEntity.getManagerId());
if(customerEntity == null) return 0;
//根据新的客户id获取旧表中的id
Map<String, Object> idMap = new HashMap<>(10);
idMap.put("phone", customerEntity.getPhone());
idMap.put("managerId", customerEntity.getManagerId());
idMap.put("isPrivate", 1);
List<CustomerEntity> oldList = customer.queryByConditions(idMap);
List<Integer> customerIdList = new ArrayList<>();
customerIdList.add(Integer.valueOf(customerEntity.getId()));
if (CollectionUtils.isNotEmpty(oldList)) {
for (CustomerEntity e : oldList) {
customerIdList.add(e.getId());
}
}
//查询约看项目
Map<String, Object> cpMap = new HashMap<>(10);
cpMap.put("idList", customerIdList);
List<CustomerProjectEntity> cpList = customerProject.queryList(cpMap);
//查询回访记录
List<CustomerCallbackLogEntity> backLogList = customerCallbackLog.queryByConditions(cpMap);
// 客户详情展示退回公海时间
boolean displayBackToSeaDate = false;
Calendar backToSeaCal = Calendar.getInstance();
userEntity.setCity(customerEntity.getCityCode());
int visitCount = 0;
displayBackToSeaDate = DictUtil.getBackToSeaTime(customerEntity, userEntity, cpList, backToSeaCal, visitCount, backLogList, displayBackToSeaDate);
if (displayBackToSeaDate) {
return backToSeaCal.getTime().getTime();
}
return 0;
}
} }
package com.house365.web.controller; package com.house365.web.controller;
import com.google.common.base.Joiner;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.house365.beans.entity.*; import com.house365.beans.entity.*;
import com.house365.beans.system.Page; import com.house365.beans.system.Page;
...@@ -65,6 +66,22 @@ public class PlatformManagementController extends BaseController { ...@@ -65,6 +66,22 @@ public class PlatformManagementController extends BaseController {
// 获取查询条件 // 获取查询条件
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
//多选来源放回去
if(searchParams.containsKey("EQ_actSources")) {
Object act = searchParams.get("EQ_actSources");
List<String> list = new ArrayList<>();
if(act instanceof String[]) {
String[] EQ_actSource = (String[]) act;
model.addAttribute("selected", Arrays.toString(EQ_actSource));
Arrays.stream(EQ_actSource).forEach(i-> list.add(i));
} else {
model.addAttribute("selected", act.toString());
list.add(act.toString());
}
searchParams.put("EQ_actSources", list);
}
Page page = new Page(pageSize == null ? 100 : pageSize); Page page = new Page(pageSize == null ? 100 : pageSize);
if (null != number) { if (null != number) {
page.setCurrentPage(number); page.setCurrentPage(number);
......
...@@ -85,6 +85,9 @@ ...@@ -85,6 +85,9 @@
<shiro:hasPermission name="ZYBG"> <shiro:hasPermission name="ZYBG">
<li><a href="${ctx}/propertyreport/list">我的置业报告</a></li> <li><a href="${ctx}/propertyreport/list">我的置业报告</a></li>
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="KHCX">
<li><a href="${ctx}/customer/batchQuery">客户查询</a></li>
</shiro:hasPermission>
</ul> </ul>
</li> </li>
</shiro:hasPermission> </shiro:hasPermission>
...@@ -296,6 +299,9 @@ ...@@ -296,6 +299,9 @@
<shiro:hasPermission name="PLZYKH"> <shiro:hasPermission name="PLZYKH">
<li><a href="${ctx}/transfercustomer">批量转移客户</a></li> <li><a href="${ctx}/transfercustomer">批量转移客户</a></li>
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="PBGL">
<li><a href="${ctx}/user/pblist">排班管理</a></li>
</shiro:hasPermission>
</ul> </ul>
</li> </li>
......
...@@ -53,12 +53,17 @@ ...@@ -53,12 +53,17 @@
<pattern>/basetree/transferNode</pattern> <pattern>/basetree/transferNode</pattern>
</decorator> </decorator>
<decorator name="userSiteMesh" page="userSiteMesh.jsp">
<pattern>/user/*</pattern>
</decorator>
<decorator name="userDetailSiteMesh" page="default.jsp"> <decorator name="userDetailSiteMesh" page="default.jsp">
<pattern>/user/detail*</pattern> <pattern>/user/detail*</pattern>
<pattern>/user/pblist*</pattern>
<pattern>/user/pleform*</pattern>
<pattern>/user/pbform*</pattern>
</decorator>
<decorator name="userSiteMesh" page="userSiteMesh.jsp">
<pattern>/user/*</pattern>
</decorator> </decorator>
<decorator name="deptSiteMesh" page="userSiteMesh.jsp"> <decorator name="deptSiteMesh" page="userSiteMesh.jsp">
......
<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<html>
<head>
<title>客户查询</title>
<style>
.frm{
}
.frm label{
display: flex;
align-items: center;
justify-content: flex-end;
}
.frm label .ico{
width:16px;
height:16px;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACB0lEQVQ4T6WTMWhUQRCG/9mrtbIwamEnimgRQQUTsMkVoqiolRGtRLB8O3tX6VX3dvfBERDEKmKsVIJoFZuIChowhSKKnYWihZXKdbsj+3grz0sjuMXbnZ3Zf4aZ7xH+c9Hk++FwuLPT6Vwhot0iMp38RLQuIh9CCDf7/f6n9pu/BJxzFwHcIKJlEXksIi8bgcNEdFxETgO4ysy3s8gfAefcDIBnAM4x8/0U4Jw7m/YJ+x6AWWZ+XounT1VVW2KMH5VSc0VRrDePV0VkU1PBT2Y+2sROxxifKKV2FUXxvRZwznkAm5n5crKttfNEdIqZU8nJvxpCGPT7/aeNfQvAD2bWWWBFRO4aY5ZSwGg0mgohbMvVWGtfA1jI/ibBeWbu1gLW2m8xxkOTHU4+7/21GOPceDzuDgaDX+kuTUop9coYszVX8EVEDhpjPrdHVJblrFJqmYiOaa3Xss9au4OI1ph5ey3gvX8kIku5263A6+lsjKn3vNJ0iGhea30iV2CJaEprfaEdWFXVnmQXRfG+fe+9vyMiX5nZ1AINfe8AXGpXUZZlN/l7vd5KOzuAxRDC3tSzNkiJwkWl1IHcfe99DZTWugaqqqrEQJpISlTTOIlyovEhgAci8iLGWNOmlJohoiMAzgA4mSncINBkSVQaAPtEZH9D4hsAb5VSNtHX7seGv7Ht/Jfzb2MR+RGfG8h4AAAAAElFTkSuQmCC');
background-size: 16px 16px;
position: relative;
margin:0 10px;
}
.frm label .ico text{
display: none;
position: absolute;
background-color: rgba(0,0,0,.7);
color:#fff;
font-size:14px;
white-space:nowrap;
left:50%;
top:-36px;
transform: translate3d(-50%,0,0);
padding:5px;
border-radius: 2px;
}
.frm label .ico:hover text{
display: inline-block;
}
.frm label .ico text::after{
left:50%;
margin-left:-6px;
bottom:-6px;
content: '';
position: absolute;
width: 0;
height: 0;
border-top: 6px solid rgba(0,0,0,.7);
border-right: 6px solid transparent;
border-left: 6px solid transparent;
}
</style>
</head>
<body>
<div class="container" style="width: 1200px;">
<form id="input_form" class="form-horizontal valid"
action="${ctx}/customer/batchQuery"
method="get">
<house365:flushMessage/>
<div class="row${fluid}">
<div>
<div class="form-horizontal house365Page">
<div class="house365Border">
<!-- 片段头 begin -->
<div class="sectionTitle">
<h5>客户查询</h5>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">手机号:</label>
<div class="controls">
<textarea rows="10" cols="200" id="mobiles" style="width: 200%" placeholder="请输入手机号码,一行一个"
name="mobiles" class="required">${mobiles}</textarea>
</div>
</div>
</div>
<button class="btn blue" type="submit"><i
class="icon-search"></i>&nbsp;查询
</div>
</div>
</div>
</div>
</form>
<br/>
<div class="row${fluid}">
<div>
<div class="form-horizontal house365Page">
<div class="house365Border">
<!-- 片段头 begin -->
<div class="sectionTitle">
<h5>查询结果</h5>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">公海(${ghSize}):</label>
<div class="controls">
<textarea rows="5" id="ghmobiles" style="width: 200%"
name="ghmobiles" class="required">${ghPhones}</textarea>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">私客池(${skSize}):</label>
<div class="controls">
<textarea rows="5" id="skmobiles" style="width: 200%"
name="skmobiles" class="required">${skPhones}</textarea>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">待派工(${dpSize}):</label>
<div class="controls">
<textarea rows="5" id="tpmobiles" style="width: 200%"
name="tpmobiles" class="required">${dpPhones}</textarea>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 control-group frm">
<label class="control-label">其他(${qtSize}):<div class="ico"><text>未进入系统的用户</text></div></label>
<div class="controls">
<textarea rows="5" id="qtmobiles" style="width: 200%"
name="qtmobiles" class="required">${qtPhones}</textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function batchQuery() {
/* var $form = $("#input_form");
$.ajax({
url: $form.attr("action")+"?222=111",
type: "GET",
data: $form.serialize(),
success: function (data) {
alert(111);
}
}); */
}
</script>
</div>
</body>
</html>
<%@include file="/WEB-INF/common/layouts/common.jsp" %> <%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %> <%@ page language="java" pageEncoding="UTF-8" %>
<html> <html>
<head> <head>
<c:if test="${not empty managerName}"> <c:if test="${not empty managerName}">
...@@ -207,7 +208,6 @@ ...@@ -207,7 +208,6 @@
.chosen-container { .chosen-container {
margin-left: 7px !important; margin-left: 7px !important;
width: 96px !important;
} }
.shouc { .shouc {
...@@ -233,6 +233,7 @@ ...@@ -233,6 +233,7 @@
text-overflow: ellipsis; text-overflow: ellipsis;
margin-left: -3px; margin-left: -3px;
} }
</style> </style>
<!-- 面包屑 begin --> <!-- 面包屑 begin -->
...@@ -438,12 +439,13 @@ ...@@ -438,12 +439,13 @@
name="search_LIKE_createrName" value="${param['search_LIKE_createrName']}" name="search_LIKE_createrName" value="${param['search_LIKE_createrName']}"
class="m-wrap small" placeholder="请输入添加人姓名">&nbsp; class="m-wrap small" placeholder="请输入添加人姓名">&nbsp;
<br/>
活动来源: 活动来源:
<select width: 6rem name="search_EQ_actSource" id="search_EQ_actSource"> <select name="search_EQ_actSources" id="search_EQ_actSources" multiple="true" class="">
<c:forEach items="${sources}" var="source"> <c:forEach items="${sources}" var="source">
<option value="${source.sourceName}" <option value="${source.sourceName}"
<c:if test="${source.sourceName eq param['search_EQ_actSource']}">selected="selected"</c:if>>${source.sourceName}</option> <c:if test="${fn:contains(selected,source.sourceName)}">selected="selected"</c:if>>${source.sourceName}</option>
<%-- <c:if test="${source.sourceName eq param['search_EQ_actSource']}"></c:if>>${source.sourceName}</option>--%>
</c:forEach> </c:forEach>
</select> </select>
...@@ -1177,8 +1179,8 @@ ...@@ -1177,8 +1179,8 @@
$("#search_EQ_isPtStar").val("1"); $("#search_EQ_isPtStar").val("1");
$("#search_EQ_isPtStar").trigger('chosen:updated'); $("#search_EQ_isPtStar").trigger('chosen:updated');
// 重置活动来源 // 重置活动来源
$("#search_EQ_actSource").val(""); $("#search_EQ_actSources").val("");
$("#search_EQ_actSource").trigger('chosen:updated'); $("#search_EQ_actSources").trigger('chosen:updated');
// 重置添加时间 近7天 开始时间结束时间 // 重置添加时间 近7天 开始时间结束时间
createTimeClick('0'); createTimeClick('0');
......
...@@ -87,21 +87,27 @@ ...@@ -87,21 +87,27 @@
//单选 //单选
function checkMember(btn) { function checkMember(btn) {
if (btn.checked) { if(btn.checked) {
var checkAll = true;
for (i = 0; i < document.all("memberCheck").length; i++) { for (i = 0; i < document.all("memberCheck").length; i++) {
if (document.all("memberCheck")[i].checked == false) { document.all("memberCheck")[i].checked = false;
checkAll = false;
}
}
if (checkAll) {
document.getElementById("memberCheckAll").checked = true;
} }
btn.checked = true;
} }
else { // if (btn.checked) {
document.getElementById("memberCheckAll").checked = false; // var checkAll = true;
} // for (i = 0; i < document.all("memberCheck").length; i++) {
// if (document.all("memberCheck")[i].checked == false) {
// checkAll = false;
// }
// }
//
// if (checkAll) {
// document.getElementById("memberCheckAll").checked = true;
// }
// }
// else {
// document.getElementById("memberCheckAll").checked = false;
// }
} }
var authorizeById = function (selectedId) { var authorizeById = function (selectedId) {
......
...@@ -115,8 +115,8 @@ ...@@ -115,8 +115,8 @@
<div class="row${fluid}"> <div class="row${fluid}">
<div class="span12"> <div class="span12">
<form id="filterForm" class="form-inline filterForm" action="${ctx}/user/" method="get"> <form id="filterForm" class="form-inline filterForm" action="${ctx}/user/" method="get">
<%--<input type="hidden" name="search_EQ_deptId" value="${sessionTreeDept}"--%> <input type="hidden" name="search_EQ_deptId" value="${sessionTreeDept}"
<%--class="m-wrap small span2" placeholder="deptId">--%> class="m-wrap small span2" placeholder="deptId">
<%--<input type="text" name="search_EQ_id" value="${param['search_EQ_id']}"--%> <%--<input type="text" name="search_EQ_id" value="${param['search_EQ_id']}"--%>
<%--class="m-wrap small span2" placeholder="用户ID">--%> <%--class="m-wrap small span2" placeholder="用户ID">--%>
<input type="text" name="search_LIKE_name" value="${param['search_LIKE_name']}" <input type="text" name="search_LIKE_name" value="${param['search_LIKE_name']}"
......
<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<html>
<head>
<title>排班新增/编辑</title>
</head>
<style type="text/css">
.img-show {
width: 160px;
height: 120px;
border: 1px solid #ccc;
padding: 2px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
</style>
<body>
<div class="container" style="width: 1200px;">
<!-- 面包屑 begin -->
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li class="active"><span class="divider" style="color:#26a0da;font-weight:bold;">/</span>排班新增/编辑</li>
</ul>
</div>
</div>
<!-- 面包屑 begin -->
<form id="input_form" class="form-horizontal valid" action="${ctx}/user/addDuty"
method="get">
<!-- 面包屑 end -->
<house365:flushMessage/>
<div class="row${fluid}">
<div class="span12">
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">选择员工<span style="color: red;">*</span>:</label>
<div class="controls">
<c:if test="${not empty param.eid}">
<input type="text" style="display: none" name="eid" value="${param.eid}"/>
</c:if>
<input type="text" style="display: none" name="action" value="${empty param.eid ? 'add' : "edit"}"/>
<select name="uid" id="select" <c:if test="${not empty param.eid}">disabled</c:if> >
<option value="0">==请选择==</option>
<c:forEach items="${userByCity}" var="var" varStatus="vs">
<option value="${var.id}" <c:if test="${var.id eq param.eid}">selected="selected"</c:if>> ${var.realName} ${var.position}</option>
</c:forEach>
</select>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">排序值<span style="color: #ff0000;">*</span>:</label>
<div class="controls">
<input type="text" id="order"
name="order" class="required" maxlength="64"
value="${param.order}"/>
</div>
</div>
</div>
<div class="portlet-header">
<div class="row-fluid">
<div class="operation-btn span18">
<a href="${ctx}/user/pblist" class="btn gray"><i
class="icon-mail-reply"></i>&nbsp;返回</a>
<button class="btn blue btn col-lg-pull-12" type="submit">
&nbsp;确认
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<script language="javascript" type="text/javascript" src="${ctx}/resources/customize/js/layer.js"></script>
<script type="text/javascript">
function save1() {
var order = document.getElementById("order").value;
var myselect = document.getElementById("select");
var index=myselect.selectedIndex;
var id_name =myselect.options[index].value
if (order == "") {
alert("排序值不能为null!!!")
}
$.ajax({
url: '${ctx}/user/addDuty/' + id_name + '/' + order,
type: 'GET',
contentType: 'application/json',
data: '',
dataType: 'json',
cache: false,
async:false,
success: function () {
alert("增加成功!!!")
location.href = '${ctx}/user/pblist'
},
error:function(){
alert("操作失败!!!")
location.href = '${ctx}/user/pblist'
}
});
}
</script>
</body>
</html>
<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<html>
<head>
<title>排班编辑</title>
</head>
<style type="text/css">
.img-show {
width: 160px;
height: 120px;
border: 1px solid #ccc;
padding: 2px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
</style>
<body>
<div class="container" style="width: 1200px;">
<form id="input_form" class="form-horizontal valid"
<%-- action="${ctx}/user/pblist"
method="get"--%>>
<!-- 面包屑 end -->
<house365:flushMessage/>
<div class="row${fluid}">
<div class="span12">
<input type="hidden" id="entity_onduty"
name="entity.onduty" class="required" maxlength="24"
value="${entity.onduty}"/>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">ID:</label>
<div class="controls">
<input type="text" id="entity_userId" disabled="disabled"
name="entity.userId" class="required" maxlength="24"
value="${entity.userId}"/>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">姓名:</label>
<div class="controls">
<input type="text" id="entity_name" disabled="disabled"
name="entity.name" class="required" maxlength="24"
value="${entity.name}"/>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 control-group">
<label class="control-label">排序值:</label>
<div class="controls">
<input type="text" id="entity_order"
name="entity.order" class="required" maxlength="3"
value="${entity.order}"/>
</div>
</div>
</div>
<div class="row-fluid">
<div class="portlet-header">
<div class="operation-btn col-md-offset-4 col-lg-offset-4col-xl-offset-4">
<%-- <a href="${ctx}/user/pbelist/${userId}" class="btn gray"><i
class="icon-mail-reply"></i>&nbsp;恢复原来值</a>--%>
<button class="btn blue btn col-lg-pull-12" onclick="save(${entity.userId},${entity.onduty})">
&nbsp;确认
</button>
<a href="${ctx}/user/pblist" class="btn gray"><i
class="icon-mail-reply"></i>&nbsp;返回</a>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<script language="javascript" type="text/javascript" src="${ctx}/resources/customize/js/layer.js"></script>
<script type="text/javascript">
function save(userId,onduty) {
var order = document.getElementById("entity_order").value;
var orderInt = parseInt(order);
if(onduty==1){
alert("当天值日不可修改!!!")
return;
}
if(order>100){
alert("排序值不能大于100!!!")
return;
}
if (order == "") {
alert("排序值不能为null!!!")
return;
}
$.ajax({
url: '${ctx}/user/updateDuty/' + userId + '/' + order,
type: 'GET',
contentType: 'application/json',
data: '',
dataType: 'json',
cache: false,
async:false,
success: function () {
alert("修改成功!!!")
location.href = '${ctx}/user/pblist'
},
error:function(){
alert("修改失败!!!")
location.href = '${ctx}/user/pblist'
}
});
}
</script>
</body>
</html>
...@@ -40,6 +40,8 @@ public interface ICloudActivityInterface { ...@@ -40,6 +40,8 @@ public interface ICloudActivityInterface {
void addCloudActivityNew(); void addCloudActivityNew();
void addCloudActivity();
void updateStatus(); void updateStatus();
void updateDutyStaff(); void updateDutyStaff();
......
...@@ -23,4 +23,11 @@ public interface ICloudCustomerInterface { ...@@ -23,4 +23,11 @@ public interface ICloudCustomerInterface {
HResult judgeCustomer(int id); HResult judgeCustomer(int id);
void updateById(int customerId, UserEntity userEntity); void updateById(int customerId, UserEntity userEntity);
/**
* 查询给定手机号是不是云迹数据
* @param phoneList
* @return
*/
List<String> getExistByPhone(List<String> phoneList,int status);
} }
...@@ -273,4 +273,6 @@ public interface ICustomer extends IService { ...@@ -273,4 +273,6 @@ public interface ICustomer extends IService {
void batchTransferCreator(String[] customerIds, String[] userIds, UserEntity userEntity, int type) throws Exception; void batchTransferCreator(String[] customerIds, String[] userIds, UserEntity userEntity, int type) throws Exception;
int queryCountById(Integer userId); int queryCountById(Integer userId);
List<CustomerEntity> getExistByPhone(List<String> phoneList,int type);
} }
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
*/ */
package com.house365.ws.interfaces.server; package com.house365.ws.interfaces.server;
import com.house365.beans.entity.MarketCustomerEntity;
import com.house365.rest.context.IService; import com.house365.rest.context.IService;
import com.house365.rest.parameter.House365RestResponse; import com.house365.rest.parameter.House365RestResponse;
import com.house365.ws.beans.request.MarketCustomerListRequest; import com.house365.ws.beans.request.MarketCustomerListRequest;
...@@ -21,6 +22,8 @@ import com.house365.ws.beans.response.MarketCustomerListResponse; ...@@ -21,6 +22,8 @@ import com.house365.ws.beans.response.MarketCustomerListResponse;
import com.house365.ws.beans.response.MarketCustomerResponse; import com.house365.ws.beans.response.MarketCustomerResponse;
import com.house365.ws.beans.util.HResult; import com.house365.ws.beans.util.HResult;
import java.util.List;
/** /**
* 客户信息WS接口<br> * 客户信息WS接口<br>
...@@ -89,4 +92,6 @@ public interface IMarketCustomer extends IService{ ...@@ -89,4 +92,6 @@ public interface IMarketCustomer extends IService{
HResult judgeCustomer(int id); HResult judgeCustomer(int id);
List<String> getExistPhone(List<String> phoneList);
} }
...@@ -187,4 +187,26 @@ public interface IUser extends IService { ...@@ -187,4 +187,26 @@ public interface IUser extends IService {
String getCityById(String userId); String getCityById(String userId);
/**
* 查询城市值班人员
* @param cityCode nj
* @return
*/
List<UserEntity> getDutyUserByCity(String cityCode);
/**
* 查询城市全部可用员工
* @param cityCode nj
* @return
*/
List<UserEntity> getUserByCity(String cityCode);
void deleteDutyById(Integer userId);
void addDuty(UserEntity userEntity ,Integer order);
void updateDutyStaff(DutyStaffEntity entity);
void updateDuty(Integer order,Integer id);
DutyStaffEntity pbelist(Integer userId);
} }
...@@ -23,4 +23,6 @@ public interface CloudCustomerMapper { ...@@ -23,4 +23,6 @@ public interface CloudCustomerMapper {
int queryCount(Map<String, Object> map); int queryCount(Map<String, Object> map);
void update(CloudCustomerEntity entity); void update(CloudCustomerEntity entity);
List<String> getExistByPhone(Map<String, Object> map);
} }
...@@ -101,4 +101,6 @@ public interface CustomerMapper { ...@@ -101,4 +101,6 @@ public interface CustomerMapper {
void updatePtCustomerCreaterMerge(Map<String, Object> map); void updatePtCustomerCreaterMerge(Map<String, Object> map);
int queryCountById(Integer userId); int queryCountById(Integer userId);
List<CustomerEntity> getExistByPhone(Map<String, Object> map);
} }
...@@ -82,5 +82,7 @@ public interface CustomerMergeMapper { ...@@ -82,5 +82,7 @@ public interface CustomerMergeMapper {
List<CustomerEntity> getAllCustomer3(Map<String, Object> map); List<CustomerEntity> getAllCustomer3(Map<String, Object> map);
List<CustomerEntity> getAllCustomer4(Map<String, Object> map); List<CustomerEntity> getAllCustomer4(Map<String, Object> map);
List<CustomerEntity> getExistByPhone(Map<String, Object> map);
} }
package com.house365.ws.dao.mapper; package com.house365.ws.dao.mapper;
import com.house365.beans.entity.MarketCustomerEntity;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -12,4 +14,6 @@ import java.util.Map; ...@@ -12,4 +14,6 @@ import java.util.Map;
public interface MarketCustomerMapper { public interface MarketCustomerMapper {
void updateCustomerId(Map<String,Object> map); void updateCustomerId(Map<String,Object> map);
List<String> getExistByPhone(Map<String,Object> map);
} }
...@@ -4,8 +4,10 @@ import com.house365.beans.entity.DutyStaffEntity; ...@@ -4,8 +4,10 @@ import com.house365.beans.entity.DutyStaffEntity;
import com.house365.beans.entity.RequestLoginEntity; import com.house365.beans.entity.RequestLoginEntity;
import com.house365.beans.entity.UserEntity; import com.house365.beans.entity.UserEntity;
import com.house365.beans.entity.UserSimpleEntity; import com.house365.beans.entity.UserSimpleEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -27,8 +29,6 @@ public interface UserMapper { ...@@ -27,8 +29,6 @@ public interface UserMapper {
UserEntity getLimitLoginById(String name); UserEntity getLimitLoginById(String name);
void updateDutyStaff(DutyStaffEntity staff);
List<DutyStaffEntity> getOndutyById(Integer uid); List<DutyStaffEntity> getOndutyById(Integer uid);
void addRequestLoginInfo(RequestLoginEntity requestlogin); void addRequestLoginInfo(RequestLoginEntity requestlogin);
...@@ -41,7 +41,7 @@ public interface UserMapper { ...@@ -41,7 +41,7 @@ public interface UserMapper {
RequestLoginEntity getRequestLoginInfoById(Integer id); RequestLoginEntity getRequestLoginInfoById(Integer id);
List<DutyStaffEntity> getDutyByCondition(Map<String,Object> map); List<DutyStaffEntity> getDutyByCondition(Map<String, Object> map);
List<UserEntity> queryManagers(Map<String, Object> map); List<UserEntity> queryManagers(Map<String, Object> map);
...@@ -49,8 +49,26 @@ public interface UserMapper { ...@@ -49,8 +49,26 @@ public interface UserMapper {
List<UserEntity> getManagerByPid(Map<String, Object> map); List<UserEntity> getManagerByPid(Map<String, Object> map);
void updateUserStatus(Map<String,Object> map); void updateUserStatus(Map<String, Object> map);
String getCityById(String userId); String getCityById(String userId);
List<UserEntity> getDutyUserByCity(Map<String, Object> map);
List<UserEntity> getDutyUserByCityAndOnDuty(String cityCode);
List<UserEntity> getUserByCity(Map<String, Object> map);
void deleteDutyById(Integer userId);
void addDuty(@Param("name")String name,@Param("userId") Integer userId, @Param("updateTime")Date updateTime, @Param("order")Integer order);
void updateDutyStaff(DutyStaffEntity staff);
DutyStaffEntity selectBuyDutyId(Integer userId);
void updateDuty(@Param("order")Integer order,@Param("userId") Integer userId,@Param("updateTime")Date updateTime);
void updateDutyOnduty(@Param("userId") Integer userId,@Param("updateTime")Date updateTime,@Param("onduty") Integer onduty);
} }
...@@ -524,6 +524,11 @@ public class CloudActivityImpl implements ICloudActivityInterface { ...@@ -524,6 +524,11 @@ public class CloudActivityImpl implements ICloudActivityInterface {
staffDuty.addCloudActivityNew(); staffDuty.addCloudActivityNew();
} }
@Override
public void addCloudActivity() {
staffDuty.addCloudActivity();
}
@Override @Override
public void updateStatus() { public void updateStatus() {
staffDuty.updateJgStatus(); staffDuty.updateJgStatus();
......
...@@ -370,4 +370,12 @@ public class CloudCustomerImpl implements ICloudCustomerInterface { ...@@ -370,4 +370,12 @@ public class CloudCustomerImpl implements ICloudCustomerInterface {
} }
} }
@Override
public List<String> getExistByPhone(List<String> phoneList, int status) {
Map<String, Object> map = new HashMap<>();
map.put("phoneList",phoneList);
map.put("status",status);
return mapper.getExistByPhone(map);
}
} }
...@@ -3226,4 +3226,41 @@ public class CustomerImpl implements ICustomer { ...@@ -3226,4 +3226,41 @@ public class CustomerImpl implements ICustomer {
@Override @Override
public void commit() { public void commit() {
} }
/**
* 判断手机号是都在表里
* @param phoneList
* @param type 0,【公海】
* 1,【待派】待派CRM
* 2,【私客】待回访
* 3,【私客】customer_merge表
* @return
*/
@Override
public List<CustomerEntity> getExistByPhone(List<String> phoneList, int type) {
Map<String, Object> map = new HashMap<>( 10 );
map.put("phoneList",phoneList);
map.put("is_delete",0);
if(type == 0) {
map.put("manager_id",0);//不能有manager_id
} else if (type == 1) {
// CRM导入
map.put( "createSource", "CRM导入" );
map.put( "isRecycled", 0 );
map.put( "notBuyIntention", "5" );
map.put("manager_id",0);
} else if(type == 2) {
map.put("hotlone",0);
map.put("isWaitCall",1);
map.put("manager_id",1);
}
if(type == 3) {
Map<String,Object> param = new HashMap<>();
param.put("phoneList",phoneList);
return customermergemapper.getExistByPhone(param);
}
return customerMapper.getExistByPhone(map);
}
} }
...@@ -334,4 +334,9 @@ public class MarketCustomerImpl implements IMarketCustomer { ...@@ -334,4 +334,9 @@ public class MarketCustomerImpl implements IMarketCustomer {
@Override @Override
public void commit() { public void commit() {
} }
@Override
public List<String> getExistPhone(List<String> phoneList) {
return marketCustomerService.getExistPhone(phoneList);
}
} }
...@@ -131,6 +131,7 @@ public class UserImpl implements IUser { ...@@ -131,6 +131,7 @@ public class UserImpl implements IUser {
return userMapper.getOndutyById(uid); return userMapper.getOndutyById(uid);
} }
@Override @Override
public List<LabelEntity> getCustomerLabelById(LabelEntity labelentity) { public List<LabelEntity> getCustomerLabelById(LabelEntity labelentity) {
return labelmapper.getCustomerLabelById(labelentity); return labelmapper.getCustomerLabelById(labelentity);
...@@ -298,7 +299,6 @@ public class UserImpl implements IUser { ...@@ -298,7 +299,6 @@ public class UserImpl implements IUser {
response.setResultCode(ReturnResult.FAIL.getResultCode()); response.setResultCode(ReturnResult.FAIL.getResultCode());
response.setResultMessage(ex.getMessage()); response.setResultMessage(ex.getMessage());
} }
logger.error("数据库登录查询:" + response.getObjectList().toString());
return response; return response;
} }
...@@ -451,7 +451,7 @@ public class UserImpl implements IUser { ...@@ -451,7 +451,7 @@ public class UserImpl implements IUser {
* @return 删除账户响应 * @return 删除账户响应
*/ */
@Override @Override
public UserResponse deleteUserById(Integer id,int userId) { public UserResponse deleteUserById(Integer id, int userId) {
UserResponse response = new UserResponse(); UserResponse response = new UserResponse();
try { try {
// 插入delete_user表 // 插入delete_user表
...@@ -720,7 +720,7 @@ public class UserImpl implements IUser { ...@@ -720,7 +720,7 @@ public class UserImpl implements IUser {
} }
@Override @Override
public List<UserEntity> getManagerByPid(Integer uid, String managername){ public List<UserEntity> getManagerByPid(Integer uid, String managername) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("id", uid); map.put("id", uid);
map.put("realName", managername); map.put("realName", managername);
...@@ -1141,4 +1141,45 @@ public class UserImpl implements IUser { ...@@ -1141,4 +1141,45 @@ public class UserImpl implements IUser {
@Override @Override
public void commit() { public void commit() {
} }
@Override
public List<UserEntity> getDutyUserByCity(String cityCode) {
Map<String, Object> param = new HashMap<>();
param.put("cityCode", cityCode);
return userMapper.getDutyUserByCity(param);
}
@Override
public List<UserEntity> getUserByCity(String cityCode) {
Map<String, Object> param = new HashMap<>();
param.put("cityCode", cityCode);
return userMapper.getUserByCity(param);
}
@Override
public void deleteDutyById(Integer userId) {
userMapper.deleteDutyById(userId);
}
@Override
public void addDuty(UserEntity userEntity, Integer order) {
userMapper.addDuty(userEntity.getRealName(), userEntity.getId(), new Date(), order);
}
@Override
public void updateDutyStaff(DutyStaffEntity entity) {
userMapper.updateDutyStaff(entity);
}
@Override
public void updateDuty(Integer order, Integer id) {
userMapper.updateDuty(order, id, new Date());
}
@Override
public DutyStaffEntity pbelist(Integer userId) {
return userMapper.selectBuyDutyId(userId);
}
} }
...@@ -356,8 +356,15 @@ public class CustomerWechat implements ICustomerWechat { ...@@ -356,8 +356,15 @@ public class CustomerWechat implements ICustomerWechat {
// 业务层统一处理 // 业务层统一处理
try { try {
House365RestObject<CustomerEntity> data = doGetHotLineCustomer(map); House365RestObject<CustomerEntity> data = doGetHotLineCustomer(map);
System.out.println(("getShowMobile=" + entity.getShowMobile() + ",data.size=" + data.getList().size()));
if(entity.getShowMobile() != 1) { if(entity.getShowMobile() != 1) {
data.getEntity().setPhone(MobileUtil.hidePhone(data.getEntity().getPhone())); if(entity.getShowMobile() != 1) {
if(data.getList() != null) {
for (int i = 0; i < data.getList().size(); i++) {
data.getList().get(i).setPhone(MobileUtil.hidePhone(data.getList().get(i).getPhone()));
}
}
}
} }
response.setResult(ReturnAppResult.APP_SUCCESS.getResultCode()); response.setResult(ReturnAppResult.APP_SUCCESS.getResultCode());
response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage()); response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage());
...@@ -1824,10 +1831,19 @@ public class CustomerWechat implements ICustomerWechat { ...@@ -1824,10 +1831,19 @@ public class CustomerWechat implements ICustomerWechat {
// 取得所需参数 // 取得所需参数
Map<String, Object> map = parameter.getArgs(); Map<String, Object> map = parameter.getArgs();
House365RestResponse<CustomerEntity> response = new House365RestResponse<>(); House365RestResponse<CustomerEntity> response = new House365RestResponse<>();
String phone = getMapValueByKey(Constant.CUSTOMER_PHONE, map, "");
UserEntity entity = getUserEntity(phone);
// 业务层统一处理 // 业务层统一处理
try { try {
House365RestObject<CustomerEntity> data = doGetManagers(map); House365RestObject<CustomerEntity> data = doGetManagers(map);
if(entity.getShowMobile() != 1) {
if(data.getList() != null) {
for (int i = 0; i < data.getList().size(); i++) {
data.getList().get(i).setPhone(MobileUtil.hidePhone(data.getList().get(i).getPhone()));
}
}
}
response.setResult(ReturnAppResult.APP_SUCCESS.getResultCode()); response.setResult(ReturnAppResult.APP_SUCCESS.getResultCode());
response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage()); response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage());
response.setData(data); response.setData(data);
......
...@@ -278,7 +278,11 @@ public class ProjectWechat implements IProjectWechat { ...@@ -278,7 +278,11 @@ public class ProjectWechat implements IProjectWechat {
try { try {
House365RestObject<CustomerEntity> data = doGetCustomers(map); House365RestObject<CustomerEntity> data = doGetCustomers(map);
if(entity.getShowMobile() != 1) { if(entity.getShowMobile() != 1) {
data.getEntity().setPhone(MobileUtil.hidePhone(data.getEntity().getPhone())); if(data.getList() != null) {
for (int i = 0; i < data.getList().size(); i++) {
data.getList().get(i).setPhone(MobileUtil.hidePhone(data.getList().get(i).getPhone()));
}
}
} }
response.setResult(ReturnAppResult.APP_SUCCESS.getResultCode()); response.setResult(ReturnAppResult.APP_SUCCESS.getResultCode());
response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage()); response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage());
...@@ -330,7 +334,6 @@ public class ProjectWechat implements IProjectWechat { ...@@ -330,7 +334,6 @@ public class ProjectWechat implements IProjectWechat {
// 取得所需参数 // 取得所需参数
Map<String, Object> map = parameter.getArgs(); Map<String, Object> map = parameter.getArgs();
House365RestResponse<CustomerEntity> response = new House365RestResponse<>(); House365RestResponse<CustomerEntity> response = new House365RestResponse<>();
// 业务层统一处理 // 业务层统一处理
try { try {
House365RestObject<CustomerEntity> data = doGetCustomerDetail(map); House365RestObject<CustomerEntity> data = doGetCustomerDetail(map);
...@@ -626,7 +629,9 @@ public class ProjectWechat implements IProjectWechat { ...@@ -626,7 +629,9 @@ public class ProjectWechat implements IProjectWechat {
// 取得所需参数 // 取得所需参数
Map<String, Object> map = parameter.getArgs(); Map<String, Object> map = parameter.getArgs();
House365RestResponse<CustomerEntity> response = new House365RestResponse<>(); House365RestResponse<CustomerEntity> response = new House365RestResponse<>();
String phone = getMapValueByKey(Constant.CUSTOMER_PHONE, map, "");
System.out.println("____________________phone=" + phone);
UserEntity entity = getUserEntity(phone);
// 业务层统一处理 // 业务层统一处理
try { try {
House365RestObject object = new House365RestObject(); House365RestObject object = new House365RestObject();
...@@ -660,6 +665,12 @@ public class ProjectWechat implements IProjectWechat { ...@@ -660,6 +665,12 @@ public class ProjectWechat implements IProjectWechat {
url = MemoryPropertyPlaceholderConfigurer.getContextProperty("CRM.TOUCH.HOST") + jsonObject.get("data"); url = MemoryPropertyPlaceholderConfigurer.getContextProperty("CRM.TOUCH.HOST") + jsonObject.get("data");
} }
} }
LOGGER.info("UserEntity:" + entity.toString() + "--phone=" + phone);
if(entity.getShowMobile() != 1) {
url += "&showMobile=0";
} else {
url += "&showMobile=1";
}
LOGGER.info("getCRMCustomerURL :{},url:{}", res, url); LOGGER.info("getCRMCustomerURL :{},url:{}", res, url);
} catch (Exception e) { } catch (Exception e) {
...@@ -1620,7 +1631,10 @@ public class ProjectWechat implements IProjectWechat { ...@@ -1620,7 +1631,10 @@ public class ProjectWechat implements IProjectWechat {
CustomerEntity customerEntity = new CustomerEntity(); CustomerEntity customerEntity = new CustomerEntity();
List<BaseAttachment> attachments = new ArrayList<>(); List<BaseAttachment> attachments = new ArrayList<>();
String projectId = getMapValueByKey(Constant.CUSTOMER_PROJECT_ID, map, ""); String projectId = getMapValueByKey(Constant.CUSTOMER_PROJECT_ID, map, "");
LOGGER.debug("==doGetCustomerProject>>projectId:{}==", projectId); //置业顾问手机
String phone = getMapValueByKey(Constant.CUSTOMER_PHONE, map, "");
UserEntity userEntity = getUserEntity(phone);
LOGGER.debug("==doGetCustomerProject>>projectId:{}==", projectId + "UserEntity=" + userEntity.toString() + phone);
if (!Strings.isNullOrEmpty(projectId)) { if (!Strings.isNullOrEmpty(projectId)) {
customerEntity = getCustomerProjectEntity(projectId); customerEntity = getCustomerProjectEntity(projectId);
attachments = attachmentService.queryByResourceIdAndResouceType(projectId, "hgs_customer_project"); attachments = attachmentService.queryByResourceIdAndResouceType(projectId, "hgs_customer_project");
...@@ -1629,6 +1643,10 @@ public class ProjectWechat implements IProjectWechat { ...@@ -1629,6 +1643,10 @@ public class ProjectWechat implements IProjectWechat {
CustomerProjectStatusProgressVo statusProgress = getStatusProgress(projectId); CustomerProjectStatusProgressVo statusProgress = getStatusProgress(projectId);
customerEntity.setStatusProgress(statusProgress); customerEntity.setStatusProgress(statusProgress);
} }
if(userEntity.getShowMobile() != 1) {
customerEntity.setPhone(MobileUtil.hidePhone(customerEntity.getPhone()));
}
object.setEntity(customerEntity); object.setEntity(customerEntity);
List<CustomerProjectEntity> customerProjectEntities = customerEntity.getCps(); List<CustomerProjectEntity> customerProjectEntities = customerEntity.getCps();
if(CollectionUtils.isNotEmpty(customerProjectEntities)){ if(CollectionUtils.isNotEmpty(customerProjectEntities)){
...@@ -1909,6 +1927,9 @@ public class ProjectWechat implements IProjectWechat { ...@@ -1909,6 +1927,9 @@ public class ProjectWechat implements IProjectWechat {
resultMap.put("logShowList", logShowList); resultMap.put("logShowList", logShowList);
} }
} }
if(userEntity.getShowMobile() != 1) {
customerEntity.setPhone(MobileUtil.hidePhone(customerEntity.getPhone()));
}
resultMap.put("customer", customerEntity); resultMap.put("customer", customerEntity);
object.setEntity(resultMap); object.setEntity(resultMap);
return object; return object;
......
...@@ -26,6 +26,7 @@ import com.house365.ws.dao.interfaces.ICustomerDao; ...@@ -26,6 +26,7 @@ import com.house365.ws.dao.interfaces.ICustomerDao;
import com.house365.ws.dao.interfaces.IMarketCustomerDao; import com.house365.ws.dao.interfaces.IMarketCustomerDao;
import com.house365.ws.dao.interfaces.IMarketingActivityDao; import com.house365.ws.dao.interfaces.IMarketingActivityDao;
import com.house365.ws.dao.mapper.CustomerMapper; import com.house365.ws.dao.mapper.CustomerMapper;
import com.house365.ws.dao.mapper.MarketCustomerMapper;
import com.house365.ws.dao.mapper.UserMapper; import com.house365.ws.dao.mapper.UserMapper;
import com.house365.ws.interfaces.impl.CustomerImpl; import com.house365.ws.interfaces.impl.CustomerImpl;
import com.house365.ws.service.interfaces.IMarketCustomerService; import com.house365.ws.service.interfaces.IMarketCustomerService;
...@@ -70,6 +71,8 @@ public class MarketCustomerServiceImpl<T extends MarketCustomerEntity> extends D ...@@ -70,6 +71,8 @@ public class MarketCustomerServiceImpl<T extends MarketCustomerEntity> extends D
private UserMapper userMapper; private UserMapper userMapper;
@Autowired @Autowired
private OperateLogUtils logUtils; private OperateLogUtils logUtils;
@Autowired
private MarketCustomerMapper marketCustomerMapper;
@Override @Override
protected Dao<T> getDao() { protected Dao<T> getDao() {
...@@ -166,4 +169,11 @@ public class MarketCustomerServiceImpl<T extends MarketCustomerEntity> extends D ...@@ -166,4 +169,11 @@ public class MarketCustomerServiceImpl<T extends MarketCustomerEntity> extends D
} }
} }
@Override
public List<String> getExistPhone(List<String> phones){
Map<String,Object> map = new HashMap<>();
map.put("phoneList",phones);
List<String> list = marketCustomerMapper.getExistByPhone(map);
return list;
}
} }
...@@ -205,4 +205,7 @@ public class MarketingActivityServiceImpl<T extends MarketingActivityEntity> ext ...@@ -205,4 +205,7 @@ public class MarketingActivityServiceImpl<T extends MarketingActivityEntity> ext
marketingActivityDao.addBughtCount(id); marketingActivityDao.addBughtCount(id);
} }
} }
...@@ -46,4 +46,6 @@ public interface IMarketCustomerService<T extends MarketCustomerEntity> extends ...@@ -46,4 +46,6 @@ public interface IMarketCustomerService<T extends MarketCustomerEntity> extends
void removeCustomer(CustomerEntity custmerId, Integer userId) throws ServiceRunException; void removeCustomer(CustomerEntity custmerId, Integer userId) throws ServiceRunException;
List<String> getExistPhone(List<String> phones);
} }
...@@ -407,29 +407,31 @@ ...@@ -407,29 +407,31 @@
<!--&lt;!&ndash;同步crm报名轨迹数据定时结束&ndash;&gt;--> <!--&lt;!&ndash;同步crm报名轨迹数据定时结束&ndash;&gt;-->
<!--<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">--> <!--驻场值班人员更新定时开始-->
<!--<property name="triggers">--> <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<!--<list>--> <property name="triggers">
<!--<ref bean="dutyStaff"/>--> <list>
<!--</list>--> <ref bean="dutyStaff"/>
<!--</property>--> </list>
<!--</bean>--> </property>
</bean>
<!--<bean id="dutyStaff" class="org.springframework.scheduling.quartz.CronTriggerBean">-->
<!--<property name="jobDetail" ref="checkDutyStaff"/>--> <bean id="dutyStaff" class="org.springframework.scheduling.quartz.CronTriggerBean">
<!--<property name="cronExpression" value="0 0 1 * * ? "/>--> <property name="jobDetail" ref="checkDutyStaff"/>
<!--</bean>--> <property name="cronExpression" value="0 48 13 * * ? "/>
</bean>
<!--<bean id="checkDutyStaff" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">-->
<!--&lt;!&ndash;调用的类&ndash;&gt;--> <bean id="checkDutyStaff" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<!--<property name="targetObject">--> <!--调用的类-->
<!--<ref bean="staffDuty"/>--> <property name="targetObject">
<!--</property>--> <ref bean="staffDuty"/>
<!--&lt;!&ndash;调用类中的方法&ndash;&gt;--> </property>
<!--<property name="targetMethod">--> <!--调用类中的方法-->
<!--<value>updateDutyStaff</value>--> <property name="targetMethod">
<!--</property>--> <value>updateDutyStaff</value>
<!--</bean>--> </property>
</bean>
<!--驻场值班人员更新定时结束-->
<!--&lt;!&ndash; N天无回访入公海begin &ndash;&gt;--> <!--&lt;!&ndash; N天无回访入公海begin &ndash;&gt;-->
<!--<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">--> <!--<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">-->
......
...@@ -1547,6 +1547,14 @@ ...@@ -1547,6 +1547,14 @@
c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value# c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value#
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.actSources">
<![CDATA[ c.act_source in ]]>
<iterate prepend="" property="searchFilters.actSources.value" close=")" open="(" conjunction=",">
<![CDATA[ #searchFilters.actSources.value[]# ]]>
</iterate>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.starCustomer"> <isNotEmpty prepend="AND" property="searchFilters.starCustomer">
<![CDATA[ <![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value# starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...@@ -2129,6 +2137,7 @@ ...@@ -2129,6 +2137,7 @@
isRecycled $searchFilters.isRecycled.operation$ #searchFilters.isRecycled.value# isRecycled $searchFilters.isRecycled.operation$ #searchFilters.isRecycled.value#
]]> ]]>
</isNotNull> </isNotNull>
</isNotNull> </isNotNull>
</dynamic> </dynamic>
</sql> </sql>
......
...@@ -384,4 +384,16 @@ ...@@ -384,4 +384,16 @@
</if> </if>
</select> </select>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM cloud_customer where is_delete = 0 and status = #{status}
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -890,4 +890,41 @@ ...@@ -890,4 +890,41 @@
and customer_source_type=8 and customer_source_type=8
and creater=#{userId} and creater=#{userId}
</select> </select>
<select id="getExistByPhone" parameterType="map" resultMap="infoMap">
SELECT * FROM customer where is_delete = 0
<if test="status != null and status != '' ">
AND status = #{status}
</if>
<if test="manager_id != null and manager_id == 0">
AND manager_id IS NULL
</if>
<if test="manager_id != null and manager_id == 1">
AND manager_id IS NOT NULL
</if>
<if test="createSource != null and createSource != '' ">
AND create_source = #{createSource}
</if>
<if test="isRecycled != null and isRecycled >=0">
AND isRecycled = #{isRecycled}
</if>
<if test="notBuyIntention != null and notBuyIntention != ''">
AND buy_intention != #{notBuyIntention}
</if>
<if test="hotlone != null and hotlone != ''">
AND status in (11,0,99)
</if>
<if test="isWaitCall != null and isWaitCall != ''">
AND isWaitCall = #{isWaitCall}
</if>
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
group by phone
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -121,7 +121,6 @@ ...@@ -121,7 +121,6 @@
where 1=1 where 1=1
AND manager_id = #{managerId} AND manager_id = #{managerId}
and phone = #{phone} and phone = #{phone}
limit 1
</select> </select>
<select id="getCustomerMergeById" resultMap="infoMap" parameterType="map"> <select id="getCustomerMergeById" resultMap="infoMap" parameterType="map">
......
...@@ -67,4 +67,14 @@ ...@@ -67,4 +67,14 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM market_customer where (manager_id is null or manager_id = '')
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -772,7 +772,7 @@ ...@@ -772,7 +772,7 @@
<bean id="addMarketActivity" class="org.springframework.scheduling.quartz.CronTriggerBean"> <bean id="addMarketActivity" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="addMarketCus"/> <property name="jobDetail" ref="addMarketCus"/>
<property name="cronExpression" value="0 10 3 * * ? *"/> <property name="cronExpression" value="0 10 0 * * ? *"/>
</bean> </bean>
<bean id="addMarketCus" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <bean id="addMarketCus" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
......
...@@ -1547,6 +1547,14 @@ ...@@ -1547,6 +1547,14 @@
c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value# c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value#
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.actSources">
<![CDATA[ c.act_source in ]]>
<iterate prepend="" property="searchFilters.actSources.value" close=")" open="(" conjunction=",">
<![CDATA[ #searchFilters.actSources.value[]# ]]>
</iterate>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.starCustomer"> <isNotEmpty prepend="AND" property="searchFilters.starCustomer">
<![CDATA[ <![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value# starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...@@ -1668,7 +1676,7 @@ ...@@ -1668,7 +1676,7 @@
<select id="getPlatformCustomerList" resultClass="com.house365.beans.entity.CustomerEntity"> <select id="getPlatformCustomerList" resultClass="com.house365.beans.entity.CustomerEntity">
SELECT SELECT
min( c.id ) id, min( c.id ) id,
(IFNULL((SELECT cm.NAME FROM customer_merge cm WHERE cm.phone = c.phone AND cm.manager_id = c.manager_id AND cm.cityCode = #searchFilters.cityCode.value# AND cm.is_delete = 0 AND cm.STATUS IN ( 11, 0, 99 )), (IFNULL((SELECT cm.NAME FROM customer_merge cm WHERE cm.phone = c.phone AND cm.manager_id = c.manager_id AND cm.cityCode = #searchFilters.cityCode.value# AND cm.is_delete = 0 AND cm.STATUS IN ( 11, 0, 99 ) limit 1),
( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME, ( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME,
c.phone, c.phone,
(select u2.realName from user u2 where u2.id = c.creater) creater, (select u2.realName from user u2 where u2.id = c.creater) creater,
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
#updateIp#, #updateIp#,
#preLoginTime#, #preLoginTime#,
#lastLoginTime#, #lastLoginTime#,
#hotlinephone#, #goodat#, #description#, #headImgURL#, #fullImgURL#,#isFreeMan#,#limitLogin#,#promoteId# #hotlinephone#, #goodat#, #description#, #headImgURL#, #fullImgURL#,#isFreeMan#,#limitLogin#,#promoteId#,#showMobile#
) )
]]> ]]>
<selectKey resultClass="java.lang.Integer" type="post" keyProperty="id"> <selectKey resultClass="java.lang.Integer" type="post" keyProperty="id">
......
...@@ -384,4 +384,16 @@ ...@@ -384,4 +384,16 @@
</if> </if>
</select> </select>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM cloud_customer where is_delete = 0 and status = #{status}
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -889,4 +889,40 @@ ...@@ -889,4 +889,40 @@
and customer_source_type=8 and customer_source_type=8
and creater=#{userId} and creater=#{userId}
</select> </select>
<select id="getExistByPhone" parameterType="map" resultMap="infoMap">
SELECT * FROM customer where is_delete = 0
<if test="status != null and status != '' ">
AND status = #{status}
</if>
<if test="manager_id != null and manager_id == 0">
AND manager_id IS NULL
</if>
<if test="manager_id != null and manager_id == 1">
AND manager_id IS NOT NULL
</if>
<if test="createSource != null and createSource != '' ">
AND create_source = #{createSource}
</if>
<if test="isRecycled != null and isRecycled >=0">
AND isRecycled = #{isRecycled}
</if>
<if test="notBuyIntention != null and notBuyIntention != ''">
AND buy_intention != #{notBuyIntention}
</if>
<if test="hotlone != null and hotlone != ''">
AND status in (11,0,99)
</if>
<if test="isWaitCall != null and isWaitCall != ''">
AND isWaitCall = #{isWaitCall}
</if>
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
group by phone
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
AND manager_id = #{managerId} AND manager_id = #{managerId}
and phone = #{phone} and phone = #{phone}
AND is_delete=0 AND is_delete=0
ORDER BY update_time DESC limit 1
</select> </select>
<select id="queryManagerByPhone" resultMap="infoMap" parameterType="map"> <select id="queryManagerByPhone" resultMap="infoMap" parameterType="map">
...@@ -1233,4 +1234,34 @@ ...@@ -1233,4 +1234,34 @@
</if> </if>
</select> </select>
<select id="getExistByPhone" parameterType="map" resultMap="infoMap">
SELECT * FROM customer_merge where is_delete = 0 and
STATUS IN ( 11, 0, 99 ) AND
( isWaitCall = 0 OR isWaitCall IS NULL )
<if test="phoneList != null and phoneList.size() > 0 ">
and (
phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
OR bak_phone1 IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
OR bak_phone2 IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
OR bak_phone3 IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
</select>
</mapper> </mapper>
...@@ -66,5 +66,14 @@ ...@@ -66,5 +66,14 @@
customerId = #{customerId} customerId = #{customerId}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM market_customer where (manager_id is null or manager_id = '')
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -406,29 +406,31 @@ ...@@ -406,29 +406,31 @@
<!--&lt;!&ndash;同步crm报名轨迹数据定时结束&ndash;&gt;--> <!--&lt;!&ndash;同步crm报名轨迹数据定时结束&ndash;&gt;-->
<!--<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">--> <!--驻场值班人员更新定时开始-->
<!--<property name="triggers">--> <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<!--<list>--> <property name="triggers">
<!--<ref bean="dutyStaff"/>--> <list>
<!--</list>--> <ref bean="dutyStaff"/>
<!--</property>--> </list>
<!--</bean>--> </property>
</bean>
<!--<bean id="dutyStaff" class="org.springframework.scheduling.quartz.CronTriggerBean">-->
<!--<property name="jobDetail" ref="checkDutyStaff"/>--> <bean id="dutyStaff" class="org.springframework.scheduling.quartz.CronTriggerBean">
<!--<property name="cronExpression" value="0 1 0 * * ? "/>--> <property name="jobDetail" ref="checkDutyStaff"/>
<!--</bean>--> <property name="cronExpression" value="0 0 1 * * ? "/>
</bean>
<!--<bean id="checkDutyStaff" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">-->
<!--&lt;!&ndash;调用的类&ndash;&gt;--> <bean id="checkDutyStaff" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<!--<property name="targetObject">--> <!--调用的类-->
<!--<ref bean="staffDuty"/>--> <property name="targetObject">
<!--</property>--> <ref bean="staffDuty"/>
<!--&lt;!&ndash;调用类中的方法&ndash;&gt;--> </property>
<!--<property name="targetMethod">--> <!--调用类中的方法-->
<!--<value>updateDutyStaff</value>--> <property name="targetMethod">
<!--</property>--> <value>updateDutyStaff</value>
<!--</bean>--> </property>
</bean>
<!--驻场值班人员更新定时结束-->
<!--&lt;!&ndash; N天无回访入公海begin &ndash;&gt;--> <!--&lt;!&ndash; N天无回访入公海begin &ndash;&gt;-->
<!--<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">--> <!--<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">-->
......
...@@ -1530,11 +1530,30 @@ ...@@ -1530,11 +1530,30 @@
starCustomer = 0 starCustomer = 0
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isPtStar">
<![CDATA[
star_pt_customer = 1
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isNotPtStar">
<![CDATA[
star_pt_customer = 0
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isShowInPlat"> <isNotEmpty prepend="AND" property="searchFilters.isShowInPlat">
<![CDATA[ <![CDATA[
c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value# c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value#
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.actSources">
<![CDATA[ c.act_source in ]]>
<iterate prepend="" property="searchFilters.actSources.value" close=")" open="(" conjunction=",">
<![CDATA[ #searchFilters.actSources.value[]# ]]>
</iterate>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.starCustomer"> <isNotEmpty prepend="AND" property="searchFilters.starCustomer">
<![CDATA[ <![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value# starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...@@ -1595,6 +1614,11 @@ ...@@ -1595,6 +1614,11 @@
AND c.phone = t.phone) AND c.phone = t.phone)
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.createrName">
<![CDATA[
c.creater in (select id from user u3 where u3.realName LIKE concat('', #searchFilters.createrName.value#, '%') )
]]>
</isNotEmpty>
</isNotNull> </isNotNull>
</dynamic> </dynamic>
</sql> </sql>
...@@ -1634,7 +1658,7 @@ ...@@ -1634,7 +1658,7 @@
update_time, updater, cityCode,cityName, biz_port,crmId,act_source_id, trace_status, remark, crm_sync, update_time, updater, cityCode,cityName, biz_port,crmId,act_source_id, trace_status, remark, crm_sync,
hotline_call_time,hotline_call_spend,ocean_date,is_delete,last_manager,bind_time, customer_source_type, hotline_call_time,hotline_call_spend,ocean_date,is_delete,last_manager,bind_time, customer_source_type,
customer_rel_id, isWaitCall, singupTime,marketActId, marketActName,is_peer, starCustomer, isHandover, customer_rel_id, isWaitCall, singupTime,marketActId, marketActName,is_peer, starCustomer, isHandover,
isRecycled,is_active isRecycled,is_active,starCustomer AS star_pt_customer
FROM customer_merge c FROM customer_merge c
<include refid="customer.queryManagementPage"/> <include refid="customer.queryManagementPage"/>
<isNotEmpty prepend="ORDER BY" property="searchFilters.orderBy"> <isNotEmpty prepend="ORDER BY" property="searchFilters.orderBy">
...@@ -1648,13 +1672,15 @@ ...@@ -1648,13 +1672,15 @@
</select> </select>
<!-- 平台客户查询 --> <!-- 平台客户查询 -->
<select id="getPlatformCustomerList" resultClass="com.house365.beans.entity.CustomerEntity"> <select id="getPlatformCustomerList" resultClass="com.house365.beans.entity.CustomerEntity">
SELECT SELECT
min( c.id ) id, min( c.id ) id,
(IFNULL((SELECT cm.NAME FROM customer_merge cm WHERE cm.phone = c.phone AND cm.manager_id = c.manager_id AND cm.cityCode = #searchFilters.cityCode.value# AND cm.is_delete = 0 AND cm.STATUS IN ( 11, 0, 99 )), (IFNULL((SELECT cm.NAME FROM customer_merge cm WHERE cm.phone = c.phone AND cm.manager_id = c.manager_id AND cm.cityCode = #searchFilters.cityCode.value# AND cm.is_delete = 0 AND cm.STATUS IN ( 11, 0, 99 )),
( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME, ( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME,
c.phone, c.phone,
(select u2.realName from user u2 where u2.id = c.creater) creater, (select u2.realName from user u2 where u2.id = c.creater) creater,
c.creater AS createrId,
c.star_pt_customer AS starPtCustomer,
( (
IFNULL((SELECT min( ct.create_time ) FROM customer ct WHERE ct.phone = c.phone AND ct.manager_id = c.manager_id AND ct.cityCode = #searchFilters.cityCode.value# AND ct.is_delete = 0 AND ct.STATUS IN ( 11, 0, 99 )), IFNULL((SELECT min( ct.create_time ) FROM customer ct WHERE ct.phone = c.phone AND ct.manager_id = c.manager_id AND ct.cityCode = #searchFilters.cityCode.value# AND ct.is_delete = 0 AND ct.STATUS IN ( 11, 0, 99 )),
(SELECT ct.create_time FROM customer ct WHERE ct.id = c.id)) (SELECT ct.create_time FROM customer ct WHERE ct.id = c.id))
......
...@@ -384,4 +384,17 @@ ...@@ -384,4 +384,17 @@
</if> </if>
</select> </select>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM cloud_customer where is_delete = 0 and status = #{status}
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -720,6 +720,27 @@ ...@@ -720,6 +720,27 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<update id="updatePtCustomerStar" parameterType="map">
UPDATE customer
SET
star_pt_customer = #{star}
WHERE id = #{id}
</update>
<update id="updatePtCustomerCreater" parameterType="map">
UPDATE customer
SET
creater = #{creater}
WHERE id = #{customerId}
</update>
<update id="updatePtCustomerCreaterMerge" parameterType="map">
UPDATE customer_merge
SET
creater = #{creater}
WHERE id = #{customerId}
</update>
<select id="queryForAddHot" resultMap="infoMap" parameterType="map"> <select id="queryForAddHot" resultMap="infoMap" parameterType="map">
SELECT id,phone FROM ( SELECT id,phone FROM (
SELECT SELECT
...@@ -868,4 +889,40 @@ ...@@ -868,4 +889,40 @@
and customer_source_type=8 and customer_source_type=8
and creater=#{userId} and creater=#{userId}
</select> </select>
<select id="getExistByPhone" parameterType="map" resultMap="infoMap">
SELECT * FROM customer where is_delete = 0
<if test="status != null and status != '' ">
AND status = #{status}
</if>
<if test="manager_id != null and manager_id == 0">
AND manager_id IS NULL
</if>
<if test="manager_id != null and manager_id == 1">
AND manager_id IS NOT NULL
</if>
<if test="createSource != null and createSource != '' ">
AND create_source = #{createSource}
</if>
<if test="isRecycled != null and isRecycled >=0">
AND isRecycled = #{isRecycled}
</if>
<if test="notBuyIntention != null and notBuyIntention != ''">
AND buy_intention != #{notBuyIntention}
</if>
<if test="hotlone != null and hotlone != ''">
AND status in (11,0,99)
</if>
<if test="isWaitCall != null and isWaitCall != ''">
AND isWaitCall = #{isWaitCall}
</if>
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
group by phone
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -66,5 +66,14 @@ ...@@ -66,5 +66,14 @@
customerId = #{customerId} customerId = #{customerId}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM market_customer where (manager_id is null or manager_id = '')
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
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