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.CmcMaterialMapper;
import com.ruoyi.oa.domain.CmcMaterial;
import com.ruoyi.oa.service.ICmcMaterialService;

/**
 * cmc耗材信息Service业务层处理
 * 
 * @author cmc
 * @date 2024-07-31
 */
@Service
public class CmcMaterialServiceImpl implements ICmcMaterialService 
{
    @Autowired
    private CmcMaterialMapper cmcMaterialMapper;

    /**
     * 查询cmc耗材信息
     * 
     * @param materialId cmc耗材信息主键
     * @return cmc耗材信息
     */
    @Override
    public CmcMaterial selectCmcMaterialByMaterialId(Integer materialId)
    {
        return cmcMaterialMapper.selectCmcMaterialByMaterialId(materialId);
    }

    /**
     * 查询cmc耗材信息列表
     * 
     * @param cmcMaterial cmc耗材信息
     * @return cmc耗材信息
     */
    @Override
    public List<CmcMaterial> selectCmcMaterialList(CmcMaterial cmcMaterial)
    {
        return cmcMaterialMapper.selectCmcMaterialList(cmcMaterial);
    }

    /**
     * 新增cmc耗材信息
     * 
     * @param cmcMaterial cmc耗材信息
     * @return 结果
     */
    @Override
    public int insertCmcMaterial(CmcMaterial cmcMaterial)
    {
        return cmcMaterialMapper.insertCmcMaterial(cmcMaterial);
    }

    /**
     * 修改cmc耗材信息
     * 
     * @param cmcMaterial cmc耗材信息
     * @return 结果
     */
    @Override
    public int updateCmcMaterial(CmcMaterial cmcMaterial)
    {
        return cmcMaterialMapper.updateCmcMaterial(cmcMaterial);
    }

    /**
     * 批量删除cmc耗材信息
     * 
     * @param materialIds 需要删除的cmc耗材信息主键
     * @return 结果
     */
    @Override
    public int deleteCmcMaterialByMaterialIds(Integer[] materialIds)
    {
        return cmcMaterialMapper.deleteCmcMaterialByMaterialIds(materialIds);
    }

    /**
     * 删除cmc耗材信息信息
     * 
     * @param materialId cmc耗材信息主键
     * @return 结果
     */
    @Override
    public int deleteCmcMaterialByMaterialId(Integer materialId)
    {
        return cmcMaterialMapper.deleteCmcMaterialByMaterialId(materialId);
    }
}
