package com.ruoyi.oa.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcDeviceMapper;
import com.ruoyi.oa.domain.CmcDevice;
import com.ruoyi.oa.service.ICmcDeviceService;

/**
 * cmc设备信息Service业务层处理
 * 
 * @author cmc
 * @date 2024-03-05
 */
@Service
public class CmcDeviceServiceImpl implements ICmcDeviceService 
{
    @Autowired
    private CmcDeviceMapper cmcDeviceMapper;

    /**
     * 查询cmc设备信息
     * 
     * @param deviceId cmc设备信息主键
     * @return cmc设备信息
     */
    @Override
    public CmcDevice selectCmcDeviceByDeviceId(Integer deviceId)
    {
        return cmcDeviceMapper.selectCmcDeviceByDeviceId(deviceId);
    }

    /**
     * 查询cmc设备信息列表
     * 
     * @param cmcDevice cmc设备信息
     * @return cmc设备信息
     */
    @Override
    public List<CmcDevice> selectCmcDeviceList(CmcDevice cmcDevice)
    {
        return cmcDeviceMapper.selectCmcDeviceList(cmcDevice);
    }

    /**
     * 查询cmc设备名称集合
     *
     * @return cmc设备名称集合
     */
    public List<Map<String,Object>> selectCmcDeviceNameList()
    {
        return cmcDeviceMapper.selectCmcDeviceNameList();
    }

    /**
     * 新增cmc设备信息
     * 
     * @param cmcDevice cmc设备信息
     * @return 结果
     */
    @Override
    public int insertCmcDevice(CmcDevice cmcDevice)
    {
        return cmcDeviceMapper.insertCmcDevice(cmcDevice);
    }

    /**
     * 修改cmc设备信息
     * 
     * @param cmcDevice cmc设备信息
     * @return 结果
     */
    @Override
    public int updateCmcDevice(CmcDevice cmcDevice)
    {
        return cmcDeviceMapper.updateCmcDevice(cmcDevice);
    }

    /**
     * 批量删除cmc设备信息
     * 
     * @param deviceIds 需要删除的cmc设备信息主键
     * @return 结果
     */
    @Override
    public int deleteCmcDeviceByDeviceIds(Long[] deviceIds)
    {
        return cmcDeviceMapper.deleteCmcDeviceByDeviceIds(deviceIds);
    }

    /**
     * 删除cmc设备信息信息
     * 
     * @param deviceId cmc设备信息主键
     * @return 结果
     */
    @Override
    public int deleteCmcDeviceByDeviceId(Long deviceId)
    {
        return cmcDeviceMapper.deleteCmcDeviceByDeviceId(deviceId);
    }
}
