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

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.industryservice.domain.dto.BreedingIndustryYakSnapshot;
import com.ruoyi.web.modules.industryservice.domain.vo.BreedingIndustryDegradationStatVo;

/**
 * 养殖产业看板聚合查询。
 */
public interface BreedingIndustryStatsMapper
{
    List<Long> selectActivePastureIds();

    int countPastureInScope(@Param("allowedPastureIds") List<Long> allowedPastureIds);

    int countInventory(@Param("allowedPastureIds") List<Long> allowedPastureIds);

    int countBull(@Param("allowedPastureIds") List<Long> allowedPastureIds);

    int countCow(@Param("allowedPastureIds") List<Long> allowedPastureIds);

    int countAnnualOutbound(@Param("allowedPastureIds") List<Long> allowedPastureIds,
            @Param("yearStart") Date yearStart, @Param("statDateEnd") Date statDateEnd);

    int countWarningYak(@Param("allowedPastureIds") List<Long> allowedPastureIds,
            @Param("yearStart") Date yearStart, @Param("statDateEnd") Date statDateEnd);

    List<BreedingIndustryYakSnapshot> selectYakSnapshotsInScope(@Param("allowedPastureIds") List<Long> allowedPastureIds);

    int countGrassland();

    BigDecimal sumGrasslandAreaMu();

    int countAvailableGrassland();

    int countInUseGrassland(@Param("statDate") Date statDate);

    List<BreedingIndustryDegradationStatVo> selectDegradationGroupCounts();
}
