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.WmsRawStockMapper;
import com.hw.wms.domain.WmsRawStock;
import com.hw.wms.service.IWmsRawStockService;

/**
 * 原材料库存Service业务层处理
 * 
 * @author xs
 * @date 2023-12-20
 */
@Service
public class WmsRawStockServiceImpl implements IWmsRawStockService 
{
    @Autowired
    private WmsRawStockMapper wmsRawStockMapper;

    /**
     * 查询原材料库存
     * 
     * @param rawStockId 原材料库存主键
     * @return 原材料库存
     */
    @Override
    public WmsRawStock selectWmsRawStockByRawStockId(Long rawStockId)
    {
        return wmsRawStockMapper.selectWmsRawStockByRawStockId(rawStockId);
    }

    /**
     * 查询原材料库存列表
     * 
     * @param wmsRawStock 原材料库存
     * @return 原材料库存
     */
    @Override
    public List<WmsRawStock> selectWmsRawStockList(WmsRawStock wmsRawStock)
    {
        return wmsRawStockMapper.selectWmsRawStockList(wmsRawStock);
    }

    /**
     * 新增原材料库存
     * 
     * @param wmsRawStock 原材料库存
     * @return 结果
     */
    @Override
    public int insertWmsRawStock(WmsRawStock wmsRawStock)
    {
        return wmsRawStockMapper.insertWmsRawStock(wmsRawStock);
    }

    /**
     * 修改原材料库存
     * 
     * @param wmsRawStock 原材料库存
     * @return 结果
     */
    @Override
    public int updateWmsRawStock(WmsRawStock wmsRawStock)
    {
        return wmsRawStockMapper.updateWmsRawStock(wmsRawStock);
    }

    /**
     * 批量删除原材料库存
     * 
     * @param rawStockIds 需要删除的原材料库存主键
     * @return 结果
     */
    @Override
    public int deleteWmsRawStockByRawStockIds(Long[] rawStockIds)
    {
        return wmsRawStockMapper.deleteWmsRawStockByRawStockIds(rawStockIds);
    }

    /**
     * 删除原材料库存信息
     * 
     * @param rawStockId 原材料库存主键
     * @return 结果
     */
    @Override
    public int deleteWmsRawStockByRawStockId(Long rawStockId)
    {
        return wmsRawStockMapper.deleteWmsRawStockByRawStockId(rawStockId);
    }
}
