FollowStrategy.java 3.4 KB
package cn.fw.valhalla.service.bus.follow.strategy;

import cn.fw.common.exception.BusinessException;
import cn.fw.common.web.auth.LoginAuthBean;
import cn.fw.valhalla.domain.db.OriginalData;
import cn.fw.valhalla.domain.db.follow.FollowRecord;
import cn.fw.valhalla.domain.db.follow.FollowTask;
import cn.fw.valhalla.domain.db.pool.CustomerCluePool;
import cn.fw.valhalla.domain.dto.FollowAttachmentDTO;
import cn.fw.valhalla.domain.enums.FollowTypeEnum;
import cn.fw.valhalla.domain.vo.follow.FollowDetailVO;
import cn.fw.valhalla.domain.vo.follow.FollowRecordVO;
import cn.fw.valhalla.domain.vo.follow.FollowTodoListVO;
import cn.fw.valhalla.domain.vo.setting.SettingVO;

import java.util.Date;
import java.util.List;

/**
 * @author : kurisu
 * @className : FollowStrategy
 * @description : 跟进策略接口
 * @date: 2020-08-14 10:10
 */
public interface FollowStrategy {
    /**
     * 获取类型
     *
     * @return
     */
    FollowTypeEnum getFollowType();

    /**
     * 查询待办列表详情
     *
     * @param startIndex
     * @param pageSize
     * @param userId
     * @return
     */
    List<FollowTodoListVO> getList(Integer startIndex, Integer pageSize, Long userId);

    /**
     * 查询跟进待办详情
     *
     * @param id
     * @return
     */
    FollowDetailVO getDetail(Long id);

    /**
     * 查询跟进记录
     *
     * @param taskId
     * @return
     */
    List<FollowRecordVO> getRecordList(Long taskId);

    /**
     * 完成跟进
     *
     * @param id
     * @param currentUser
     */
    void completeRecord(Long id, LoginAuthBean currentUser);

    /**
     * 完成跟进
     *
     * @param record
     */
    void completeRecordAndEnd(FollowRecord record, boolean needNew);

    /**
     * 上传跟进附件
     *
     * @param dto
     * @param userId
     */
    void uploadAtt(FollowAttachmentDTO dto, Long userId);

    /**
     * 取消跟进任务
     *
     * @param customerId
     * @param time
     * @param groupId
     */
    @Deprecated
    void cancelFollowTask(Long customerId, Date time, Long groupId);

    /**
     * 更新跟进任务
     *
     * @param setting
     * @param groupId
     */
    void settingChanged(List<SettingVO> setting, Long groupId);

    /**
     * 元数据生成任务
     *
     * @param originalData
     * @return
     * @throws Exception
     */
    boolean origin2task(OriginalData originalData) throws Exception;

    /**
     * 开始线索
     *
     * @param cluePool
     */
    void startClue(CustomerCluePool cluePool);

    /**
     * 任务开始
     *
     * @param task
     * @param addDay
     */
    void startTask(FollowTask task, boolean addDay);

    /**
     * 结束任务
     *
     * @param task
     * @throws BusinessException
     */
    void closeTask(FollowTask task) throws BusinessException;

    /**
     * 强制结束任务
     *
     * @param clue
     */
    void forceStopClue(CustomerCluePool clue);

    /**
     * 当档案作废是强制结束任务
     *
     * @param clue
     */
    void onForbiddenStopClue(CustomerCluePool clue);

    /**
     * 更新跟进任务
     *
     * @param customerId
     */
    void updateTask(Long customerId);

    /**
     * 逾期处理
     *
     * @param record
     */
    void overdueProcessing(FollowRecord record);

    /**
     * 查询跟进池详情
     *
     * @param task
     * @return
     */
    FollowDetailVO followPoolDetail(FollowTask task);
}