Commit f76fb18119be093ff45102e5e58f8909202e885f
Merge remote-tracking branch 'origin/dev' into test
Showing
5 changed files
with
60 additions
and
7 deletions
fw-valhalla-dao/src/main/resources/mapper/CustomerCluePoolMapper.xml
... | ... | @@ -15,6 +15,10 @@ |
15 | 15 | t1.clue_status clue_status, |
16 | 16 | t1.close_time finish_time, |
17 | 17 | t1.close_time defeat_time, |
18 | + t1.original_user_id original_user_id, | |
19 | + t1.original_user_name original_user, | |
20 | + t1.original_shop_id original_shop_id, | |
21 | + t1.original_shop_name original_shop, | |
18 | 22 | t1.finish_user_id finish_user_id, |
19 | 23 | t1.finish_user_name finish_user, |
20 | 24 | t1.finish_shop_id finish_shop_id, |
... | ... | @@ -31,10 +35,10 @@ |
31 | 35 | and t1.group_id = #{condition.groupId} |
32 | 36 | </if> |
33 | 37 | <if test="condition.userName !=null and condition.userName != ''"> |
34 | - and t1.finish_user_name like concat('%', #{condition.userName}, '%') | |
38 | + and (t1.finish_user_name like concat('%', #{condition.userName}, '%') or t1.original_user_name like concat('%', #{condition.userName}, '%')) | |
35 | 39 | </if> |
36 | 40 | <if test="condition.shopName !=null and condition.shopName != ''"> |
37 | - and t1.finish_shop_name like concat('%', #{condition.shopName}, '%') | |
41 | + and (t1.finish_shop_name like concat('%', #{condition.shopName}, '%') or t1.original_shop_name like concat('%', #{condition.shopName}, '%')) | |
38 | 42 | </if> |
39 | 43 | <if test="condition.plateNo != null and condition.plateNo !=''"> |
40 | 44 | and (t2.plate_no like concat('%', #{condition.plateNo}, '%') or t3.plate_no like concat('%', #{condition.plateNo}, '%')) |
... | ... | @@ -43,11 +47,17 @@ |
43 | 47 | and DATE_FORMAT(t1.start_time, '%Y-%m') = DATE_FORMAT(#{condition.startTime}, '%Y-%m') |
44 | 48 | </if> |
45 | 49 | <if test="condition.shopIds !=null"> |
46 | - and t1.finish_shop_id in | |
50 | + and t1.original_shop_id in | |
47 | 51 | <foreach collection="condition.shopIds" item="id" index="index" open="(" close=")" separator=","> |
48 | 52 | #{id} |
49 | 53 | </foreach> |
50 | 54 | </if> |
55 | + <if test="condition.comShops !=null"> | |
56 | + and t1.finish_shop_id in | |
57 | + <foreach collection="condition.comShops" item="id" index="index" open="(" close=")" separator=","> | |
58 | + #{id} | |
59 | + </foreach> | |
60 | + </if> | |
51 | 61 | <if test="condition.status !=null and condition.status ==2"> |
52 | 62 | and t1.clue_status = 2 |
53 | 63 | </if> |
... | ... | @@ -94,10 +104,10 @@ |
94 | 104 | and t1.group_id = #{condition.groupId} |
95 | 105 | </if> |
96 | 106 | <if test="condition.userName !=null and condition.userName != ''"> |
97 | - and t1.finish_user_name like concat('%', #{condition.userName}, '%') | |
107 | + and (t1.finish_user_name like concat('%', #{condition.userName}, '%') or t1.original_user_name like concat('%', #{condition.userName}, '%')) | |
98 | 108 | </if> |
99 | 109 | <if test="condition.shopName !=null and condition.shopName != ''"> |
100 | - and t1.finish_shop_name like concat('%', #{condition.shopName}, '%') | |
110 | + and (t1.finish_shop_name like concat('%', #{condition.shopName}, '%') or t1.original_shop_name like concat('%', #{condition.shopName}, '%')) | |
101 | 111 | </if> |
102 | 112 | <if test="condition.plateNo != null and condition.plateNo !=''"> |
103 | 113 | and (t2.plate_no like concat('%', #{condition.plateNo}, '%') or t3.plate_no like concat('%', #{condition.plateNo}, '%')) |
... | ... | @@ -105,8 +115,14 @@ |
105 | 115 | <if test="condition.startTime !=null"> |
106 | 116 | and DATE_FORMAT(t1.start_time, '%Y-%m') = DATE_FORMAT(#{condition.startTime}, '%Y-%m') |
107 | 117 | </if> |
108 | - <if test="condition.shopIds !=null"> | |
118 | + <if test="condition.comShops !=null"> | |
109 | 119 | and t1.finish_shop_id in |
120 | + <foreach collection="condition.comShops" item="id" index="index" open="(" close=")" separator=","> | |
121 | + #{id} | |
122 | + </foreach> | |
123 | + </if> | |
124 | + <if test="condition.shopIds !=null"> | |
125 | + and t1.original_shop_id in | |
110 | 126 | <foreach collection="condition.shopIds" item="id" index="index" open="(" close=")" separator=","> |
111 | 127 | #{id} |
112 | 128 | </foreach> | ... | ... |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/CustomerCluePoolDTO.java
... | ... | @@ -63,6 +63,22 @@ public class CustomerCluePoolDTO { |
63 | 63 | */ |
64 | 64 | private Long finishShopId; |
65 | 65 | /** |
66 | + * 初始跟进人id | |
67 | + */ | |
68 | + private Long originalUserId; | |
69 | + /** | |
70 | + * 初始跟进人名称 | |
71 | + */ | |
72 | + private String originalUser; | |
73 | + /** | |
74 | + * 初始跟进门店id | |
75 | + */ | |
76 | + private Long originalShopId; | |
77 | + /** | |
78 | + * 初始跟进门店名称 | |
79 | + */ | |
80 | + private String originalShop; | |
81 | + /** | |
66 | 82 | * 战败时间 |
67 | 83 | */ |
68 | 84 | private Date defeatTime; | ... | ... |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/query/CustomerCluePoolQueryVO.java
... | ... | @@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode; |
6 | 6 | import lombok.ToString; |
7 | 7 | import org.apache.commons.lang3.StringUtils; |
8 | 8 | import org.apache.commons.lang3.math.NumberUtils; |
9 | +import org.springframework.util.CollectionUtils; | |
9 | 10 | |
10 | 11 | import java.time.Instant; |
11 | 12 | import java.time.LocalDateTime; |
... | ... | @@ -32,6 +33,7 @@ public class CustomerCluePoolQueryVO extends PoolQuery { |
32 | 33 | */ |
33 | 34 | private Integer status; |
34 | 35 | private String shopName; |
36 | + private String comShops; | |
35 | 37 | /** |
36 | 38 | * 管理门店范围 |
37 | 39 | */ |
... | ... | @@ -56,4 +58,15 @@ public class CustomerCluePoolQueryVO extends PoolQuery { |
56 | 58 | .map(Long::valueOf).distinct() |
57 | 59 | .collect(Collectors.toList()); |
58 | 60 | } |
61 | + | |
62 | + public List<Long> getComShops() { | |
63 | + if (StringUtils.isBlank(comShops)) { | |
64 | + return null; | |
65 | + } | |
66 | + List<Long> list = Arrays.stream(comShops.split(",")).filter(StringUtils::isNoneBlank).map(Long::valueOf).collect(Collectors.toList()); | |
67 | + if (CollectionUtils.isEmpty(list)) { | |
68 | + return null; | |
69 | + } | |
70 | + return list; | |
71 | + } | |
59 | 72 | } | ... | ... |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/pool/CustomerCluePoolVO.java
... | ... | @@ -53,6 +53,14 @@ public class CustomerCluePoolVO { |
53 | 53 | */ |
54 | 54 | private String finishShop; |
55 | 55 | /** |
56 | + * 初始跟进人名称 | |
57 | + */ | |
58 | + private String originalUser; | |
59 | + /** | |
60 | + * 初始跟进门店名称 | |
61 | + */ | |
62 | + private String originalShop; | |
63 | + /** | |
56 | 64 | * 战败时间 |
57 | 65 | */ |
58 | 66 | private Date defeatTime; | ... | ... |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java
... | ... | @@ -67,7 +67,7 @@ public class ACFollowStrategy extends AbstractFollowStrategy { |
67 | 67 | vo.setId(followRecord.getId()); |
68 | 68 | vo.setTaskId(followRecord.getTaskId()); |
69 | 69 | vo.setCustomerId(followRecord.getCustomerId()); |
70 | - vo.setDeadline(Objects.isNull(followRecord.getLimitTime()) ? followRecord.getDeadline() : followRecord.getLimitTime()); | |
70 | + vo.setDeadline(followRecord.getDeadline()); | |
71 | 71 | AccidentPool accidentPool = accidentPoolService.getById(followRecord.getCustomerId()); |
72 | 72 | if (Objects.nonNull(accidentPool)) { |
73 | 73 | vo.setName(accidentPool.getName()); | ... | ... |