package com.cool.store.service;

import com.cool.store.context.LoginUserInfo;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.exception.ApiException;
import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.LineRequest;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.request.TransferInvestmentManagerRequest;
import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @Author suzhuhong
 * @Date 2023/6/9 10:30
 * @Version 1.0
 */
public interface HyPartnerLineInfoService {


    /**
     * 查询招商经理 待处理
     * @param userId
     * @return
     */
    StageCountVO selectStagePendingCount(String userId);

    /**
     * 查询招商经理 待跟进
     * @param userId
     * @return
     */
    StageCountVO selectStageFollowCount(String userId);


    /**
     * 查询加盟商线索详情之一 线索信息与基本信息
     * @param lineId
     * @return
     */
    PartnerLineInfoAndBaseInfoVO selectPartnerLineInfoAndBaseInfo(Long lineId);

    /**
     * 最近30天结束的线索
     * @param userId
     * @param pageSize
     * @param pageNumber
     * @return
     */
    PageInfo<PartnerLineInfoVO> lastMonthCloseLine(String userId,Integer pageSize,Integer pageNumber);

    /**
     * 转让招商经理
     * @param userId
     * @param lineId
     * @return
     */
    Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request) throws ApiException;

    /**
     * 分配招商经理
     * @param userId
     * @param lineIdList
     * @return
     */
    Boolean allocationInvestmentManager(LoginUserInfo user, List<Long> lineIdList);


    /**
     * 黑名单列表
     * @param LineRequest LineRequest
     * @return
     */
    PageInfo<BlackListVO> getBlackList(LineRequest LineRequest);

    /**
     * 加入或者移除 黑名单
     * @param lineId
     * @param status
     * @param joinReason
     * @return
     */
     Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) throws ApiException;

    /**
     * 移除黑名单
     * @param lineId
     * @param status
     * @param removeReason
     * @return
     */
    Boolean removeBlackList( LoginUserInfo userInfo,Long lineId, Integer status, String removeReason);

    /**
     * 结束或者通过线索
     * @param userId
     * @param closeFollowRequest
     * @return
     */
    Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException;

    /**
     * 公海线索
     * @param userId
     * @param lineRequest
     * @return
     */
    PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId,LineRequest lineRequest);


    /**
     * 私海列表
     * @param userId
     * @param privateSeaLineListRequest
     * @return
     */
    PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest privateSeaLineListRequest) ;

    PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId);

    /**
     * 跟进历史
     * @param partnerId
     * @return
     */
    List<LineFollowHistoryVO> getLineFollowHistory(String partnerId);

    /**
     * 是否分配跟进人
     * @param lineId
     * @return
     */
    Boolean assignFollowUser(String partnerId, String wantShopArea, Integer acceptAdjustType,Boolean flag );

    /**
     * 线索状态
     * @param wantShopAreaId
     * @param acceptAdjustType
     * @return
     */
     Boolean getLineStatus(Long wantShopAreaId,Integer acceptAdjustType);

    /**
     * 查询跟进人
     * @param partnerId
     * @return
     */
     String getAssignFollowUser(String partnerId,String type);

    InterviewVO getInterviewInfo(Long lineId,Boolean needDevelopmentDirector) throws ApiException;

    /**
     * 生成一条默认线索
     * @param partnerId
     * @param wantShopArea
     * @param acceptAdjustType
     * @return
     */
    HyPartnerLineInfoDO generateDefaultLineInfo(String partnerId, String wantShopArea, Integer acceptAdjustType,Boolean assignFlag);

    Long checkGenerateNewLineId(Long lineId);

}
