package com.ruoyi.web.modules.screen.mapper;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.screen.domain.dto.TradeSalesDestinationCountDto;
import com.ruoyi.web.modules.screen.domain.dto.TradeSalesGradeCountDto;
import com.ruoyi.web.modules.screen.domain.dto.TradeSalesMonthTradeDto;
import com.ruoyi.web.modules.screen.domain.dto.TradeSalesOverviewDto;
import com.ruoyi.web.modules.screen.domain.dto.TradeSalesQuoteRawDto;

/**
 * 大屏交易销售统计 Mapper。
 */
public interface TradeSalesScreenMapper
{
    TradeSalesOverviewDto selectTradeOverview(
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    List<TradeSalesMonthTradeDto> selectMonthlyTradeByYear(
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    List<TradeSalesDestinationCountDto> selectSalesDestinationByYear(
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    List<TradeSalesGradeCountDto> selectQualityGradeByYear(
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    long countGradedLinesInYear(
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    List<TradeSalesQuoteRawDto> selectQuotesInWindow(
            @Param("tradeMarketId") Long tradeMarketId,
            @Param("startDate") Date startDate,
            @Param("endDate") Date endDate);

    Long selectTradeMarketIdByName(@Param("marketName") String marketName);

    List<Integer> selectDistinctFinishYears();
}
