package com.ruoyi.project.aspen.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.aspen.mapper.TElecdashboardHourMapper;
import com.ruoyi.project.aspen.domain.TElecdashboardHour;
import com.ruoyi.project.aspen.service.ITElecdashboardHourService;

/**
 * 电厂大屏每小时数据Service业务层处理
 *
 * @author ruoyi
 * @date 2022-09-14
 */
@Service
public class TElecdashboardHourServiceImpl implements ITElecdashboardHourService
{
    @Autowired
    private TElecdashboardHourMapper tElecdashboardHourMapper;

    /**
     * 查询电厂大屏每小时数据
     *
     * @param id 电厂大屏每小时数据ID
     * @return 电厂大屏每小时数据
     */
    @Override
    public TElecdashboardHour selectTElecdashboardHourById(Long id)
    {
        return tElecdashboardHourMapper.selectTElecdashboardHourById(id);
    }

    /**
     * 查询电厂大屏每小时数据列表
     *
     * @param tElecdashboardHour 电厂大屏每小时数据
     * @return 电厂大屏每小时数据
     */
    @Override
    public List<TElecdashboardHour> selectTElecdashboardHourList(TElecdashboardHour tElecdashboardHour)
    {
        return tElecdashboardHourMapper.selectTElecdashboardHourList(tElecdashboardHour);
    }

    /**
     * 新增电厂大屏每小时数据
     *
     * @param tElecdashboardHour 电厂大屏每小时数据
     * @return 结果
     */
    @Override
    public int insertTElecdashboardHour(TElecdashboardHour tElecdashboardHour)
    {
        return tElecdashboardHourMapper.insertTElecdashboardHour(tElecdashboardHour);
    }

    /**
     * 修改电厂大屏每小时数据
     *
     * @param tElecdashboardHour 电厂大屏每小时数据
     * @return 结果
     */
    @Override
    public int updateTElecdashboardHour(TElecdashboardHour tElecdashboardHour)
    {
        return tElecdashboardHourMapper.updateTElecdashboardHour(tElecdashboardHour);
    }

    /**
     * 批量删除电厂大屏每小时数据
     *
     * @param ids 需要删除的电厂大屏每小时数据ID
     * @return 结果
     */
    @Override
    public int deleteTElecdashboardHourByIds(Long[] ids)
    {
        return tElecdashboardHourMapper.deleteTElecdashboardHourByIds(ids);
    }

    /**
     * 删除电厂大屏每小时数据信息
     *
     * @param id 电厂大屏每小时数据ID
     * @return 结果
     */
    @Override
    public int deleteTElecdashboardHourById(Long id)
    {
        return tElecdashboardHourMapper.deleteTElecdashboardHourById(id);
    }

    /**
     * 查询日期最靠前的24条电厂大屏每小时数据
     *
     * @return 日期最靠前的24条电厂大屏每小时数据
     */
    @Override
    public List<TElecdashboardHour> selectTElecdashboardHourListLatest24() {
        return tElecdashboardHourMapper.selectTElecdashboardHourListLatest24();
    }
}
