using Hotline.CallCenter.Calls;
using Hotline.Share.Dtos;
using Hotline.Share.Dtos.CallCenter;
using Hotline.Share.Dtos.Order;
using Hotline.Share.Dtos.TrCallCenter;
using Hotline.Share.Requests;
using SqlSugar;

namespace Hotline.Application.StatisticalReport
{
    public interface ICallReportApplication
    {
        Task<List<BiCallDto>> QueryCallsAsync(BiQueryCallsDto dto, CancellationToken cancellationToken);

        /// <summary>
        /// 话务日期明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QueryCallsDetailDto>> QueryCallsDetailAsync(BiQueryCallsDto dto);

        /// <summary>
        /// 话务日期明细-呼入总量/接通总量
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<(int, List<CallRecordOutDto>)> QueryCallsDetailInTotalAsync(BiQueryCallsDto dto, bool isAll);

        /// <summary>
        /// 坐席话务统计分析明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<(int, List<CallRecordOutDto>)> QuerySeatCallsListAsync(BiQueryCallsListDto dto, bool isAll);

        /// <summary>
        /// 坐席话务统计分析
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<BiSeatCallsDto>> QuerySeatCallAsync(ReportRequiredPagedRequest dto, CancellationToken cancellationToken);

        Task<List<QueryCallsDetailDto>> QueryCallsHourDetailAsync(BiQueryCallsDto dto, CancellationToken cancellationToken);
        Task<(int, List<BiSeatSwitchDto>)> QuerySeatSwitchAsync(QuerySeatSwitchRequest dto, bool isAll, CancellationToken cancellationToken);
        Task<List<TrCallHourDto>> GetCallHourListAsync(BiQueryHourCallDto dto, CancellationToken cancellationToken);
        Task<TotalData<BiSeatSwitchDto>> GetCallListAsync(QueryCallListDto dto, CancellationToken cancellationToken);
        Task<List<CallHotLineDto>> GetCallHotLineListAsync(BiQueryGateWayDto dto, CancellationToken cancellationToken);
        Task<List<QueryCallsDetailStatistics>> QueryCallsDetailStatisticsAsync(StartEndTimeDto dto, CancellationToken cancellationToken);

        /// <summary>
        /// 话务日期统计详情
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<(int, List<QueryCallsStatisticsDetailOutDto>)> QueryCallsStatisticsDetailAsync(QueryCallsStatisticsDetailInDto dto, CancellationToken cancellationToken);
        // Task<PagedDto<TrCallDto>> GetCallDetailListAsync(GetCallListDto dto, CancellationToken cancellationToken);


        /// <summary>
        /// 话务日期统计明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QueryCallDateStatisticsDetailResp>> QueryCallDateStatisticsDetail(QueryCallDateStatisticsDetailDto dto);

        /// <summary>
        /// 个人服务话务明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QueryPersonCallDateStatisticsDetailResp>> QueryPersonCallDateStatisticsDetail(QueryCallDateStatisticsDetailDto dto);

        /// <summary>
        /// 企业服务话务明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QueryEnterpriseCallDateStatisticsDetailResp>> QueryEnterpriseCallDateStatisticsDetail(QueryCallDateStatisticsDetailDto dto);

        /// <summary>
        /// 高效服务话务明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QueryGaoXiaoCallDateStatisticsDetailResp>> QueryGaoXiaoCallDateStatisticsDetail(QueryCallDateStatisticsDetailDto dto);

        /// <summary>
        /// 呼出话务统计明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QueryCallOutDateStatisticsDetailResp>> QueryCallOutDateStatisticsDetail(QueryCallDateStatisticsDetailDto dto, List<string> enterpriseTels);

        /// <summary>
        /// 坐席月接通率统计
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<List<QuerySeatMonthCallResp>> QuerySeatMonthCall(QuerySeatMonthCallRequest dto);

        /// <summary>
        /// 坐席月接通明细
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        ISugarQueryable<QuerySeatMonthCallDetailResp> QuerySeatMonthCallDetail(QuerySeatMonthCallDetailRequest dto);
    }
}
