package com.maintain.business.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.maintain.business.domain.ErpMaterial;
import com.maintain.business.domain.ErpMaterialPickingInfo;
import com.maintain.business.domain.vo.ErpMaterialPickingInfoVo;
import com.maintain.business.domain.vo.ErpMaterialVo;
import com.maintain.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物资Mapper接口
 *
 * @author liushuai
 * @date 2025-04-03
 */
public interface ErpMaterialMapper extends BaseMapperPlus<ErpMaterialMapper, ErpMaterial, ErpMaterialVo> {

    /**
     * 自定义分页查询(查询存在库存的物料)
     * @param page
     * @param queryWrapper
     * @return
     */
    Page<ErpMaterialVo> customQueryPageList(@Param("page") Page<ErpMaterial> page, @Param(Constants.WRAPPER) Wrapper<ErpMaterial> queryWrapper);


    /**
     * 自定义分页查询(查询全部物料)
     * @param page
     * @param queryWrapper
     * @return
     */
    Page<ErpMaterialVo> customQueryPageListByWarehouseId(@Param("page") Page<ErpMaterial> page, @Param(Constants.WRAPPER) Wrapper<ErpMaterial> queryWrapper, @Param("warehouseId") Long warehouseId);


    /**
     * 根据仓库自定义查询(不分页)
     * @param warehouseId
     * @return
     */
    List<ErpMaterialVo> customQueryListByWarehouseId(@Param("warehouseId") Long warehouseId);

}
