package com.ruoyi.ems.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.mapper.EmsDeviceRbookMapper;
import com.ruoyi.ems.domain.EmsDeviceRbook;
import com.ruoyi.ems.service.IEmsDeviceRbookService;

/**
 * 设备台账Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-10
 */
@Service
public class EmsDeviceRbookServiceImpl implements IEmsDeviceRbookService
{
    @Autowired
    private EmsDeviceRbookMapper deviceRbookMapper;

    /**
     * 查询设备台账
     * 
     * @param id 设备台账主键
     * @return 设备台账
     */
    @Override
    public EmsDeviceRbook selectDeviceRbookById(Long id)
    {
        return deviceRbookMapper.selectDeviceRbookById(id);
    }

    /**
     * 查询设备台账列表
     * 
     * @param deviceRbook 设备台账
     * @return 设备台账
     */
    @Override
    public List<EmsDeviceRbook> selectDeviceRbookList(EmsDeviceRbook deviceRbook)
    {
        return deviceRbookMapper.selectDeviceRbookList(deviceRbook);
    }

    /**
     * 新增设备台账
     * 
     * @param DeviceRbook 设备台账
     * @return 结果
     */
    @Override
    public int insertDeviceRbook(EmsDeviceRbook deviceRbook)
    {
        return deviceRbookMapper.insertDeviceRbook(deviceRbook);
    }

    /**
     * 修改设备台账
     * 
     * @param DeviceRbook 设备台账
     * @return 结果
     */
    @Override
    public int updateDeviceRbook(EmsDeviceRbook deviceRbook)
    {
        return deviceRbookMapper.updateDeviceRbook(deviceRbook);
    }

    /**
     * 批量删除设备台账
     * 
     * @param ids 需要删除的设备台账主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRbookByIds(Long[] ids)
    {
        return deviceRbookMapper.deleteDeviceRbookByIds(ids);
    }

    /**
     * 删除设备台账信息
     * 
     * @param id 设备台账主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRbookById(Long id)
    {
        return deviceRbookMapper.deleteDeviceRbookById(id);
    }
}
