package com.hw.wms.mapper;

import java.util.List;

import com.hw.wms.domain.WmsRawOutstockDetail;
import org.apache.ibatis.annotations.Param;

/**
 * 原材料出库记录明细Mapper接口
 *
 * @author xins
 * @date 2023-12-22
 */
public interface WmsRawOutstockDetailMapper {
    /**
     * 查询原材料出库记录明细
     *
     * @param rawOutstockDetailId 原材料出库记录明细主键
     * @return 原材料出库记录明细
     */
    public WmsRawOutstockDetail selectWmsRawOutstockDetailByRawOutstockDetailId(Long rawOutstockDetailId);

    /**
     * 查询原材料出库记录明细列表
     *
     * @param wmsRawOutstockDetail 原材料出库记录明细
     * @return 原材料出库记录明细集合
     */
    public List<WmsRawOutstockDetail> selectWmsRawOutstockDetailList(WmsRawOutstockDetail wmsRawOutstockDetail);

    /**
     * 新增原材料出库记录明细
     *
     * @param wmsRawOutstockDetail 原材料出库记录明细
     * @return 结果
     */
    public int insertWmsRawOutstockDetail(WmsRawOutstockDetail wmsRawOutstockDetail);

    /**
     * 修改原材料出库记录明细
     *
     * @param wmsRawOutstockDetail 原材料出库记录明细
     * @return 结果
     */
    public int updateWmsRawOutstockDetail(WmsRawOutstockDetail wmsRawOutstockDetail);

    /**
     * 删除原材料出库记录明细
     *
     * @param rawOutstockDetailId 原材料出库记录明细主键
     * @return 结果
     */
    public int deleteWmsRawOutstockDetailByRawOutstockDetailId(Long rawOutstockDetailId);

    /**
     * 批量删除原材料出库记录明细
     *
     * @param rawOutstockDetailIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWmsRawOutstockDetailByRawOutstockDetailIds(Long[] rawOutstockDetailIds);


    /**
     * 查询原材料人工出库记录明细
     *
     * @param rawOutstockId
     * @param locationCode
     * @param materialBarcode
     * @return
     */
    public WmsRawOutstockDetail selectWmsManualRawOutstockDetail(@Param("rawOutstockId") Long rawOutstockId,
                                                                 @Param("locationCode") String locationCode,
                                                                 @Param("materialBarcode")String materialBarcode);


    /**
     * 查询原材料出库记录明细列表(供手持出库使用)
     *
     * @param wmsRawOutstockDetail 原材料出库记录明细
     * @return 原材料出库记录明细集合
     */
    public List<WmsRawOutstockDetail> selectAuditPassRawOutstockDetails(WmsRawOutstockDetail wmsRawOutstockDetail);

}
