Commit fa4ded37 by 翁国栋

crm新需求--

客户新增手机微信二选一
客户新增跟进状态(潜在,意向)
客户跟进列表中如果是签约或者合作中的,增加签约时间和合同时间
加一条本月待跟进列表
parent 7e7f11c9
/** /**
* <p>Title: CrmClientData.java</p> * <p>Title: CrmClientData.java</p>
* <p>Description: </p> * <p>Description: </p>
* @author dsc * @author dsc
* @date 2020年6月5日 * @date 2020年6月5日
* @version 1.0 * @version 1.0
*/ */
package cn.timer.api.bean.crm; package cn.timer.api.bean.crm;
...@@ -36,7 +36,7 @@ import lombok.NoArgsConstructor; ...@@ -36,7 +36,7 @@ import lombok.NoArgsConstructor;
* <p> * <p>
* Description: * Description:
* </p> * </p>
* *
* @author dsc * @author dsc
* @date 2020年6月5日 * @date 2020年6月5日
* @version 1.0 * @version 1.0
...@@ -155,16 +155,16 @@ public class CrmClientData extends Model<CrmClientData> { ...@@ -155,16 +155,16 @@ public class CrmClientData extends Model<CrmClientData> {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value = "微信") @ApiModelProperty(value = "微信")
private String wechat; private String wechat;
@ApiModelProperty(value = "产品") @ApiModelProperty(value = "产品")
private String product; private String product;
@ApiModelProperty(value = "跟进记录") @ApiModelProperty(value = "跟进记录")
private String followuprecord; private String followuprecord;
@ApiModelProperty(value = "隐藏客户(0:已隐藏;1:未隐藏)") @ApiModelProperty(value = "隐藏客户(0:已隐藏;1:未隐藏)")
private Integer hidingcustomers; private Integer hidingcustomers;
...@@ -172,7 +172,7 @@ public class CrmClientData extends Model<CrmClientData> { ...@@ -172,7 +172,7 @@ public class CrmClientData extends Model<CrmClientData> {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "协作(0:否 1:是)") @ApiModelProperty(value = "协作(0:否 1:是)")
private Integer iscooperation; private Integer iscooperation;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "协作人id") @ApiModelProperty(value = "协作人id")
...@@ -182,4 +182,16 @@ public class CrmClientData extends Model<CrmClientData> { ...@@ -182,4 +182,16 @@ public class CrmClientData extends Model<CrmClientData> {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "客户联系人数据列表") @ApiModelProperty(value = "客户联系人数据列表")
private List<CrmClientContacts> CrmClientContacts; private List<CrmClientContacts> CrmClientContacts;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "签约时间")
private Date contractSigningDate;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "合同有效期")
private String contractEndDate ;
} }
...@@ -89,4 +89,12 @@ public class CrmClientFollow extends Model<CrmClientFollow> { ...@@ -89,4 +89,12 @@ public class CrmClientFollow extends Model<CrmClientFollow> {
@ApiModelProperty(value = "下次提醒时间") @ApiModelProperty(value = "下次提醒时间")
private String remindTime; private String remindTime;
@ApiModelProperty(value = "签约时间")
private Date contractSigningDate;
@ApiModelProperty(value = "合同截止日期")
private String contractEndDate;
} }
...@@ -15,6 +15,7 @@ import java.util.stream.Collectors; ...@@ -15,6 +15,7 @@ import java.util.stream.Collectors;
import cn.timer.api.bean.crm.*; import cn.timer.api.bean.crm.*;
import cn.timer.api.bean.insure.InsurePolicy; import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.insure.InsureProductPlan; import cn.timer.api.bean.insure.InsureProductPlan;
import cn.timer.api.controller.insure.CallBackContorll;
import cn.timer.api.controller.zpgl.sevice.ZpglService; import cn.timer.api.controller.zpgl.sevice.ZpglService;
import cn.timer.api.dao.crm.*; import cn.timer.api.dao.crm.*;
import cn.timer.api.dto.clazz.CityClazzDto; import cn.timer.api.dto.clazz.CityClazzDto;
...@@ -24,6 +25,8 @@ import cn.timer.api.dto.yggl.YgCityDto; ...@@ -24,6 +25,8 @@ import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.utils.ExcelUtils; import cn.timer.api.utils.ExcelUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -105,6 +108,8 @@ public class CrmController { ...@@ -105,6 +108,8 @@ public class CrmController {
@Autowired @Autowired
private CrmClientLogMapper crmClientLogMapper; private CrmClientLogMapper crmClientLogMapper;
private static final Logger log = LoggerFactory.getLogger(CrmController.class);
private Integer getEmpNum(UserBean userBean) { private Integer getEmpNum(UserBean userBean) {
return userBean.getEmpNum(); return userBean.getEmpNum();
} }
...@@ -389,6 +394,9 @@ public class CrmController { ...@@ -389,6 +394,9 @@ public class CrmController {
@Transactional @Transactional
@ApiOperation(value = "新增客户", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "新增客户", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> addClient(@CurrentUser UserBean userBean, @RequestBody CrmClientData crmClientData) { public Result<Object> addClient(@CurrentUser UserBean userBean, @RequestBody CrmClientData crmClientData) {
log.info("crmClientDatahe状态",crmClientData.getClientStatus());
log.info("crmClientDatahe签约时间",crmClientData.getContractSigningDate());
log.info("crmClientData合同有效期",crmClientData.getContractEndDate());
Integer empNum = getEmpNum(userBean); Integer empNum = getEmpNum(userBean);
Integer orgCode = getOrgCode(userBean); Integer orgCode = getOrgCode(userBean);
crmClientData.setClientStatus(1); crmClientData.setClientStatus(1);
...@@ -465,6 +473,9 @@ public class CrmController { ...@@ -465,6 +473,9 @@ public class CrmController {
@Transactional @Transactional
@ApiOperation(value = "编辑客户", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "编辑客户", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> editClient(@CurrentUser UserBean userBean, @RequestBody CrmClientData crmClientData) { public Result<Object> editClient(@CurrentUser UserBean userBean, @RequestBody CrmClientData crmClientData) {
log.info("crmClientDatahe状态",crmClientData.getClientStatus());
log.info("crmClientDatahe签约时间",crmClientData.getContractSigningDate());
log.info("crmClientData合同有效期",crmClientData.getContractEndDate());
Integer cid = crmClientData.getId(); Integer cid = crmClientData.getId();
if (cid == null) if (cid == null)
return ResultUtil.error("请传入id再试"); return ResultUtil.error("请传入id再试");
...@@ -1001,7 +1012,9 @@ public class CrmController { ...@@ -1001,7 +1012,9 @@ public class CrmController {
@Transactional @Transactional
@ApiOperation(value = "新增跟进记录", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "新增跟进记录", httpMethod = "POST", notes = "接口发布说明")
public Result<Void> addClientFollow(@CurrentUser UserBean userBean, @RequestBody CrmClientFollow crmClientFollow) { public Result<Void> addClientFollow(@CurrentUser UserBean userBean, @RequestBody CrmClientFollow crmClientFollow) {
log.info("crmClientDatahe状态",crmClientFollow.getClientStatus());
log.info("crmClientDatahe签约时间",crmClientFollow.getContractSigningDate());
log.info("crmClientData合同有效期",crmClientFollow.getContractEndDate());
Integer cid = crmClientFollow.getCid(); Integer cid = crmClientFollow.getCid();
if (cid == null) if (cid == null)
return ResultUtil.error("请传入id再试"); return ResultUtil.error("请传入id再试");
...@@ -1954,7 +1967,7 @@ public class CrmController { ...@@ -1954,7 +1967,7 @@ public class CrmController {
} }
@PostMapping(value = "/setColor") @PostMapping(value = "/setColor")
@ApiOperation(value = "设置颜色", httpMethod = "GET", notes = "导出统计") @ApiOperation(value = "设置颜色", httpMethod = "GET", notes = "设置颜色")
public Result<Object> exportCartogram(@CurrentUser UserBean userBean, public Result<Object> exportCartogram(@CurrentUser UserBean userBean,
@RequestBody List<CrmListColor> crmListColorList) { @RequestBody List<CrmListColor> crmListColorList) {
if (crmListColorList != null && crmListColorList.size() > 0) { if (crmListColorList != null && crmListColorList.size() > 0) {
...@@ -1979,9 +1992,45 @@ public class CrmController { ...@@ -1979,9 +1992,45 @@ public class CrmController {
} }
@GetMapping(value = "/getColor") @GetMapping(value = "/getColor")
@ApiOperation(value = "获取颜色列表", httpMethod = "GET", notes = "导出统计") @ApiOperation(value = "获取颜色列表", httpMethod = "GET", notes = "获取颜色列表")
public Result<Object> getColorList(@CurrentUser UserBean userBean) { public Result<Object> getColorList(@CurrentUser UserBean userBean) {
List<CrmListColor> crmListColorList = CrmListColor.builder().build().selectList(new QueryWrapper<CrmListColor>().lambda().eq(CrmListColor::getDeleteFlag, 0)); List<CrmListColor> crmListColorList = CrmListColor.builder().build().selectList(new QueryWrapper<CrmListColor>().lambda().eq(CrmListColor::getDeleteFlag, 0));
return ResultUtil.data(crmListColorList, "成功"); return ResultUtil.data(crmListColorList, "成功");
} }
@PostMapping(value="/getFollowUpMonth")
@ApiOperation(value = "获取当月待跟进客户列表", httpMethod = "GET", notes = "获取当月待跟进客户列表")
public Result<Object> getFollowUpMonthList(@CurrentUser UserBean userBean,
@RequestParam(required = false) Integer type, @RequestParam(required = false) Integer groupId,
@RequestParam(required = false) Integer status, @RequestParam(required = false) String like,
@RequestParam(required = false) String customerowner,
@RequestParam(required = false) String startCreateTime,
@RequestParam(required = false) String endCreateTime,
@RequestParam(required = false) String startFollowTime,
@RequestParam(required = false) String endFollowTime,
@RequestParam(required = false) String ifPhone,
@RequestParam(required = false, defaultValue = "1") int pageNumber,
@RequestParam(required = false, defaultValue = "10") int pageSize,
@RequestParam(required = false) Integer unfollowedDays,
@RequestParam(required = false) Integer followNumber,
@RequestParam(required = false) Integer industry) {
log.info("crmClientDatahe状态",type);
log.info("crmClientDatahe签约时间",groupId);
log.info("crmClientData合同有效期",status);
log.info("crmClientData合同有效期",like);
log.info("crmClientData合同有效期",customerowner);
log.info("crmClientData合同有效期",startCreateTime);
log.info("crmClientData合同有效期",endCreateTime);
log.info("crmClientData合同有效期",startFollowTime);
log.info("crmClientData合同有效期",startFollowTime);
log.info("crmClientData合同有效期",endFollowTime);
log.info("crmClientData合同有效期",ifPhone);
log.info("crmClientData合同有效期",pageNumber);
log.info("crmClientData合同有效期",pageSize);
log.info("crmClientData合同有效期",unfollowedDays);
log.info("crmClientData合同有效期",followNumber);
log.info("crmClientData合同有效期",industry);
List<CrmListColor> crmListColorList = CrmListColor.builder().build().selectList(new QueryWrapper<CrmListColor>().lambda().eq(CrmListColor::getDeleteFlag, 0));
return ResultUtil.data(crmListColorList, "成功");
}
} }
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