|
|
@@ -17,9 +17,12 @@ import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import com.goafanti.common.enums.AchievementFields;
|
|
|
import com.goafanti.customer.bo.*;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -59,7 +62,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
private String uploadPrivatePath = null;
|
|
|
@Resource
|
|
|
private AdminService adminService;
|
|
|
-
|
|
|
+
|
|
|
@Value(value = "${aesSecretKey}")
|
|
|
private String secretKey = null;
|
|
|
|
|
|
@@ -70,7 +73,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listPrivatePersonalCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 公共个人客户列表 **/
|
|
|
@RequestMapping(value = "/listPublicPersonalCustomer" , method = RequestMethod.POST)
|
|
|
public Result listPublicPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -86,7 +89,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listAllPersonalCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 签单的个人客户 **/
|
|
|
@RequestMapping(value = "/listSignPersonalCustomer", method = RequestMethod.POST)
|
|
|
public Result listSignPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -94,7 +97,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listSignPersonalCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 管理个人客户查询 **/
|
|
|
@RequestMapping(value = "/listAllManagePersonalCustomer" , method = RequestMethod.POST)
|
|
|
public Result listAllManagePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -105,7 +108,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listAllManagePersonalCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 专家查询 **/
|
|
|
@RequestMapping(value = "/listExpertCustomer" , method = RequestMethod.POST)
|
|
|
public Result listExpertCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -113,7 +116,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listAllManagePersonalCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 个人客户详情信息 **/
|
|
|
@RequestMapping(value = "/findPersonalCustomerDetail" ,method = RequestMethod.GET)
|
|
|
public Result findPersonalCustomerDetail(String uid){
|
|
|
@@ -121,10 +124,10 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findPersonalCustomerDetail(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 私有单位客户列表
|
|
|
- * 私有客户列表
|
|
|
+ * 私有客户列表
|
|
|
**/
|
|
|
@RequestMapping(value = "/listPrivateOrganizationCustomer" , method = RequestMethod.POST)
|
|
|
public Result listPrivateOrganizationCustomer(CustomerListIn cli ,Integer sort,Integer sortType,Integer pageNo, Integer pageSize){
|
|
|
@@ -133,9 +136,20 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listPrivateOrganizationCustomer(cli, sort, sortType, 0, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 渠道客户列表
|
|
|
+ *
|
|
|
+ **/
|
|
|
+ @RequestMapping(value = "/channelUserList" , method = RequestMethod.GET)
|
|
|
+ public Result channelUserList(InputChannelListBo in ){
|
|
|
+ Result res = new Result();
|
|
|
+ res.setData(customerService.channelUserList(in));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/** 跟进管理列表
|
|
|
* 跟进列表
|
|
|
**/
|
|
|
@@ -145,14 +159,14 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listPrivateOrganizationCustomer(cli, sort, sortType, 1, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
- /**
|
|
|
+ /**
|
|
|
* 私有单位客户导出xls
|
|
|
- * @throws IOException
|
|
|
+ * @throws IOException
|
|
|
*/
|
|
|
@RequestMapping(value = "/privateUnitCustomerOutXls" , method = RequestMethod.GET)
|
|
|
public Result privateUnitCustomerOutXls(CustomerListIn cli ,Integer sort,Integer sortType,Integer pageNo, Integer pageSize,HttpServletResponse response) throws IOException{
|
|
|
Result res = new Result();
|
|
|
-
|
|
|
+
|
|
|
XSSFWorkbook wb = customerService.privateUnitCustomerOutXls(cli, sort, sortType, pageNo, pageSize);
|
|
|
String fileName = "我的客户列表 " + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + ".xls";
|
|
|
OutputStream out = null;
|
|
|
@@ -161,8 +175,8 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- response.addHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes(),"iso-8859-1"));
|
|
|
- response.setContentType("application/octet-stream;charset=utf-8");
|
|
|
+ response.addHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes(),"iso-8859-1"));
|
|
|
+ response.setContentType("application/octet-stream;charset=utf-8");
|
|
|
try {
|
|
|
// 返回数据流
|
|
|
wb.write(out);
|
|
|
@@ -172,11 +186,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
out.flush();
|
|
|
out.close();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return res;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 公共单位客户列表 **/
|
|
|
@RequestMapping(value = "/listPublicOrganizationCustomer" , method = RequestMethod.POST)
|
|
|
public Result listPublicOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -192,7 +206,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listAllOrganizationCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 管理单位客户查询 **/
|
|
|
@RequestMapping(value = "/listAllManageOrganizationCustomer" , method = RequestMethod.POST)
|
|
|
public Result listAllManageOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -200,7 +214,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listAllManageOrganizationCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 签单的单位客户 **/
|
|
|
@RequestMapping(value = "/listSignOrganizationCustomer", method = RequestMethod.POST)
|
|
|
public Result listSignOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
|
|
|
@@ -208,8 +222,8 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listSignOrganizationCustomer(cli, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/** 签单客户转交 **/
|
|
|
@RequestMapping(value = "/customerHandOver", method = RequestMethod.POST)
|
|
|
public Result listSignPersonalCustomer(String userIds ,String receiveId){
|
|
|
@@ -218,7 +232,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
/** 客户即时检索 **/
|
|
|
@RequestMapping(value = "/findCustomerByName",method = RequestMethod.GET)
|
|
|
public Result findCustomerByName(String name){
|
|
|
@@ -226,7 +240,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findCustomerByName(name));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 客户即时检索(可签单客户) **/
|
|
|
@RequestMapping(value = "/getCustomerByName",method = RequestMethod.GET)
|
|
|
public Result getCustomerByName(String name,Integer type){
|
|
|
@@ -241,7 +255,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
if(type == 2) res.setData(customerService.getChannelCustomerByName(name));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 客户查询 **/
|
|
|
@RequestMapping(value = "/getUserByName",method = RequestMethod.GET)
|
|
|
public Result getUserByName(String name){
|
|
|
@@ -254,7 +268,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(customerService.getUserByName(name));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 客户查询 **/
|
|
|
@RequestMapping(value = "/getUserByNames",method = RequestMethod.GET)
|
|
|
public Result getUserByName(String name,Integer pageNo,Integer pageSize){
|
|
|
@@ -267,12 +281,12 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(customerService.getUserByNames(name,pageNo,pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- /** 添加客户基本信息
|
|
|
- * @throws Exception
|
|
|
+
|
|
|
+ /** 添加客户基本信息
|
|
|
+ * @throws Exception
|
|
|
* @throws NumberFormatException **/
|
|
|
@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
|
|
|
- public Result addCustomer(InputAddCustomer in) throws Exception{
|
|
|
+ public Result addCustomer(InputAddCustomer in) {
|
|
|
Result res = new Result();
|
|
|
if(StringUtils.isBlank(in.getName()) || StringUtils.isBlank(in.getContacts())
|
|
|
|| StringUtils.isBlank(in.getContactMobile()) ||null==in.getProvince()||null==in.getCity()||null==in.getArea()
|
|
|
@@ -285,13 +299,31 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","私有客户已达最大限制"));
|
|
|
return res;
|
|
|
}
|
|
|
+ //新增为私有客户
|
|
|
+ in.setShareType(0);
|
|
|
+ //将新增客户的空格去除
|
|
|
+ res.data(customerService.addCustomer(in));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/addChannel", method = RequestMethod.POST)
|
|
|
+ public Result addChannel(@Validated InputAddCustomer in, BindingResult bindingResult) {
|
|
|
+ Result res = new Result();
|
|
|
+ if (bindingResult.hasErrors()) {
|
|
|
+ res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
|
|
|
+ InputChannelState.getDesc(bindingResult.getFieldError().getField())));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ in.setType(1);
|
|
|
+ //新增为私有客户
|
|
|
+ in.setShareType(4);
|
|
|
//将新增客户的空格去除
|
|
|
res.data(customerService.addCustomer(in));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/** 单位客户详情信息 **/
|
|
|
@RequestMapping(value = "/findOrganizationCustomerDetail", method = RequestMethod.GET)
|
|
|
public Result findOrganizationCustomerDetail(String uid){
|
|
|
@@ -299,7 +331,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findOrganizationCustomerDetail(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改单位客户信息 **/
|
|
|
@RequestMapping(value = "/updateOrganizationCustomer", method = RequestMethod.POST)
|
|
|
public Result updateOrganizationCustomer(CustomerOrganizationDetailBo bo){
|
|
|
@@ -307,11 +339,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
if(StringUtils.isBlank(bo.getId()) || StringUtils.isBlank(bo.getUid())){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR,""));
|
|
|
return res;
|
|
|
- }
|
|
|
+ }
|
|
|
customerService.updateOrganizationCustomer(bo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改个人客户信息 **/
|
|
|
@RequestMapping(value = "/updatePersonalCustomer", method = RequestMethod.POST)
|
|
|
public Result updatePersonalCustomer(CustomerPersonalDetailBo bo){
|
|
|
@@ -323,7 +355,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updatePersonalCustomer(bo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 查看跟进记录 **/
|
|
|
@RequestMapping(value = "/listFollowHistory", method = RequestMethod.GET)
|
|
|
public Result listFollowHistory(Integer pageNo, Integer pageSize,String uid,String businessProjectId,Integer type){
|
|
|
@@ -331,7 +363,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listFollowHistory(pageNo,pageSize,uid,businessProjectId,type));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 指导已读 **/
|
|
|
@RequestMapping(value = "/pushGuidance", method = RequestMethod.POST)
|
|
|
public Result pushGuidance(String uid){
|
|
|
@@ -343,7 +375,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.pushGuidance(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 新增指导意见 **/
|
|
|
@RequestMapping(value = "/addGuidance", method = RequestMethod.POST)
|
|
|
public Result addGuidance(String followId,String guidance){
|
|
|
@@ -355,7 +387,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.addGuidance( followId, guidance));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 查看客户账户信息 **/
|
|
|
@RequestMapping(value = "/findUserAccountDetail", method = RequestMethod.GET)
|
|
|
public Result findUserAcountDetail(String uid){
|
|
|
@@ -372,7 +404,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(bo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改客户账户信息 **/
|
|
|
@RequestMapping(value = "/updateUserAccount", method = RequestMethod.POST)
|
|
|
public Result updateUserAccount(User user){
|
|
|
@@ -388,7 +420,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findCustomerContacts(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 针对已作拜访的业务作跟进 **/
|
|
|
@RequestMapping(value = "/toAddFollowOnHistory", method = RequestMethod.GET)
|
|
|
public Result toAddFollowOnHistory(String uid){
|
|
|
@@ -407,7 +439,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(fbb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 针对已锁定的业务作跟进 **/
|
|
|
@RequestMapping(value = "/toAddFollowOnLock", method = RequestMethod.GET)
|
|
|
public Result toAddFollowOnLock(String uid){
|
|
|
@@ -426,9 +458,9 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(fbb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- /** 添加拜访记录
|
|
|
- * @throws ParseException
|
|
|
+
|
|
|
+ /** 添加拜访记录
|
|
|
+ * @throws ParseException
|
|
|
* @throws Exception **/
|
|
|
@RequestMapping(value = "/addFollow", method = RequestMethod.POST)
|
|
|
public Result addFollow(String userBusinessList,String uid,String ocbId,String contactType,String result,String followTime) throws BusinessException{
|
|
|
@@ -458,11 +490,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
fbb.setContactType(contactType);
|
|
|
fbb.setResult(result);
|
|
|
fbb.setFollowTime(followTime);
|
|
|
- fbb.setUserBusinessList(list);
|
|
|
+ fbb.setUserBusinessList(list);
|
|
|
customerService.addFollow(fbb,null,1);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 进入修改拜访记录 **/
|
|
|
@RequestMapping(value = "/toUpdateFollow", method = RequestMethod.GET)
|
|
|
public Result toUpdateFollow(String followId){
|
|
|
@@ -472,10 +504,10 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(fbb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- /** 修改拜访记录
|
|
|
- * @throws ParseException
|
|
|
- * @throws BusinessException
|
|
|
+
|
|
|
+ /** 修改拜访记录
|
|
|
+ * @throws ParseException
|
|
|
+ * @throws BusinessException
|
|
|
*/
|
|
|
@RequestMapping(value = "/updateFollow", method = RequestMethod.POST)
|
|
|
public Result updateFollow(String userBusinessList,String followId,String followTime,String uid,String contactType,String result) throws BusinessException{
|
|
|
@@ -504,12 +536,12 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
fbb.setUid(uid);
|
|
|
fbb.setContactType(contactType);
|
|
|
fbb.setResult(result);
|
|
|
- fbb.setUserBusinessList(list);
|
|
|
+ fbb.setUserBusinessList(list);
|
|
|
fbb.setFollowId(followId);
|
|
|
customerService.updateFollow(fbb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 删除跟进记录 **/
|
|
|
@RequestMapping(value = "/deleteFollow", method = RequestMethod.GET)
|
|
|
public Result deleteFollow(String followId){
|
|
|
@@ -521,15 +553,15 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.deleteFollow(followId);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- /** 查询客户的所有联系人 **/
|
|
|
+
|
|
|
+ /** 查询客户的所有联系人 **/
|
|
|
@RequestMapping(value = "/findAllContacts", method = RequestMethod.GET)
|
|
|
public Result findAllContacts(String uid){
|
|
|
Result res = new Result();
|
|
|
res.setData(customerService.findAllContacts(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改企业联系人 **/
|
|
|
@RequestMapping(value = "/updateCustomerContacts", method = RequestMethod.POST)
|
|
|
public Result updateCustomerContacts(String contactList,String uid){
|
|
|
@@ -555,7 +587,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateCustomerContacts(ocbList,uid);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 领取客户 **/
|
|
|
@RequestMapping(value = "/receiveCustomer", method = RequestMethod.GET)
|
|
|
public Result receiveCustomer(String uid,String oldAid){
|
|
|
@@ -568,7 +600,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","私有客户已达最大限制"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (customerService.checkBeforeChannel(uid)) {
|
|
|
res.getError().add(buildError("","渠道客户丢失后不可再领取"));
|
|
|
return res;
|
|
|
@@ -576,7 +608,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateByOperatorType(uid,null, oldAid,AFTConstants.USER_RECEIVE,null);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 上传excel文档
|
|
|
* @param req
|
|
|
@@ -613,7 +645,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.saveUploadData(boSet);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
- }
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
/**
|
|
|
@@ -645,7 +677,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 转为公共客户 **/
|
|
|
@RequestMapping(value = "/transferToPublic", method = RequestMethod.GET)
|
|
|
public Result transferToPublic(String uid,String aid){
|
|
|
@@ -656,7 +688,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateByOperatorType(uid, aid,null, AFTConstants.USER_TRANSFER_TO_PUBLIC,null);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 图片上传 **/
|
|
|
@RequestMapping(value = "/uploadCustomerImg", method = RequestMethod.POST)
|
|
|
public Result uploadCustomerImg(HttpServletRequest req,String sign){
|
|
|
@@ -664,9 +696,9 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(handleFile(res, "/customer_sys_file/", false, req, sign));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* @param startDate 开始日期
|
|
|
* @param endDate 结束日期
|
|
|
* @param timeSpan 时间差
|
|
|
@@ -696,14 +728,14 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
sDate = DateUtils.getLastDayOfLastQuarter(date);
|
|
|
}else if(timeSpan.equals(DateUtils.YEAR_SPAN)){
|
|
|
sDate = DateUtils.getLastDayOfLastYear(date);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
res.setData(customerService.customerStatistics(sDate,eDate,depNo,businessGlossoryId,pageNo,pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* @param startDate 开始日期
|
|
|
* @param endDate 结束日期
|
|
|
* @param timeSpan 时间差
|
|
|
@@ -712,7 +744,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
* @param pageNo 页码
|
|
|
* @param pageSize 页数
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/businessStatistic", method = RequestMethod.GET)
|
|
|
public Result businessStatistic(String startDate,String endDate,String timeSpan,String depNo,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
|
|
|
@@ -734,14 +766,14 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
sDate = DateUtils.getLastDayOfLastQuarter(date);
|
|
|
}else if(timeSpan.equals(DateUtils.YEAR_SPAN)){
|
|
|
sDate = DateUtils.getLastDayOfLastYear(date);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
res.setData(customerService.businessStatistic(sDate,eDate,depNo,businessGlossoryId,pageNo,pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* @param startDate 开始日期
|
|
|
* @param endDate 结束日期
|
|
|
* @param timeSpan 时间差
|
|
|
@@ -772,12 +804,12 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
sDate = DateUtils.getLastDayOfLastQuarter(date);
|
|
|
}else if(timeSpan.equals(DateUtils.YEAR_SPAN)){
|
|
|
sDate = DateUtils.getLastDayOfLastYear(date);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
res.setData(customerService.followStatistic(sDate, eDate, depNo, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 管理员列表 **/
|
|
|
@RequestMapping(value = "/listAdminByName",method = RequestMethod.GET)
|
|
|
public Result listAdminByName(String adminName){
|
|
|
@@ -806,7 +838,8 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
if (operatorType==null) {
|
|
|
operatorType=AFTConstants.USER_TRANSFER_TO_OTHER;
|
|
|
}
|
|
|
- if (operatorType !=AFTConstants.SIGN_USER_TRANSFER_TO_OTHER&& customerService.checkMax(aid)) {
|
|
|
+ if ((operatorType ==AFTConstants.USER_TRANSFER_TO_OTHER||operatorType ==AFTConstants.USER_RECEIVE)
|
|
|
+ && customerService.checkMax(aid)) {
|
|
|
res.getError().add(buildError("","对方私有客户已达最大限制"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -818,9 +851,9 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateByOperatorType(uid,aid,oldAid,operatorType,data);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- * 客户转交记录
|
|
|
+ * 客户转交记录
|
|
|
* @param uid 客户编号
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -834,7 +867,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(customerService.transferList( uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 查询我的业务列表 **/
|
|
|
@RequestMapping(value = "/listBusiness", method = RequestMethod.POST)
|
|
|
public Result listBusiness(BusinessListBo blo,Integer pageNo, Integer pageSize){
|
|
|
@@ -842,7 +875,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listBusiness(blo, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 查询所有的业务列表 **/
|
|
|
@RequestMapping(value = "/listAllBusiness", method = RequestMethod.POST)
|
|
|
public Result listAllBusiness(BusinessListBo blo,Integer pageNo, Integer pageSize){
|
|
|
@@ -850,7 +883,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listAllBusiness(blo, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 业务管理列表 **/
|
|
|
@RequestMapping(value = "/listManageBusiness", method = RequestMethod.POST)
|
|
|
public Result listManageBusiness(BusinessListBo blo,Integer pageNo, Integer pageSize){
|
|
|
@@ -858,7 +891,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listManageBusiness(blo, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 查询业务字典 **/
|
|
|
@RequestMapping(value = "/findBusinessGlossory",method = RequestMethod.GET)
|
|
|
public Result findBusinessGlossory(){
|
|
|
@@ -874,7 +907,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
if(StringUtils.isBlank(bfb.getBusinessProjectId()) || StringUtils.isBlank(bfb.getUid())){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,""));
|
|
|
return res;
|
|
|
- }
|
|
|
+ }
|
|
|
if(customerService.judgeBusiness(bfb.getUid(), bfb.getBusinessProjectId())>0){
|
|
|
res.getError().add(new Error("该项业务已经被跟进"));
|
|
|
return res;
|
|
|
@@ -886,7 +919,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 进入新增意向服务 **/
|
|
|
@RequestMapping(value = "/toAddBusinessAndFollow", method = RequestMethod.GET)
|
|
|
public Result toAddBusinessAndFollow(){
|
|
|
@@ -899,7 +932,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(bo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 进入修改业务意向 **/
|
|
|
@RequestMapping(value = "/toUpdateBusiness", method = RequestMethod.GET)
|
|
|
public Result toUpdateBusiness(String businessId){
|
|
|
@@ -907,7 +940,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findBusinessDetail(businessId));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改业务意向 **/
|
|
|
@RequestMapping(value = "/updateBusiness", method = RequestMethod.POST)
|
|
|
public Result updateBusiness(BussinessFollowBo bfb){
|
|
|
@@ -915,7 +948,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateBusiness(bfb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 进入跟进单个客户意向 **/
|
|
|
@RequestMapping(value = "/toAddFollowOneBusiness", method = RequestMethod.GET)
|
|
|
public Result toAddFollowOneBusiness(String businessId){
|
|
|
@@ -926,7 +959,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(bo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 跟进单个客户意向 **/
|
|
|
@RequestMapping(value = "/addFollowOneBusiness", method = RequestMethod.POST)
|
|
|
public Result addFollowOneBusiness(BussinessFollowBo bfb){
|
|
|
@@ -943,7 +976,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 进入修改某个客户一个业务的当次拜访 **/
|
|
|
@RequestMapping(value = "/toUpdateFollowOneBusiness", method = RequestMethod.GET)
|
|
|
public Result toUpdateFollowOneBusiness(String ufbId){
|
|
|
@@ -955,7 +988,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findFollowOneBusiness(ufbId));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改某个客户一个业务的当次拜访 **/
|
|
|
@RequestMapping(value = "/updateFollowOneBusiness", method = RequestMethod.POST)
|
|
|
public Result updateFollowOneBusiness(BussinessFollowBo bfb){
|
|
|
@@ -967,7 +1000,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateFollowOneBusiness(bfb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 删除某个客户一个业务的当次拜访 **/
|
|
|
@RequestMapping(value = "/deleteFollowOneBusiness", method = RequestMethod.GET)
|
|
|
public Result deleteFollowOneBusiness(String ufbId){
|
|
|
@@ -979,7 +1012,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.deleteFollowOneBusiness(ufbId);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 添加单个联系人 **/
|
|
|
@RequestMapping(value = "/addOneContact", method = RequestMethod.POST)
|
|
|
public Result addOneContact(OrganizationContactBook ocb){
|
|
|
@@ -995,7 +1028,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.addOneContact(ocb);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 删除单个联系人 **/
|
|
|
@RequestMapping(value = "/deleteOneContact", method = RequestMethod.GET)
|
|
|
public Result deleteOneContact(String ocbId){
|
|
|
@@ -1007,7 +1040,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.deleteOneContact(ocbId);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改主要联系人 **/
|
|
|
@RequestMapping(value = "/updateMainContact", method = RequestMethod.GET)
|
|
|
public Result updateMainContact(String ocbId,String uid){
|
|
|
@@ -1019,7 +1052,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateMainContact(ocbId,uid);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 删除 业务 **/
|
|
|
@RequestMapping(value = "/deleteBusiness", method =RequestMethod.GET)
|
|
|
public Result deleteBusiness(String businessId){
|
|
|
@@ -1031,7 +1064,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.deleteBusiness(businessId);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 停止业务 **/
|
|
|
@RequestMapping(value = "/stopBusiness", method = RequestMethod.GET)
|
|
|
public Result stopBusiness(String businessId){
|
|
|
@@ -1043,7 +1076,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updateBusinessToStop(businessId);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 客户分配查询(本部门) **/
|
|
|
@RequestMapping(value = "/findAdminName" , method = RequestMethod.POST)
|
|
|
public Result findAdminName(){
|
|
|
@@ -1051,7 +1084,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findAdminName());
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 分配个人客户 **/
|
|
|
@RequestMapping(value = "/updatePersonalCustomerz", method = RequestMethod.POST)
|
|
|
public Result updatePersonalCustomerz(CustomerPersonalDetailBo bo){
|
|
|
@@ -1063,7 +1096,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
customerService.updatePersonalCustomerz(bo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 客户录入审核 **/
|
|
|
@RequestMapping(value = "/findEnteringAudit" , method = RequestMethod.POST)
|
|
|
public Result findEnteringAudit(CustomerListOut clo,Integer pageNo, Integer pageSize){
|
|
|
@@ -1071,7 +1104,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findEnteringAudit(clo, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改客户录入审核状态 **/
|
|
|
@RequestMapping(value = "/updateEnteringAudit", method = RequestMethod.POST)
|
|
|
public Result updateEnteringAudit(User bo){
|
|
|
@@ -1083,7 +1116,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(customerService.updateEnteringAudit(bo));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 审核拒绝客户查询 **/
|
|
|
@RequestMapping(value = "/findEnteringAuditIsNo" , method = RequestMethod.POST)
|
|
|
public Result findEnteringAuditIsNo(CustomerListOut clo,Integer pageNo, Integer pageSize){
|
|
|
@@ -1091,7 +1124,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.findEnteringAuditIsNo(clo, pageNo, pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改拒绝客户信息 **/
|
|
|
@RequestMapping(value = "/updateRefusedCustomer", method = RequestMethod.POST)
|
|
|
public Result updateRefusedCustomer(String id,String nickname,String mobile,String societyTag){
|
|
|
@@ -1123,8 +1156,8 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.selectLockedProject(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/** 客户二次签项目业务 **/
|
|
|
@RequestMapping(value = "/againProjectTask", method = RequestMethod.GET)
|
|
|
public Result againProjectTask(String uid,String projectId,String aid){
|
|
|
@@ -1143,7 +1176,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
if(StringUtils.isBlank(id) || StringUtils.isBlank(aid)){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR,""));
|
|
|
return res;
|
|
|
- }
|
|
|
+ }
|
|
|
res.data(customerService.updateInformationMaintainerr(id,aid));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -1176,7 +1209,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(customerService.updateUserLevel(u));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 释放客户 **/
|
|
|
@RequestMapping(value = "/pushReleaseUser", method = RequestMethod.GET)
|
|
|
public Result pushReleaseUser(String id){
|
|
|
@@ -1188,10 +1221,10 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(customerService.pushReleaseUser(id));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 企业项目申报材料上传
|
|
|
- *
|
|
|
+ *
|
|
|
* @param req
|
|
|
* @param uid
|
|
|
* @return
|
|
|
@@ -1209,7 +1242,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
}
|
|
|
/**
|
|
|
* 企业项目申报材料预览授权
|
|
|
- *
|
|
|
+ *
|
|
|
* @param id
|
|
|
* @param sign
|
|
|
* @return
|
|
|
@@ -1246,7 +1279,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(adminService.selectAdminCustomerStatistics( depId, startTime, endTime, pageSize, pageNo));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 查看客户统计
|
|
|
* @param depId 部门编号
|
|
|
@@ -1275,9 +1308,9 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.data(adminService.selectAdminCustomerList( aid, startTime, endTime, type, pageSize, pageNo));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* @param inputId 业务转移客户id(接收者)
|
|
|
* @param uid 被转移的客户
|
|
|
* @param pid 呗转移的业务
|
|
|
@@ -1307,7 +1340,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listChannelCustomer(in));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 渠道客户统计列表
|
|
|
**/
|
|
|
@@ -1317,9 +1350,9 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.setData(customerService.listChannelCounts(in));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- * 渠道客户转交
|
|
|
+ * 渠道客户转交
|
|
|
* @param userIds 用户编号集
|
|
|
* @param receiveId 接受者
|
|
|
* @param remarks 备注
|
|
|
@@ -1343,11 +1376,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","不允许二次回退"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
res.setData(customerService.pushChannelDeliver( uids , receiveId,remarks,type));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/** 修改客户名称 **/
|
|
|
@RequestMapping(value = "/updateUserName", method = RequestMethod.POST)
|
|
|
public Result updateUserName(String uid,String userName){
|
|
|
@@ -1359,7 +1392,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
if(customerService.checkUserName(userName)){
|
|
|
res.getError().add(buildError(ErrorConstants.CUSTOMER_ALREADY_EXIST,null,"["+userName+"]"));
|
|
|
return res;
|
|
|
- }
|
|
|
+ }
|
|
|
res.data(customerService.updateUserName(uid,userName));
|
|
|
return res;
|
|
|
}
|