Commit 76d60437e6076d7c6891c54b304950ecc83fedeb
1 parent
e524f8b0
跟进任务详情增加客户等级和进站次数等
Showing
8 changed files
with
32 additions
and
1 deletions
fw-valhalla-dao/src/main/resources/mapper/FollowTaskMapper.xml
@@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
9 | SELECT t1.id, | 9 | SELECT t1.id, |
10 | if(t1.type=3 , t4.plate_no, t3.plate_no)plate_no, | 10 | if(t1.type=3 , t4.plate_no, t3.plate_no)plate_no, |
11 | if(t1.type=3 , t4.frame_no, t3.frame_no)frame_no, | 11 | if(t1.type=3 , t4.frame_no, t3.frame_no)frame_no, |
12 | + t3.cus_level cus_level, | ||
12 | t2.expires loan_expires, | 13 | t2.expires loan_expires, |
13 | t1.type type, | 14 | t1.type type, |
14 | t1.follow_user user_id, | 15 | t1.follow_user user_id, |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/FollowPoolDTO.java
@@ -17,6 +17,10 @@ public class FollowPoolDTO { | @@ -17,6 +17,10 @@ public class FollowPoolDTO { | ||
17 | */ | 17 | */ |
18 | private String plateNo; | 18 | private String plateNo; |
19 | /** | 19 | /** |
20 | + * 客户星级 | ||
21 | + */ | ||
22 | + private Integer cusLevel; | ||
23 | + /** | ||
20 | * 车架号 | 24 | * 车架号 |
21 | */ | 25 | */ |
22 | private String frameNo; | 26 | private String frameNo; |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/follow/FollowDetailVO.java
@@ -53,6 +53,10 @@ public class FollowDetailVO { | @@ -53,6 +53,10 @@ public class FollowDetailVO { | ||
53 | */ | 53 | */ |
54 | private String tags; | 54 | private String tags; |
55 | /** | 55 | /** |
56 | + * 跟进次数 | ||
57 | + */ | ||
58 | + private Integer times; | ||
59 | + /** | ||
56 | * 客户星级 | 60 | * 客户星级 |
57 | */ | 61 | */ |
58 | private Integer cusLevel; | 62 | private Integer cusLevel; |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/pool/FollowPoolListVO.java
@@ -19,6 +19,10 @@ public class FollowPoolListVO { | @@ -19,6 +19,10 @@ public class FollowPoolListVO { | ||
19 | */ | 19 | */ |
20 | private String plateNo; | 20 | private String plateNo; |
21 | /** | 21 | /** |
22 | + * 客户星级 | ||
23 | + */ | ||
24 | + private Integer cusLevel; | ||
25 | + /** | ||
22 | * 车架号 | 26 | * 车架号 |
23 | */ | 27 | */ |
24 | private String frameNo; | 28 | private String frameNo; |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java
@@ -825,6 +825,18 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { | @@ -825,6 +825,18 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { | ||
825 | followRecordService.updateById(record); | 825 | followRecordService.updateById(record); |
826 | } | 826 | } |
827 | 827 | ||
828 | + protected void queryTimes(Long clueId, FollowDetailVO vo) { | ||
829 | + List<FollowTask> list = followTaskService.list(Wrappers.<FollowTask>lambdaQuery() | ||
830 | + .eq(FollowTask::getClueId, clueId) | ||
831 | + ); | ||
832 | + if (CollectionUtils.isEmpty(list)) { | ||
833 | + vo.setTimes(0); | ||
834 | + return; | ||
835 | + } | ||
836 | + int sum = list.stream().filter(r -> Objects.nonNull(r.getTimes())).mapToInt(FollowTask::getTimes).sum(); | ||
837 | + vo.setTimes(sum); | ||
838 | + } | ||
839 | + | ||
828 | private void onStopClue(CustomerCluePool clue, TaskDefeatTypeEnum defeatTypeEnum) { | 840 | private void onStopClue(CustomerCluePool clue, TaskDefeatTypeEnum defeatTypeEnum) { |
829 | clue.setClueStatus(ClueStatusEnum.FAILURE); | 841 | clue.setClueStatus(ClueStatusEnum.FAILURE); |
830 | clue.setCloseTime(new Date()); | 842 | clue.setCloseTime(new Date()); |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java
@@ -80,6 +80,7 @@ public class FMFollowStrategy extends AbstractFollowStrategy { | @@ -80,6 +80,7 @@ public class FMFollowStrategy extends AbstractFollowStrategy { | ||
80 | vo.setId(followRecord.getId()); | 80 | vo.setId(followRecord.getId()); |
81 | vo.setTaskId(followRecord.getTaskId()); | 81 | vo.setTaskId(followRecord.getTaskId()); |
82 | vo.setFMExpiration(followTask.getDeadline()); | 82 | vo.setFMExpiration(followTask.getDeadline()); |
83 | + queryTimes(followTask.getClueId(), vo); | ||
83 | int count = followRecordLogService.count(Wrappers.<FollowRecordLog>lambdaQuery() | 84 | int count = followRecordLogService.count(Wrappers.<FollowRecordLog>lambdaQuery() |
84 | .eq(FollowRecordLog::getTaskId, followRecord.getTaskId()) | 85 | .eq(FollowRecordLog::getTaskId, followRecord.getTaskId()) |
85 | .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) | 86 | .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java
@@ -17,7 +17,6 @@ import cn.fw.valhalla.domain.enums.*; | @@ -17,7 +17,6 @@ import cn.fw.valhalla.domain.enums.*; | ||
17 | import cn.fw.valhalla.domain.vo.follow.*; | 17 | import cn.fw.valhalla.domain.vo.follow.*; |
18 | import cn.fw.valhalla.domain.vo.setting.SettingVO; | 18 | import cn.fw.valhalla.domain.vo.setting.SettingVO; |
19 | import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO; | 19 | import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO; |
20 | -import cn.fw.valhalla.rpc.erp.dto.BackLogItemDTO; | ||
21 | import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; | 20 | import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; |
22 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | 21 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; |
23 | import cn.fw.valhalla.rpc.oop.dto.ShopDTO; | 22 | import cn.fw.valhalla.rpc.oop.dto.ShopDTO; |
@@ -86,7 +85,10 @@ public class IRFollowStrategy extends AbstractFollowStrategy { | @@ -86,7 +85,10 @@ public class IRFollowStrategy extends AbstractFollowStrategy { | ||
86 | public FollowDetailVO getDetail(Long id) { | 85 | public FollowDetailVO getDetail(Long id) { |
87 | FollowRecord followRecord = followRecordService.getById(id); | 86 | FollowRecord followRecord = followRecordService.getById(id); |
88 | BV.notNull(followRecord, "跟进记录不存在"); | 87 | BV.notNull(followRecord, "跟进记录不存在"); |
88 | + FollowTask followTask = followTaskService.getById(followRecord.getTaskId()); | ||
89 | + BV.notNull(followTask, "跟进信息不存在"); | ||
89 | IRDetailVO vo = assemble(followRecord.getCustomerId()); | 90 | IRDetailVO vo = assemble(followRecord.getCustomerId()); |
91 | + queryTimes(followTask.getClueId(), vo); | ||
90 | int count = followRecordLogService.count(Wrappers.<FollowRecordLog>lambdaQuery() | 92 | int count = followRecordLogService.count(Wrappers.<FollowRecordLog>lambdaQuery() |
91 | .eq(FollowRecordLog::getTaskId, followRecord.getTaskId()) | 93 | .eq(FollowRecordLog::getTaskId, followRecord.getTaskId()) |
92 | .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) | 94 | .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java
@@ -103,6 +103,8 @@ public class RMFollowStrategy extends AbstractFollowStrategy { | @@ -103,6 +103,8 @@ public class RMFollowStrategy extends AbstractFollowStrategy { | ||
103 | public FollowDetailVO getDetail(Long id) { | 103 | public FollowDetailVO getDetail(Long id) { |
104 | FollowRecord followRecord = followRecordService.getById(id); | 104 | FollowRecord followRecord = followRecordService.getById(id); |
105 | BV.notNull(followRecord, "跟进记录不存在"); | 105 | BV.notNull(followRecord, "跟进记录不存在"); |
106 | + FollowTask followTask = followTaskService.getById(followRecord.getTaskId()); | ||
107 | + BV.notNull(followTask, "跟进信息不存在"); | ||
106 | RMDetailVO vo = assemble(followRecord.getCustomerId()); | 108 | RMDetailVO vo = assemble(followRecord.getCustomerId()); |
107 | int count = followRecordLogService.count(Wrappers.<FollowRecordLog>lambdaQuery() | 109 | int count = followRecordLogService.count(Wrappers.<FollowRecordLog>lambdaQuery() |
108 | .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) | 110 | .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) |
@@ -112,6 +114,7 @@ public class RMFollowStrategy extends AbstractFollowStrategy { | @@ -112,6 +114,7 @@ public class RMFollowStrategy extends AbstractFollowStrategy { | ||
112 | vo.setId(followRecord.getId()); | 114 | vo.setId(followRecord.getId()); |
113 | vo.setTaskId(followRecord.getTaskId()); | 115 | vo.setTaskId(followRecord.getTaskId()); |
114 | vo.setDeadline(followRecord.getDeadline()); | 116 | vo.setDeadline(followRecord.getDeadline()); |
117 | + queryTimes(followTask.getClueId(), vo); | ||
115 | return vo; | 118 | return vo; |
116 | } | 119 | } |
117 | 120 |