package com.storlead.sales.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.storlead.sales.pojo.vo.customer.BusinessListVO;
import com.storlead.sales.pojo.dto.report.DataAnalysisDTO;
import com.storlead.sales.pojo.vo.report.*;

import java.util.List;

public interface SalesProcessAnalysisService {

    /**
     * 销售预测分析-预测分析
     * @param dto
     * @return
     */
    BusinessMonthTotalVO performSalesForecastAnalysis(DataAnalysisDTO dto);

    /**
     * 销售预测分析-预测报表
     * @param dto
     * @return
     */
    IPage<BusinessListVO> listPerformSalesForecastAnalysis(DataAnalysisDTO dto);

    BusinessMonthTotalVO listCountPerformSalesForecastAnalysis(DataAnalysisDTO dto);
    /**
     * 销售漏斗分析-漏斗分析
     * @param dto
     * @return
     */
    BusinessStageTotalVO analyzeSalesFunnel(DataAnalysisDTO dto) ;

    /**
     * 汇总新增业务数据 - 按时间
     * @param dto
     */
    SalesDataGrowTotalVO summarizeNewBusiness(DataAnalysisDTO dto);

    // 生成业务明细报表
    void generateBusinessDetailReport(DataAnalysisDTO dto);

    // 汇总跟进记录
    IPage summarizeFollowUpTypeRecords(DataAnalysisDTO dto);

    // 汇总跟进记录
    IPage summarizeFollowUpModeRecords(DataAnalysisDTO dto);

    // 汇总跟进记录
    UserFollowUpCountVO summarizeFollowUpTypeVo(DataAnalysisDTO dto);

    // 汇总跟进记录
    UserFollowUpModeCountVO summarizeFollowUpModeVo(DataAnalysisDTO dto);

    /**
     * 业务综合统计
     * @param dto
     * @return
     */
    List<SalesDataGrowCountVO>  countBusinessSummaryTotal(DataAnalysisDTO dto);
    /**
     * 业务综合统计
     * @param dto
     * @return
     */
    List<SalesBusinessGrowCountVO>  countBusinessIncreaseTotal(DataAnalysisDTO dto);

    // 生成业务综合统计数据
    List<SalesDataGrowCountVO>  generateComprehensiveBusinessStatistics(DataAnalysisDTO dto);

    // 计算业务增长统计数据
    List<SalesBusinessGrowCountVO>  calculateBusinessGrowthStatistics(DataAnalysisDTO dto);

    /**
     * 销售排名Top10
     * @param dto
     * @return
     */
    List<SalesDealRankCountlVO>  selectSalesDealRankTop(DataAnalysisDTO dto);

    /**
     * 销售区域统计
     * @param dto
     * @return
     */
     List<SalesAreaSpreadCountVO> selectSalesAreaSpreadSummary(DataAnalysisDTO dto);

    /**
     * 销售区域统计总数
     * @param dto
     * @return
     */
     SalesAreaSpreadTotalVO selectSalesAreaSpreadTotal(DataAnalysisDTO dto);

}
