Commit 79908b44 authored by zhengyi's avatar zhengyi

Merge remote-tracking branch 'origin/release-fix' into release-fix

parents 2aa080f5 c433d8d1
......@@ -193,4 +193,26 @@ public class CustomerRespVO extends CustomerBaseVO {
private Date updateTime;
@ApiModelProperty(value = "推介人")
private Long promoter;
/**
* 客户来源
* <p>
* 枚举 {@link TODO customer_source 对应的类}
*/
@ApiModelProperty(value = "客户来源 字典customer_source")
private Integer source;
/**
* 客户角色
* <p>
* 枚举 {@link TODO customer_role 字典}
*/
@ApiModelProperty(value = "客户角色(逗号分隔的) customer_role 字典")
private String roles;
}
......@@ -17,7 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ApiModel("管理后台 - 客户跟进 Response VO")
public class CustomerFollowupBackVO {
@ExcelProperty("主键")
@ApiModelProperty(value = "主键", required = true)
private Long id;
......@@ -25,60 +24,61 @@ public class CustomerFollowupBackVO {
@ApiModelProperty(value = "编号")
private String number;
@ExcelProperty("上一级跟进单号")
@ApiModelProperty(value = "上一级跟进单号")
private String parentNumber;
@ExcelProperty(value = "状态", converter = DictConvert.class)
@DictFormat("customer_followup_status")
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
@ApiModelProperty(value = "客户编号")
private Long customerId;
@ApiModelProperty(value = "报价单")
private Long offerId;
@ExcelProperty(value = "跟进类型", converter = DictConvert.class)
@DictFormat("customer_followup_type")
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followType;
@ApiModelProperty(value = "报价单")
private Long offerId;
@ExcelProperty("报价单")
@ApiModelProperty(value = "报价单编号")
private String offerNumber;
@ExcelProperty("跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "跟进时间")
private Date followTime;
@ApiModelProperty(value = "客户编号")
private Long customerId;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("联系人")
@ApiModelProperty(value = "联系人")
private String contactName;
//TODO 联系方式
@ApiModelProperty(value = "客户经理/跟进业务员id")
private Long followUserId;
@ExcelProperty("客户经理")
private String followUserName;
@ExcelProperty(value = "跟进方式", converter = DictConvert.class)
@DictFormat("customer_followup_method")
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followMethod;
@ExcelProperty("客户经理/跟进业务员id")
@ApiModelProperty(value = "客户经理/跟进业务员id")
private Long followUserId;
@ExcelProperty("目的")
@ApiModelProperty(value = "目的")
private String purpose;
@ExcelProperty(value = "跟进结果", converter = DictConvert.class)
@ExcelProperty(value = "结果", converter = DictConvert.class)
@DictFormat("customer_followup_result_type")
@ApiModelProperty(value = "跟进结果 字典customer_followup_result_type")
private Integer resultType;
@ExcelProperty("客户反馈")
@ExcelProperty("跟进情况")
@ApiModelProperty(value = "客户反馈")
private String feedback;
@ExcelProperty("附件 多个以逗号分隔")
@ApiModelProperty(value = "附件 多个以逗号分隔")
private String attatchment;
@ExcelProperty("下次跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
......@@ -89,31 +89,44 @@ public class CustomerFollowupBackVO {
@ApiModelProperty(value = "下次跟进计划")
private String nextPlan;
@ExcelProperty("关联跟进纪录")
@ApiModelProperty(value = "上一级跟进单号")
private String parentNumber;
@ExcelProperty(value = "提交状态", converter = DictConvert.class)
@DictFormat("customer_followup_status")
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
//creator_name
@ExcelProperty("创建人")
@ApiModelProperty(value = "创建人名称")
private String creatorName;
@ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ExcelProperty("更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("报价单")
@ApiModelProperty(value = "报价单编号")
private String offerNumber;
//creator_name
@ExcelProperty("创建人id")
@ApiModelProperty(value = "创建人名称")
private String creatorName;
// updater_name
@ExcelProperty("更新人id")
@ExcelProperty("最后更新人")
@ApiModelProperty(value = "更新人名称")
private String updaterName;
@ExcelProperty("最后更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "附件 多个以逗号分隔")
private String attatchment;
}
......@@ -39,12 +39,14 @@
<select id="selectPage1" resultType="cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO">
select a.*, b.number as customer_number, c.number as offer_number,
d.nickname as creator_name, e.nickname as updater_name
d.nickname as creator_name, e.nickname as updater_name,
f.nickname as follow_user_name
from ecw_customer_followup a
left join ecw_customer b on a.customer_id = b.id
left join ecw_offer c on a.offer_id = c.offer_id
left join system_user d on a.creator = d.id
left join system_user e on a.updater = e.id
left join system_user f on a.follow_user_id = f.id
WHERE 1=1 AND a.deleted = 0
......
......@@ -682,7 +682,7 @@
<if test="query.leNumYearly != null">
AND contact.num_yearly <![CDATA[ <= ]]> #{query.leNumYearly}
</if>
<if test="query.leNumYearly != null">
<if test="query.eqNumYearly != null">
AND contact.num_yearly = #{query.leNumYearly}
</if>
......
......@@ -92,27 +92,63 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
@ResultType(OfferRespVO.class)
@Select({
"<script>",
"select o.offer_id, ",
"o.number, ",
"o.order_no, ",
"o.order_id, ",
"select o.*, ",
// "o.number, ",
// "o.order_no, ",
// "o.order_id, ",
"if(#{lang} = 0, o.departure ->> '$.titleZh', o.departure ->> '$.titleEn') as departure_name, ",
"if(#{lang} = 0, o.objective ->> '$.titleZh', o.objective ->> '$.titleEn') as objective_name, ",
"o.start_time, ",
"o.end_time, ",
"o.stop_time, ",
"o.status, ",
"o.transport_id, ",
"o.est_cost, ",
"o.create_time, ",
"o.update_time, ",
"(select count(1) from ecw_customer_follow l where l.biz_id = o.offer_id and l.follow_type = 4) as log_count, ",
// "o.start_time, ",
// "o.end_time, ",
// "o.stop_time, ",
// "o.status, ",
// "o.transport_id, ",
// "o.est_cost, ",
// "o.create_time, ",
// "o.update_time, ",
"(select count(1) from ecw_customer_followup l where l.offer_id = o.offer_id) as log_count, ",
"u.nickname as creator_name, ",
"(SELECT cc.`name` FROM ecw_customer_contacts cc WHERE ( o.relation = 1 AND cc.id = o.consignor_id ) OR ( o.relation = 2 AND cc.id = o.consignee_id)) AS relation_name ",
"u.nickname as business_manager_name, ",
// "(SELECT cc.`name` FROM ecw_customer_contacts cc WHERE ( o.relation = 1 AND cc.id = o.consignor_id ) OR ( o.relation = 2 AND cc.id = o.consignee_id)) AS relation_name ",
"cc.name as relation_name, ",
"cc.area_code as relation_area_code, ",
"cc.phone_new as relation_phone, ",
"line.start_warehouse_id, ",
"line.dest_warehouse_id, ",
"line.transport_type ",
"from ecw_offer o ",
// "left join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ",
"left join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ",
"left join system_user u on u.id = o.follow_up_salesman_id ",
"left join ecw_region s on o.objective_id = s.id ",
"left join ecw_warehouse_line line on o.line_id = line.id ",
"left join ecw_warehouse dst on line.dest_warehouse_id = dst.id ",
"where o.deleted = 0",
//destCountryIds
"<when test = 'pageVO.destCountryIds != null and pageVO.destCountryIds.size() > 0'>",
"AND dst.guojia IN",
"<foreach item='destCountryId' collection='pageVO.destCountryIds' open='(' close=')' separator=','> #{destCountryId} </foreach>",
"</when>",
//objectiveIds
"<when test = 'pageVO.objectiveIds != null and pageVO.objectiveIds.size() > 0'>",
"AND dst.objective_id IN",
"<foreach item='objectiveId' collection='pageVO.objectiveIds' open='(' close=')' separator=','> #{objectiveId} </foreach>",
"</when>",
//destWarehouseIds
"<when test = 'pageVO.destWarehouseIds != null and pageVO.destWarehouseIds.size() > 0'>",
"AND dst.id IN",
"<foreach item='destWarehouseId' collection='pageVO.destWarehouseIds' open='(' close=')' separator=','> #{destWarehouseId} </foreach>",
"</when>",
//customerId
"<when test = 'pageVO.customerId != null'>",
"AND o.relation_id = #{pageVO.customerId} ",
"</when>",
"<when test = 'pageVO.deptId != null'>",
"AND o.dept_id = #{pageVO.deptId} ",
"</when>",
......@@ -192,7 +228,32 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"select count(1)",
"from ecw_offer o ",
"left join ecw_customer c on c.id = o.relation_id ",
"left join ecw_region s on o.objective_id = s.id ",
"left join ecw_warehouse_line line on o.line_id = line.id ",
"left join ecw_warehouse dst on line.dest_warehouse_id = dst.id ",
"where o.deleted = 0",
//destCountryIds
"<when test = 'pageVO.destCountryIds != null and pageVO.destCountryIds.size() > 0'>",
"AND dst.guojia IN",
"<foreach item='destCountryId' collection='pageVO.destCountryIds' open='(' close=')' separator=','> #{destCountryId} </foreach>",
"</when>",
//objectiveIds
"<when test = 'pageVO.objectiveIds != null and pageVO.objectiveIds.size() > 0'>",
"AND dst.objective_id IN",
"<foreach item='objectiveId' collection='pageVO.objectiveIds' open='(' close=')' separator=','> #{objectiveId} </foreach>",
"</when>",
//destWarehouseIds
"<when test = 'pageVO.destWarehouseIds != null and pageVO.destWarehouseIds.size() > 0'>",
"AND dst.id IN",
"<foreach item='destWarehouseId' collection='pageVO.destWarehouseIds' open='(' close=')' separator=','> #{destWarehouseId} </foreach>",
"</when>",
//customerId
"<when test = 'pageVO.customerId != null'>",
"AND o.relation_id = #{pageVO.customerId} ",
"</when>",
"<when test = 'pageVO.deptId != null'>",
"AND o.dept_id = #{pageVO.deptId} ",
"</when>",
......
......@@ -161,4 +161,18 @@ public class OfferPageReqVO extends PageParam {
@ApiModelProperty(value = "创建者或业务员")
private String creator;
@ApiModelProperty(value = "客户id")
private Long customerId;
@ApiModelProperty(value = "目的国id集合")
private List<Long> destCountryIds;
@ApiModelProperty(value = "目的地id集合")
private List<Long> objectiveIds;
@ApiModelProperty(value = "目的仓ID集合")
private List<Long> destWarehouseIds;
}
......@@ -40,13 +40,35 @@ public class OfferRespVO extends OfferBaseVO {
@ApiModelProperty(value = "目的地名称")
private String objectiveName;
@ApiModelProperty(value = "关联客户名称")
private String relationName;
@ApiModelProperty(value = "业务员名称")
private String creatorName;
@ApiModelProperty(value = "跟进业务员")
private String followUpSalesmanId;
@ApiModelProperty(value = "关联客户名称")
private String relationName;
@ApiModelProperty(value = "联系人区号")
private String relationAreaCode;
@ApiModelProperty(value = "联系人手机号")
private String relationPhone;
// 线路相关
@ExcelProperty("始发仓库id")
private Long startWarehouseId;
@ExcelProperty("目的仓库id")
private Long destWarehouseId;
@ExcelProperty("运输方式")
private String transportType;
@ApiModelProperty(value = "业务员名称-客户经理")
private String businessManagerName;
}
......@@ -10,4 +10,10 @@ Content-Type: application/json
"result": 1,
"reason": "no reason",
"warehousingType": 1
}
\ No newline at end of file
}
### page
GET {{baseUrl}}/ecw/offer/page?pageNo=1&pageSize=10&transportId=1&customerId=51966&destCountryIds%5B0%5D=4174
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
\ No newline at end of file
......@@ -46,16 +46,16 @@ spring:
datasource:
master:
name: jiedao
url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE&connectTimeout=60000
url: jdbc:mysql://159.75.224.138:2297/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE&connectTimeout=60000
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: mysql@2024
password: mysql@2022
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
name: jiedao
url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE&connectTimeout=60000
url: jdbc:mysql://159.75.224.138:2297/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE&connectTimeout=60000
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: mysql@2024
password: mysql@2022
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
......
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