Commit f2d8257e authored by liuzeheng's avatar liuzeheng

跟进

parent 8675831b
......@@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO;
import cn.iocoder.yudao.module.customer.dto.follow.CustomerFollowPageDTO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowExportReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -91,4 +92,37 @@ public interface CustomerFollowMapper extends BaseMapperX<CustomerFollowDO> {
"</script>"
})
IPage<CustomerFollowDO> customerFollowPage(@Param("mpPage") IPage<CustomerFollowDO> mpPage, @Param("query") CustomerFollowPageReqVO query, @Param("types") List<String> types);
@ResultType(CustomerFollowDO.class)
@Select({
"<script>",
"select ",
"f.*, ",
"u.nickname as follow_user_name ",
"from ecw_customer_follow f ",
"left join system_user u on u.id = f.follow_user_Id ",
"where f.deleted = 0",
"<when test = 'types != null'>",
"AND f.`follow_type` in ",
"<foreach item='type' index='index' collection='types' open='(' separator=',' close=')'>#{type}</foreach> ",
"</when>",
"<when test = 'query.bizId != null'>",
"AND f.`biz_id` = #{query.bizId}",
"</when>",
"<when test = 'query.bizNo != null and query.bizNo != \"\" '>",
"AND f.`biz_no` like concat('%',concat(#{query.bizNo},'%'))",
"</when>",
"<when test = 'query.beginCreateTime != null and query.endCreateTime != null '>",
"AND f.`follow_time` between #{query.beginCreateTime} and #{query.endCreateTime}",
"</when>",
"<when test = 'query.customerId != null'>",
"AND f.`customer_id` = #{query.customerId}",
"</when>",
"<when test = 'query.bizId != null'>",
"AND f.`biz_id` = #{query.bizId}",
"</when>",
"</script>"
})
IPage<CustomerFollowDO> getFollowPage(@Param("mpPage") IPage<CustomerFollowDO> mpPage, @Param("query") CustomerFollowPageDTO query, @Param("types") List<String> types);
}
package cn.iocoder.yudao.module.customer.dto.follow;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
public class CustomerFollowPageDTO extends PageParam {
@ApiModelProperty(value = "客户ID")
private Long customerId;
@ApiModelProperty(value = "跟进业务数据ID,回访类型的就是客户id,投诉跟进类型的就是投诉id, 商务洽谈就是报价单ID")
private Long bizId;
@ApiModelProperty(value = "业务编号")
private String bizNo;
@ApiModelProperty(value = "跟进类型 参见字典customer_follow_type 查询参数可以多个使用','分割")
private String followType;
//@ApiModelProperty(value = "联系人")
//private String contactName;
@ApiModelProperty(value = "跟进业务员")
private Long followUserId;
//@ApiModelProperty(value = "管理员id")
//private Long adminId;
//
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始跟进时间")
private Date beginFollowTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束跟进时间")
private Date endFollowTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")
private Date beginCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;
}
......@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.customer.service.customer.complaint.follow;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO;
import cn.iocoder.yudao.module.customer.dto.follow.CustomerFollowPageDTO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowCreateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowExportReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO;
......@@ -66,6 +67,7 @@ public interface CustomerFollowService extends IService<CustomerFollowDO> {
PageResult<CustomerFollowDO> getCustomerFollowPage(CustomerFollowPageReqVO pageReqVO);
PageResult<CustomerFollowDO> customerFollowPage(CustomerFollowPageReqVO pageReqVO);
PageResult<CustomerFollowDO> getFollowPage(CustomerFollowPageDTO pageVO);
/**
* 获得客户投诉跟进列表, 用于 Excel 导出
*
......@@ -75,4 +77,6 @@ public interface CustomerFollowService extends IService<CustomerFollowDO> {
List<CustomerFollowDO> getCustomerFollowList(CustomerFollowExportReqVO exportReqVO);
List<CustomerFollowDO> offerFollowList(Long offerId);
}
......@@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.customer.convert.customer.complaint.follow.CustomerFollowConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO;
import cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerFollowMapper;
import cn.iocoder.yudao.module.customer.dto.follow.CustomerFollowPageDTO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowCreateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowExportReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO;
......@@ -97,6 +98,17 @@ public class CustomerFollowServiceImpl extends AbstractService<CustomerFollowMap
return PageResult.of(mpPage);
}
@Override
public PageResult<CustomerFollowDO> getFollowPage(CustomerFollowPageDTO pageReqVO) {
PageVO page = new PageVO();
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
page.setField("f.id");
IPage<CustomerFollowDO> mpPage = MyBatisUtils.buildPage(page);
customerFollowMapper.getFollowPage(mpPage, pageReqVO, StringUtils.isNotBlank(pageReqVO.getFollowType()) ? Arrays.asList(pageReqVO.getFollowType().split(StrUtil.COMMA)) : null);
return PageResult.of(mpPage);
}
@Override
public List<CustomerFollowDO> getCustomerFollowList(CustomerFollowExportReqVO exportReqVO) {
return customerFollowMapper.selectList(exportReqVO);
......
......@@ -55,4 +55,24 @@ public class CustomerFollowBaseVO {
@ApiModelProperty(value = "跟进业务员(客户经理)名称")
private String followUserName;
@ApiModelProperty(value = "跟进编号")
private String followNo ;
@ApiModelProperty(value = "跟进结果")
private String followResult ;
@ApiModelProperty(value = "下次跟进时间")
private Date nextFollowTime ;
@ApiModelProperty(value = "跟进结果")
private String nextPlan ;
@ApiModelProperty(value = "跟进附件")
private String followFile ;
@ApiModelProperty(value = "最后更新时间")
private Date updateTime ;
@ApiModelProperty(value = "最后更新人")
private String updater ;
}
......@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.customer.convert.customer.complaint.follow.CustomerFollowConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO;
import cn.iocoder.yudao.module.customer.dto.follow.CustomerFollowPageDTO;
import cn.iocoder.yudao.module.customer.service.customer.complaint.follow.CustomerFollowService;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowCreateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO;
......@@ -80,6 +81,13 @@ public class CustomerFollowController {
return success(CustomerFollowConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/followPage")
@ApiOperation("跟进列表数据-分页")
public CommonResult<PageResult<CustomerFollowRespVO>> getFollowPage(@Valid CustomerFollowPageDTO pageVO) {
PageResult<CustomerFollowDO> pageResult = customerFollowService.getFollowPage(pageVO);
return success(CustomerFollowConvert.INSTANCE.convertPage(pageResult));
}
//@GetMapping("/export-excel")
//@ApiOperation("导出客户跟进 Excel")
//// @PreAuthorize("@ss.hasPermission('ecw:customer-follow:export')")
......
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