package com.hw.wms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.wms.mapper.WmsRawOutstockDetailMapper;
import com.hw.wms.domain.WmsRawOutstockDetail;
import com.hw.wms.service.IWmsRawOutstockDetailService;

/**
 * 原材料出库记录明细Service业务层处理
 *
 * @author xins
 * @date 2023-12-22
 */
@Service
public class WmsRawOutstockDetailServiceImpl implements IWmsRawOutstockDetailService
{
    @Autowired
    private WmsRawOutstockDetailMapper wmsRawOutstockDetailMapper;

    /**
     * 查询原材料出库记录明细
     *
     * @param rawOutstockDetailId 原材料出库记录明细主键
     * @return 原材料出库记录明细
     */
    @Override
    public WmsRawOutstockDetail selectWmsRawOutstockDetailByRawOutstockDetailId(Long rawOutstockDetailId)
    {
        return wmsRawOutstockDetailMapper.selectWmsRawOutstockDetailByRawOutstockDetailId(rawOutstockDetailId);
    }

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

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

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

    /**
     * 批量删除原材料出库记录明细
     *
     * @param rawOutstockDetailIds 需要删除的原材料出库记录明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsRawOutstockDetailByRawOutstockDetailIds(Long[] rawOutstockDetailIds)
    {
        return wmsRawOutstockDetailMapper.deleteWmsRawOutstockDetailByRawOutstockDetailIds(rawOutstockDetailIds);
    }

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


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

}
