Commit 45923591 authored by yanghao's avatar yanghao

task: #615 客户跟进记录,少了查询条件,添加跟进列表菜单

parent e0a4527c
...@@ -21,15 +21,25 @@ public class CustomerFollowupQueryVO extends PageParam { ...@@ -21,15 +21,25 @@ public class CustomerFollowupQueryVO extends PageParam {
@ApiModelProperty(value = "状态 字典customer_followup_status") @ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status; private Integer status;
@ApiModelProperty(value = "客户编号") @ApiModelProperty(value = "客户id")
private Long customerId; private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "客户编号") @ApiModelProperty(value = "客户编号")
private Long customerDetailId; private Long customerDetailId;
@ApiModelProperty(value = "报价单") @ApiModelProperty(value = "报价单id")
private Long offerId; private Long offerId;
@ApiModelProperty(value = "报价单id列表")
private List<Long> offerIds;
@ApiModelProperty(value = "报价单编号")
private String offerNumber;
@ApiModelProperty(value = "跟进类型 字典customer_followup_type") @ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followType; private Integer followType;
...@@ -85,6 +95,15 @@ public class CustomerFollowupQueryVO extends PageParam { ...@@ -85,6 +95,15 @@ public class CustomerFollowupQueryVO extends PageParam {
@ApiModelProperty(value = "结束创建时间") @ApiModelProperty(value = "结束创建时间")
private Date endCreateTime; private Date endCreateTime;
// 更新时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始更新时间")
private Date beginUpdateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束更新时间")
private Date endUpdateTime;
@ApiModelProperty(value = "跟进类型,下拉多选") @ApiModelProperty(value = "跟进类型,下拉多选")
private List<Integer> followTypes; private List<Integer> followTypes;
...@@ -96,4 +115,13 @@ public class CustomerFollowupQueryVO extends PageParam { ...@@ -96,4 +115,13 @@ public class CustomerFollowupQueryVO extends PageParam {
@ApiModelProperty(value = "跟进状态,下拉多选") @ApiModelProperty(value = "跟进状态,下拉多选")
private List<Integer> statuses; private List<Integer> statuses;
@ApiModelProperty(value = "客户经理/跟进业务员ids")
private List<Long> followUserIds;
@ApiModelProperty(value = "联系人电话")
private String contactPhone;
} }
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<if test="query.customerId != null"> <if test="query.customerId != null">
AND a.customer_id = #{query.customerId} AND a.customer_id = #{query.customerId}
</if> </if>
<if test="query.offerId != null"> <if test="query.offerIds != null and query.offerIds.size() > 0">
AND a.offer_id = #{query.offerId} AND FIND_IN_SET(a.offer_id, #{query.offerIds})
</if> </if>
<if test="query.followType != null"> <if test="query.followType != null">
...@@ -38,35 +38,53 @@ ...@@ -38,35 +38,53 @@
AND a.result_type = #{query.resultType} AND a.result_type = #{query.resultType}
</if> </if>
<if test="query.followTypes != null and query.followTypes.size() > 0">
<if test="query.followTypes != null and query.followTypes.size()>0"> AND FIND_IN_SET(a.follow_type, #{query.followTypes})
AND
<foreach item='item' index="index" collection='query.followTypes' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, a.follow_type)
</foreach>
</if> </if>
<if test="query.followMethods != null and query.followMethods.size()>0"> <if test="query.followMethods != null and query.followMethods.size()>0">
AND AND FIND_IN_SET(a.follow_method, #{query.followMethods})
<foreach item='item' index="index" collection='query.followMethods' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, a.follow_method)
</foreach>
</if> </if>
<if test="query.resultTypes != null and query.resultTypes.size()>0"> <if test="query.resultTypes != null and query.resultTypes.size()>0">
AND AND FIND_IN_SET(a.result_type, #{query.resultTypes})
<foreach item='item' index="index" collection='query.resultTypes' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, a.result_type)
</foreach>
</if> </if>
<if test="query.statuses != null and query.statuses.size()>0"> <if test="query.statuses != null and query.statuses.size()>0">
AND AND FIND_IN_SET(a.status, #{query.statuses})
<foreach item='item' index="index" collection='query.statuses' open='(' separator='or' close=')'> </if>
FIND_IN_SET(#{item}, a.status)
</foreach> <if test="query.followUserIds!= null and query.followUserIds.size() > 0">
AND FIND_IN_SET(a.follow_user_id, #{query.followUserIds})
</if>
<if test="query.beginFollowTime != null and query.endFollowTime != null">
AND ( a.follow_time BETWEEN #{query.beginFollowTime} AND #{query.endFollowTime} )
</if>
<if test="query.beginNextTime!= null and query.endNextTime!= null">
AND ( a.next_time BETWEEN #{query.beginNextTime} AND #{query.endNextTime} )
</if>
<if test="query.beginCreateTime!= null and query.endCreateTime!= null">
AND ( a.create_time BETWEEN #{query.beginCreateTime} AND #{query.endCreateTime} )
</if>
<if test="query.beginUpdateTime!= null and query.endUpdateTime!= null">
AND ( a.update_time BETWEEN #{query.beginUpdateTime} AND #{query.endUpdateTime} )
</if>
<if test="query.contactPhone != null and query.contactPhone != '' ">
AND concat('+', g.area_code, g.phone_new, '') LIKE concat('%', concat( #{query.contactPhone}, '%' ))
</if>
<if test="query.customerNumber != null and query.customerNumber != '' ">
AND b.number LIKE concat('%', concat( #{query.customerNumber}, '%' ))
</if> </if>
<if test="query.offerNumber != null and query.offerNumber != '' ">
AND c.number LIKE concat('%', concat( #{query.offerNumber}, '%' ))
</if>
</sql> </sql>
<select id="selectPage1" resultType="cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO"> <select id="selectPage1" resultType="cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO">
......
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