package com.ruoyi.oa.mapper;

import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.oa.domain.SysOaWarehouseDetail;
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
import com.ruoyi.oa.domain.vo.SysOaOutWarehouseListVo;
import com.ruoyi.oa.domain.vo.SysOaWarehouseDetailVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.oa.domain.vo.SysOaWarehouseVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 仓库出库Mapper接口
 *
 * @author liuzongkun999
 * @date 2024-11-02
 */
public interface SysOaWarehouseDetailMapper extends BaseMapperPlus<SysOaWarehouseDetailMapper, SysOaWarehouseDetail, SysOaWarehouseDetailVo> {

    /**
     * 仓库出库筛选(联查)
     */
    List<SysOaOutWarehouseListVo> defineSelectList(@Param(value = "bo") SysOaWarehouseDetailBo bo, @Param(value = "page") PageQuery pageQuery);

    /**
     * 获取分页的Total值
     */
    Long defineQueryTotal(@Param(value = "bo") SysOaWarehouseDetailBo bo, @Param(value = "page") PageQuery pageQuery);


    @Select("select * from sys_oa_warehouse_detail where project_id = #{projectId} and del_flag = 0")
    List<SysOaWarehouseDetail> List(@Param("projectId") Long projectId);

    List<SysOaWarehouseVo> selectRecentOutbound(int limit);
}
