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.WmsProductStockMapper;
import com.hw.wms.domain.WmsProductStock;
import com.hw.wms.service.IWmsProductStockService;

/**
 * 成品库存Service业务层处理
 * 
 * @author xs
 * @date 2023-12-20
 */
@Service
public class WmsProductStockServiceImpl implements IWmsProductStockService 
{
    @Autowired
    private WmsProductStockMapper wmsProductStockMapper;

    /**
     * 查询成品库存
     * 
     * @param productStockId 成品库存主键
     * @return 成品库存
     */
    @Override
    public WmsProductStock selectWmsProductStockByProductStockId(Long productStockId)
    {
        return wmsProductStockMapper.selectWmsProductStockByProductStockId(productStockId);
    }

    /**
     * 查询成品库存列表
     * 
     * @param wmsProductStock 成品库存
     * @return 成品库存
     */
    @Override
    public List<WmsProductStock> selectWmsProductStockList(WmsProductStock wmsProductStock)
    {
        return wmsProductStockMapper.selectWmsProductStockList(wmsProductStock);
    }

    /**
     * 新增成品库存
     * 
     * @param wmsProductStock 成品库存
     * @return 结果
     */
    @Override
    public int insertWmsProductStock(WmsProductStock wmsProductStock)
    {
        return wmsProductStockMapper.insertWmsProductStock(wmsProductStock);
    }

    /**
     * 修改成品库存
     * 
     * @param wmsProductStock 成品库存
     * @return 结果
     */
    @Override
    public int updateWmsProductStock(WmsProductStock wmsProductStock)
    {
        return wmsProductStockMapper.updateWmsProductStock(wmsProductStock);
    }

    /**
     * 批量删除成品库存
     * 
     * @param productStockIds 需要删除的成品库存主键
     * @return 结果
     */
    @Override
    public int deleteWmsProductStockByProductStockIds(Long[] productStockIds)
    {
        return wmsProductStockMapper.deleteWmsProductStockByProductStockIds(productStockIds);
    }

    /**
     * 删除成品库存信息
     * 
     * @param productStockId 成品库存主键
     * @return 结果
     */
    @Override
    public int deleteWmsProductStockByProductStockId(Long productStockId)
    {
        return wmsProductStockMapper.deleteWmsProductStockByProductStockId(productStockId);
    }
}
