diff --git a/doc/v1.0.1/升级事项 b/doc/v1.0.1/升级事项 deleted file mode 100644 index 90088bb..0000000 --- a/doc/v1.0.1/升级事项 +++ /dev/null @@ -1,5 +0,0 @@ -1. 新增角色 : - 保有客分配 BYKFP 一个服务站一个 - -2.资源路径 - /app/leave2do/** 保有客分配 \ No newline at end of file diff --git a/doc/v1.0.1/升级事项.md b/doc/v1.0.1/升级事项.md new file mode 100644 index 0000000..45dd533 --- /dev/null +++ b/doc/v1.0.1/升级事项.md @@ -0,0 +1,23 @@ +##### 新增角色: + + |名称|角色码|备注| + | --|--|--| + |保有客分配 |BYKFP |一个服务站一个| + + +##### 资源路径: + ASCustomerDistribute 保有客分配 菜单 + /app/leave2do/customer/** 保有客分配url + AsCrmOwnFollowUpPool 跟进池 菜单 + /app/pool/follow/** 跟进池列表请求url + +##### 升级内容: + +1. 去掉战败池和成交池 +2. 跟进池调整(菜单只能看自己的) +3. 事故车线索新增备案手机号 +4. 新增离职分配功能(需等人事下个版本) +4. 跟进算法调整 +5. 首保设置新增项目 +7. 报表 +8. 成交、战败 逻辑调整 diff --git a/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/DateUtil.java b/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/DateUtil.java index c64f215..7693b4a 100644 --- a/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/DateUtil.java +++ b/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/DateUtil.java @@ -7,6 +7,7 @@ import java.time.*; import java.time.temporal.TemporalAdjusters; import java.util.Calendar; import java.util.Date; +import java.util.Objects; /** * 日期处理工具 @@ -453,6 +454,74 @@ public final class DateUtil { return (int) result; } + /** + * 判断是否是凌晨 + * + * @param date + * @return + */ + public static boolean isBeforeDawn(Date date) { + if (Objects.isNull(date)) { + return false; + } + LocalDateTime dateTime = date2LocalDateTime(date); + SimpleDateFormat df = new SimpleDateFormat("HH"); + String str = df.format(localDateTime2Date(dateTime)); + int a = Integer.parseInt(str); + return a >= 0 && a <= 6; + } + + /** + * 判断是否是上午 + * + * @param date + * @return + */ + public static boolean isMorning(Date date) { + if (Objects.isNull(date)) { + return false; + } + LocalDateTime dateTime = date2LocalDateTime(date); + SimpleDateFormat df = new SimpleDateFormat("HH"); + String str = df.format(localDateTime2Date(dateTime)); + int a = Integer.parseInt(str); + return a > 6 && a <= 12; + } + + /** + * 判断是否是下午 + * + * @param date + * @return + */ + public static boolean isAfternoon(Date date) { + if (Objects.isNull(date)) { + return false; + } + LocalDateTime dateTime = date2LocalDateTime(date); + SimpleDateFormat df = new SimpleDateFormat("HH"); + String str = df.format(localDateTime2Date(dateTime)); + int a = Integer.parseInt(str); + return a > 12 && a <= 18; + } + + /** + * 判断是否是晚上 + * + * @param date + * @return + */ + public static boolean isEvening(Date date) { + if (Objects.isNull(date)) { + return false; + } + LocalDateTime dateTime = date2LocalDateTime(date); + SimpleDateFormat df = new SimpleDateFormat("HH"); + String str = df.format(localDateTime2Date(dateTime)); + int a = Integer.parseInt(str); + return a > 18 && a <= 23; + } + public static void main(String[] args) throws ParseException { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = format.parse("2020-09-19 09:45:30"); diff --git a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CommonController.java b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CommonController.java index 46aa726..8311d09 100644 --- a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CommonController.java +++ b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CommonController.java @@ -43,7 +43,7 @@ public class CommonController { @GetMapping("/staff/list") public Message> list(@NotNull(message = "服务站ID不能为空") final Long shopId, - @NotNull(message = "跟进类型ID不能为空") final Integer type) { + @NotNull(message = "跟进类型不能为空") final Integer type) { final String msg = "查询跟进人员[app/common/staff/list]"; try { log.info("{}: param[shopId: {} type: {}]", msg, shopId, type); diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java index ead9bb4..88662bf 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java @@ -12,7 +12,6 @@ import cn.fw.valhalla.domain.db.follow.FollowTask; import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.dto.FollowAttachmentDTO; import cn.fw.valhalla.domain.enums.*; -import cn.fw.valhalla.domain.vo.follow.ACDetailVO; import cn.fw.valhalla.domain.vo.follow.FollowDetailVO; import cn.fw.valhalla.domain.vo.follow.FollowRecordVO; import cn.fw.valhalla.domain.vo.setting.SettingVO; @@ -595,6 +594,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { return null; } Integer value = vo.getDetailValue(); + SettingUnitEnum unit = Objects.requireNonNull(SettingUnitEnum.ofValue(vo.getUnit())); if (value == null || value <= 0) { log.info("关键设置数据异常,请检查数据 : settingType[{}] settingId[{}]", vo.getType(), vo.getId()); return null; @@ -602,7 +602,12 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { if (reverse) { value = -1 * value; } - return DateUtil.getExpired(origin, value, getCalendarType(Objects.requireNonNull(SettingUnitEnum.ofValue(vo.getUnit())))); + Timestamp expired = DateUtil.getExpired(origin, value, getCalendarType(unit)); + DateUtil.date2LocalDateTime(expired); + if (SettingUnitEnum.DAY.equals(unit) && !DateUtil.isBeforeDawn(expired)) { + expired = DateUtil.getExpired(DateUtil.startDate(expired), 1, Calendar.DATE); + } + return expired; } protected String getItemCode(FollowTypeEnum type) {