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

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.screen.domain.dto.HomeScreenAppointmentStatDto;
import com.ruoyi.web.modules.screen.domain.dto.HomeScreenMonthCountDto;
import com.ruoyi.web.modules.screen.domain.dto.HomeScreenSubsidyTypeSumDto;
import com.ruoyi.web.modules.screen.domain.dto.HomeScreenTrainingMonthDto;

/**
 * 大屏首页聚合查询。
 */
public interface HomeScreenStatsMapper
{
    int countSupplierForScreen();

    int countDistributorForScreen();

    int countTradeMarketForScreen();

    List<HomeScreenMonthCountDto> selectOutboundCountByMonth(
            @Param("allowedPastureIds") List<Long> allowedPastureIds,
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    List<HomeScreenAppointmentStatDto> selectAppointmentAnnualByYear(@Param("statYear") int statYear);

    List<HomeScreenAppointmentStatDto> selectAppointmentMonthlyByYear(@Param("statYear") int statYear);

    List<HomeScreenSubsidyTypeSumDto> sumSubsidyAmountByTypeForYear(
            @Param("yearStart") Date yearStart,
            @Param("yearEnd") Date yearEnd);

    int countSubsidyGrantInYear(@Param("yearStart") Date yearStart, @Param("yearEnd") Date yearEnd);

    int countVideoCoursesPublishedInYear(@Param("yearStart") Date yearStart, @Param("yearEnd") Date yearEnd);

    int countTrainingsPublishedInYear(@Param("yearStart") Date yearStart, @Param("yearEnd") Date yearEnd);

    List<HomeScreenTrainingMonthDto> selectTrainingTrendByTrainingYear(@Param("statYear") int statYear);

    int countPublishedTrainingsWithTrainingTimeInYear(@Param("statYear") int statYear);

    List<Integer> selectDistinctOutboundYears();

    List<Integer> selectDistinctAppointmentYears();

    List<Integer> selectDistinctSubsidyYears();

    List<Integer> selectDistinctStandardCreateYears();

    List<Integer> selectDistinctTechPublishYears();

    List<Integer> selectDistinctTrainingYears();
}
