package com.storlead.sales.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.storlead.framework.mybatis.mapper.MyBaseMapper;
import com.storlead.sales.pojo.dto.report.DataAnalysisDTO;
import com.storlead.sales.pojo.vo.report.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SalesAnalysisReportMapper  extends MyBaseMapper {
    /**
     * 跟进资源类型汇总
     * @param page
     * @param dto
     * @return
     */
    List<UserFollowUpCountVO> countBusFollowUpByResourceType(IPage<UserFollowUpCountVO> page, @Param("query") DataAnalysisDTO dto);
    /**
     * 跟进类型汇总
     * @param page
     * @param dto
     * @return
     */
    List<UserFollowUpModeCountVO> countBusFollowUpByFollowType(IPage<UserFollowUpModeCountVO> page, @Param("query") DataAnalysisDTO dto);


    List<SalesDataGrowCountVO> selectBusinessOrderCustomerWhere(@Param("query") DataAnalysisDTO dto);


    UserFollowUpCountVO countBusFollowUpByResourceTypeVo(@Param("query") DataAnalysisDTO dto);

    UserFollowUpModeCountVO countBusFollowUpByFollowTypeVo(@Param("query") DataAnalysisDTO dto);

    /**
     * 业务综合统计
     * @param page
     * @param dto
     * @return
     */
    List<SalesDataGrowCountVO> countBusinessSummaryTotal(@Param("query") DataAnalysisDTO dto);

    /**
     * 业务增长统计
     * @param page
     * @param dto
     * @return
     */
    List<SalesBusinessGrowCountVO> calculateBusinessGrowthStatistics(@Param("query") DataAnalysisDTO dto);

    /**
     * 客户成交TOP 10
     * @param dto
     * @return
     */
    List<SalesDealRankCountlVO> selectSalesDealRankTop(@Param("query") DataAnalysisDTO dto);

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


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