package cn.iocoder.yudao.module.system.dal.mysql.biz;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.MaterialOutboundOrderItemDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 物资出库单明细 Mapper
 */
@Mapper
public interface MaterialOutboundOrderItemMapper extends BaseMapperX<MaterialOutboundOrderItemDO> {

    /**
     * 统计一批入库明细（ref_inbound_item_id）在指定时间范围内对应的出库数量之和
     */
    List<Map<String, Object>> selectSumOutQtyByInboundItemIdsAndDate(
            @Param("startDate") LocalDate startDate,
            @Param("endDate") LocalDate endDate,
            @Param("inboundItemIds") Set<Long> inboundItemIds);

}


