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.WmsRawReturnDetailMapper;
import com.hw.wms.domain.WmsRawReturnDetail;
import com.hw.wms.service.IWmsRawReturnDetailService;

/**
 * 原材料退库记录明细Service业务层处理
 * 
 * @author xins
 * @date 2023-12-22
 */
@Service
public class WmsRawReturnDetailServiceImpl implements IWmsRawReturnDetailService 
{
    @Autowired
    private WmsRawReturnDetailMapper wmsRawReturnDetailMapper;

    /**
     * 查询原材料退库记录明细
     * 
     * @param rawReturnDetailId 原材料退库记录明细主键
     * @return 原材料退库记录明细
     */
    @Override
    public WmsRawReturnDetail selectWmsRawReturnDetailByRawReturnDetailId(Long rawReturnDetailId)
    {
        return wmsRawReturnDetailMapper.selectWmsRawReturnDetailByRawReturnDetailId(rawReturnDetailId);
    }

    /**
     * 查询原材料退库记录明细列表
     * 
     * @param wmsRawReturnDetail 原材料退库记录明细
     * @return 原材料退库记录明细
     */
    @Override
    public List<WmsRawReturnDetail> selectWmsRawReturnDetailList(WmsRawReturnDetail wmsRawReturnDetail)
    {
        return wmsRawReturnDetailMapper.selectWmsRawReturnDetailList(wmsRawReturnDetail);
    }

    /**
     * 新增原材料退库记录明细
     * 
     * @param wmsRawReturnDetail 原材料退库记录明细
     * @return 结果
     */
    @Override
    public int insertWmsRawReturnDetail(WmsRawReturnDetail wmsRawReturnDetail)
    {
        return wmsRawReturnDetailMapper.insertWmsRawReturnDetail(wmsRawReturnDetail);
    }

    /**
     * 修改原材料退库记录明细
     * 
     * @param wmsRawReturnDetail 原材料退库记录明细
     * @return 结果
     */
    @Override
    public int updateWmsRawReturnDetail(WmsRawReturnDetail wmsRawReturnDetail)
    {
        return wmsRawReturnDetailMapper.updateWmsRawReturnDetail(wmsRawReturnDetail);
    }

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

    /**
     * 删除原材料退库记录明细信息
     * 
     * @param rawReturnDetailId 原材料退库记录明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsRawReturnDetailByRawReturnDetailId(Long rawReturnDetailId)
    {
        return wmsRawReturnDetailMapper.deleteWmsRawReturnDetailByRawReturnDetailId(rawReturnDetailId);
    }
}
