package com.sundot.airport.ledger.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sundot.airport.ledger.domain.LedgerSeizureStats;
import com.sundot.airport.ledger.domain.vo.CountQueryReqVO;
import com.sundot.airport.ledger.domain.vo.CountSeizureSingleQuantityResVO;
import com.sundot.airport.ledger.domain.vo.CountSeizureTotalQuantityResVO;
import com.sundot.airport.ledger.domain.vo.SeizeItemVO;
import com.sundot.airport.ledger.domain.vo.SeizeCategoryQuantityVO;
import com.sundot.airport.ledger.domain.vo.SeizureAreaVO;
import org.apache.ibatis.annotations.Param;

/**
 * 查获违规品统计Mapper接口
 */
public interface LedgerSeizureStatsMapper extends BaseMapper<LedgerSeizureStats> {
    List<LedgerSeizureStats> selectList(LedgerSeizureStats query);

    int updateSyncFlag();

    int countByInspectorAndDateRange(@Param("inspectorName") String inspectorName,
                                     @Param("beginTime") String beginTime,
                                     @Param("endTime") String endTime);

    /**
     * 功能描述：近30天查获数量（总表）
     *
     * @param query 查询参数
     * @return List<CountSeizureQuantityResVO>
     * @method countSeizureTotalQuantity
     * @author PanHu Sun
     * @date 2026/5/20 11:09
     */
    List<CountSeizureTotalQuantityResVO> countSeizureTotalQuantity(CountQueryReqVO query);

    /**
     * 功能描述：近30天查获数量（员工/小组/班组/部门）
     *
     * @param query 查询参数
     * @return List<CountSeizureSingleQuantityResVO>
     * @method countSeizureTotalQuantity
     * @author PanHu Sun
     * @date 2026/5/20 11:09
     */
    List<CountSeizureSingleQuantityResVO> countSeizureSingleQuantity(CountQueryReqVO query);

    /**
     * 功能描述：查获信息展示-列表信息
     *
     * @param query 查询参数
     * @return List<SeizeItemVO>
     * @method statsTimeRangeItem
     * @author PanHu Sun
     * @date 2026/5/20 13:39
     */
    List<SeizeItemVO> statsTimeRangeItem(CountQueryReqVO query);

    /**
     * 功能描述：查获信息展示-总数
     *
     * @param query 查询参数
     * @return Integer
     * @method statsTimeRangeTotal
     * @author PanHu Sun
     * @date 2026/5/20 13:39
     */
    Integer statsTimeRangeTotal(CountQueryReqVO query);

    /**
     * 功能描述：查询时间范围内各违规品类别查获数量
     *
     * @param query 查询参数
     * @return List<SeizeCategoryQuantityVO>
     * @method countSeizeSubjectItemQuantity
     * @author PanHu Sun
     * @date 2026/5/20 14:40
     */
    List<SeizeCategoryQuantityVO> countSeizeSubjectItemQuantity(CountQueryReqVO query);

    /**
     * 功能描述：查获工作区域分布
     *
     * @param query 查询参数
     * @return List<SeizureAreaVO>
     * @method countSeizeAreaQuantity
     * @author PanHu Sun
     * @date 2026/5/20 15:10
     */
    List<SeizureAreaVO> countSeizeAreaQuantity(CountQueryReqVO query);
}
