package com.ruoyi.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcMaterialBuyMapper;
import com.ruoyi.oa.domain.CmcMaterialBuy;
import com.ruoyi.oa.service.ICmcMaterialBuyService;

/**
 * cmc耗材购买Service业务层处理
 * 
 * @author cmc
 * @date 2024-07-31
 */
@Service
public class CmcMaterialBuyServiceImpl implements ICmcMaterialBuyService 
{
    @Autowired
    private CmcMaterialBuyMapper cmcMaterialBuyMapper;

    /**
     * 查询cmc耗材购买
     * 
     * @param buyId cmc耗材购买主键
     * @return cmc耗材购买
     */
    @Override
    public CmcMaterialBuy selectCmcMaterialBuyByBuyId(Integer buyId)
    {
        return cmcMaterialBuyMapper.selectCmcMaterialBuyByBuyId(buyId);
    }

    /**
     * 查询cmc耗材购买列表
     * 
     * @param cmcMaterialBuy cmc耗材购买
     * @return cmc耗材购买
     */
    @Override
    public List<CmcMaterialBuy> selectCmcMaterialBuyList(CmcMaterialBuy cmcMaterialBuy)
    {
        return cmcMaterialBuyMapper.selectCmcMaterialBuyList(cmcMaterialBuy);
    }

    /**
     * 新增cmc耗材购买
     * 
     * @param cmcMaterialBuy cmc耗材购买
     * @return 结果
     */
    @Override
    public int insertCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy)
    {
        return cmcMaterialBuyMapper.insertCmcMaterialBuy(cmcMaterialBuy);
    }

    /**
     * 修改cmc耗材购买
     * 
     * @param cmcMaterialBuy cmc耗材购买
     * @return 结果
     */
    @Override
    public int updateCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy)
    {
        return cmcMaterialBuyMapper.updateCmcMaterialBuy(cmcMaterialBuy);
    }

    /**
     * 批量删除cmc耗材购买
     * 
     * @param buyIds 需要删除的cmc耗材购买主键
     * @return 结果
     */
    @Override
    public int deleteCmcMaterialBuyByBuyIds(Integer[] buyIds)
    {
        return cmcMaterialBuyMapper.deleteCmcMaterialBuyByBuyIds(buyIds);
    }

    /**
     * 删除cmc耗材购买信息
     * 
     * @param buyId cmc耗材购买主键
     * @return 结果
     */
    @Override
    public int deleteCmcMaterialBuyByBuyId(Integer buyId)
    {
        return cmcMaterialBuyMapper.deleteCmcMaterialBuyByBuyId(buyId);
    }
}
