From 3ac8e84cf26066883483641b16d2dcc368cf3608 Mon Sep 17 00:00:00 2001 From: Kurisu Date: Fri, 29 Jan 2021 11:13:37 +0800 Subject: [PATCH] :fire: 跟进详情新增判断 --- fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/follow/FollowDetailVO.java | 4 ++++ fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java | 5 +++++ fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java | 7 +++++++ fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java | 6 ++++++ fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java | 7 +++++++ 5 files changed, 29 insertions(+), 0 deletions(-) diff --git a/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/follow/FollowDetailVO.java b/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/follow/FollowDetailVO.java index 4c6b2ff..2b126e2 100644 --- a/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/follow/FollowDetailVO.java +++ b/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/follow/FollowDetailVO.java @@ -73,6 +73,10 @@ public class FollowDetailVO { */ private Date deadline; private String reason; + /** + * 是否已经打过电话 + */ + private Boolean hadCall; public long getCountdown() { if (Objects.isNull(deadline)) { diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java index 048957d..4370a6a 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java @@ -86,9 +86,14 @@ public class ACFollowStrategy extends AbstractFollowStrategy { public FollowDetailVO getDetail(Long id) { FollowRecord followRecord = followRecordService.getById(id); BV.notNull(followRecord, "跟进记录不存在"); + int count = followRecordLogService.count(Wrappers.lambdaQuery() + .eq(FollowRecordLog::getRecordId, followRecord.getId()) + .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) + ); ACDetailVO vo = assemble(followRecord.getCustomerId()); vo.setId(followRecord.getId()); vo.setTaskId(followRecord.getTaskId()); + vo.setHadCall(count > 0); vo.setDeadline(Objects.isNull(followRecord.getLimitTime()) ? followRecord.getDeadline() : followRecord.getLimitTime()); return vo; } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java index 2c94d6a..a531828 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java @@ -4,10 +4,12 @@ import cn.fw.valhalla.common.utils.MobileUtil; import cn.fw.valhalla.domain.db.OriginalData; import cn.fw.valhalla.domain.db.customer.Customer; import cn.fw.valhalla.domain.db.follow.FollowRecord; +import cn.fw.valhalla.domain.db.follow.FollowRecordLog; import cn.fw.valhalla.domain.db.follow.FollowTask; import cn.fw.valhalla.domain.db.pool.CustomerCluePool; import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.dto.FollowAttachmentDTO; +import cn.fw.valhalla.domain.enums.AttTypeEnum; import cn.fw.valhalla.domain.enums.ClueStatusEnum; import cn.fw.valhalla.domain.enums.FollowTypeEnum; import cn.fw.valhalla.domain.enums.SettingTypeEnum; @@ -76,6 +78,11 @@ public class FMFollowStrategy extends AbstractFollowStrategy { vo.setId(followRecord.getId()); vo.setTaskId(followRecord.getTaskId()); vo.setFMExpiration(followTask.getDeadline()); + int count = followRecordLogService.count(Wrappers.lambdaQuery() + .eq(FollowRecordLog::getRecordId, followRecord.getId()) + .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) + ); + vo.setHadCall(count > 0); return vo; } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java index 2a55655..d52ba26 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java @@ -8,6 +8,7 @@ import cn.fw.valhalla.domain.db.OriginalData; import cn.fw.valhalla.domain.db.customer.Customer; import cn.fw.valhalla.domain.db.follow.FollowNoticeRecord; import cn.fw.valhalla.domain.db.follow.FollowRecord; +import cn.fw.valhalla.domain.db.follow.FollowRecordLog; import cn.fw.valhalla.domain.db.follow.FollowTask; import cn.fw.valhalla.domain.db.pool.CustomerCluePool; import cn.fw.valhalla.domain.dto.CustomerDetailDto; @@ -81,6 +82,11 @@ public class IRFollowStrategy extends AbstractFollowStrategy { FollowRecord followRecord = followRecordService.getById(id); BV.notNull(followRecord, "跟进记录不存在"); IRDetailVO vo = assemble(followRecord.getCustomerId()); + int count = followRecordLogService.count(Wrappers.lambdaQuery() + .eq(FollowRecordLog::getRecordId, followRecord.getId()) + .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) + ); + vo.setHadCall(count > 0); vo.setId(followRecord.getId()); vo.setTaskId(followRecord.getTaskId()); vo.setDeadline(followRecord.getDeadline()); diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java index 9e6238c..de5131b 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java @@ -5,10 +5,12 @@ import cn.fw.valhalla.common.utils.MobileUtil; import cn.fw.valhalla.domain.db.OriginalData; import cn.fw.valhalla.domain.db.customer.Customer; import cn.fw.valhalla.domain.db.follow.FollowRecord; +import cn.fw.valhalla.domain.db.follow.FollowRecordLog; import cn.fw.valhalla.domain.db.follow.FollowTask; import cn.fw.valhalla.domain.db.pool.CustomerCluePool; import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.dto.FollowAttachmentDTO; +import cn.fw.valhalla.domain.enums.AttTypeEnum; import cn.fw.valhalla.domain.enums.ClueStatusEnum; import cn.fw.valhalla.domain.enums.FollowTypeEnum; import cn.fw.valhalla.domain.enums.SettingTypeEnum; @@ -99,6 +101,11 @@ public class RMFollowStrategy extends AbstractFollowStrategy { FollowRecord followRecord = followRecordService.getById(id); BV.notNull(followRecord, "跟进记录不存在"); RMDetailVO vo = assemble(followRecord.getCustomerId()); + int count = followRecordLogService.count(Wrappers.lambdaQuery() + .eq(FollowRecordLog::getRecordId, followRecord.getId()) + .eq(FollowRecordLog::getAttType, AttTypeEnum.SMART_PHONE) + ); + vo.setHadCall(count > 0); vo.setId(followRecord.getId()); vo.setTaskId(followRecord.getTaskId()); vo.setDeadline(followRecord.getDeadline()); -- libgit2 0.22.2