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.CmcBudgetDeviceMapper;
import com.ruoyi.oa.domain.CmcBudgetDevice;
import com.ruoyi.oa.service.ICmcBudgetDeviceService;

/**
 * cmc设备预算Service业务层处理
 * 
 * @author cmc
 * @date 2024-03-22
 */
@Service
public class CmcBudgetDeviceServiceImpl implements ICmcBudgetDeviceService 
{
    @Autowired
    private CmcBudgetDeviceMapper cmcBudgetDeviceMapper;

    /**
     * 查询cmc设备预算
     * 
     * @param budgetId cmc预算id
     * @return cmc设备预算
     */
    @Override
    public List<CmcBudgetDevice> selectCmcBudgetDeviceByBudgetId(String budgetId)
    {
        return cmcBudgetDeviceMapper.selectCmcBudgetDeviceByBudgetId(budgetId);
    }

    /**
     * 查询cmc设备预算列表
     * 
     * @param cmcBudgetDevice cmc设备预算
     * @return cmc设备预算
     */
    @Override
    public List<CmcBudgetDevice> selectCmcBudgetDeviceList(CmcBudgetDevice cmcBudgetDevice)
    {
        return cmcBudgetDeviceMapper.selectCmcBudgetDeviceList(cmcBudgetDevice);
    }

    /**
     * 新增cmc设备预算
     * 
     * @param cmcBudgetDevice cmc设备预算
     * @return 结果
     */
    @Override
    public int insertCmcBudgetDevice(CmcBudgetDevice cmcBudgetDevice)
    {
        return cmcBudgetDeviceMapper.insertCmcBudgetDevice(cmcBudgetDevice);
    }

    /**
     * 修改cmc设备预算
     * 
     * @param cmcBudgetDevice cmc设备预算
     * @return 结果
     */
    @Override
    public int updateCmcBudgetDevice(CmcBudgetDevice cmcBudgetDevice)
    {
        return cmcBudgetDeviceMapper.updateCmcBudgetDevice(cmcBudgetDevice);
    }

    /**
     * 批量删除cmc设备预算
     * 
     * @param budgetIds 需要删除的cmc设备预算主键
     * @return 结果
     */
    @Override
    public int deleteCmcBudgetDeviceByBudgetIds(String[] budgetIds)
    {
        return cmcBudgetDeviceMapper.deleteCmcBudgetDeviceByBudgetIds(budgetIds);
    }

    /**
     * 删除cmc设备预算信息
     * 
     * @param budgetId cmc设备预算主键
     * @return 结果
     */
    @Override
    public int deleteCmcBudgetDeviceByBudgetId(String budgetId)
    {
        return cmcBudgetDeviceMapper.deleteCmcBudgetDeviceByBudgetId(budgetId);
    }
}
