package com.ruoyi.ems.service.impl;

import java.util.List;

import com.ruoyi.ems.domain.EmsFacsEvent;
import com.ruoyi.ems.service.IEmsFacsEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.mapper.EmsFacsEventMapper;


/**
 * 能源设施事件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-22
 */
@Service
public class EmsFacsEventServiceImpl implements IEmsFacsEventService
{
    @Autowired
    private EmsFacsEventMapper emsFacsEventMapper;

    /**
     * 查询能源设施事件
     * 
     * @param id 能源设施事件主键
     * @return 能源设施事件
     */
    @Override
    public EmsFacsEvent selectEmsFacsEventById(Long id)
    {
        return emsFacsEventMapper.selectEmsFacsEventById(id);
    }

    /**
     * 查询能源设施事件列表
     * 
     * @param emsFacsEvent 能源设施事件
     * @return 能源设施事件
     */
    @Override
    public List<EmsFacsEvent> selectEmsFacsEventList(EmsFacsEvent emsFacsEvent)
    {
        return emsFacsEventMapper.selectEmsFacsEventList(emsFacsEvent);
    }

    /**
     * 新增能源设施事件
     * 
     * @param emsFacsEvent 能源设施事件
     * @return 结果
     */
    @Override
    public int insertEmsFacsEvent(EmsFacsEvent emsFacsEvent)
    {
        return emsFacsEventMapper.insertEmsFacsEvent(emsFacsEvent);
    }

    @Override
    public int insertEmsFacsEventBatch(List<EmsFacsEvent> emsFacsEvents) {
        return emsFacsEventMapper.insertEmsFacsEventBatch(emsFacsEvents);
    }

    /**
     * 修改能源设施事件
     * 
     * @param emsFacsEvent 能源设施事件
     * @return 结果
     */
    @Override
    public int updateEmsFacsEvent(EmsFacsEvent emsFacsEvent)
    {
        return emsFacsEventMapper.updateEmsFacsEvent(emsFacsEvent);
    }

    /**
     * 批量删除能源设施事件
     * 
     * @param ids 需要删除的能源设施事件主键
     * @return 结果
     */
    @Override
    public int deleteEmsFacsEventByIds(Long[] ids)
    {
        return emsFacsEventMapper.deleteEmsFacsEventByIds(ids);
    }

    /**
     * 删除能源设施事件信息
     * 
     * @param id 能源设施事件主键
     * @return 结果
     */
    @Override
    public int deleteEmsFacsEventById(Long id)
    {
        return emsFacsEventMapper.deleteEmsFacsEventById(id);
    }

    @Override
    public int deleteEventByFacsCode(String facsCode) {
        return emsFacsEventMapper.deleteEmsFacsEventByFacsCode(facsCode);
    }
}
