package com.ruoyi.ems.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.ems.domain.EmsObjFlowRel;
import com.ruoyi.ems.mapper.EmsObjFlowRelMapper;
import com.ruoyi.ems.service.IEmsFacsService;
import com.ruoyi.ems.service.IEmsObjFlowRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 能源设施能流关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-10
 */
@Service
public class EmsObjFlowRelServiceImpl implements IEmsObjFlowRelService
{
    @Autowired
    private EmsObjFlowRelMapper flowRelMapper;

    /**
     * 查询能源设施能流关系
     * 
     * @param id 能源设施能流关系主键
     * @return 能源设施能流关系
     */
    @Override
    public EmsObjFlowRel selectFlowRelById(Long id)
    {
        return flowRelMapper.selectFlowRelById(id);
    }

    /**
     * 查询能源设施能流关系列表
     * 
     * @param FlowRel 能源设施能流关系
     * @return 能源设施能流关系
     */
    @Override
    public List<EmsObjFlowRel> selectFlowRelList(EmsObjFlowRel FlowRel)
    {
        return flowRelMapper.selectFlowRelList(FlowRel);
    }

    /**
     * 新增能源设施能流关系
     * 
     * @param FlowRel 能源设施能流关系
     * @return 结果
     */
    @Override
    public int insertFlowRel(EmsObjFlowRel FlowRel)
    {
        FlowRel.setCreateTime(DateUtils.getNowDate());
        return flowRelMapper.insertFlowRel(FlowRel);
    }

    /**
     * 修改能源设施能流关系
     * 
     * @param FlowRel 能源设施能流关系
     * @return 结果
     */
    @Override
    public int updateFlowRel(EmsObjFlowRel FlowRel)
    {
        return flowRelMapper.updateFlowRel(FlowRel);
    }

    /**
     * 批量删除能源设施能流关系
     * 
     * @param ids 需要删除的能源设施能流关系主键
     * @return 结果
     */
    @Override
    public int deleteFlowRelByIds(Long[] ids)
    {
        return flowRelMapper.deleteFlowRelByIds(ids);
    }

    /**
     * 删除能源设施能流关系信息
     * 
     * @param id 能源设施能流关系主键
     * @return 结果
     */
    @Override
    public int deleteFlowRelById(Long id)
    {
        return flowRelMapper.deleteFlowRelById(id);
    }
}
