package com.ruoyi.ems.service.impl;

import com.ruoyi.ems.domain.ElecProdForecast;
import com.ruoyi.ems.mapper.ElecProdForecastMapper;
import com.ruoyi.ems.service.IElecProdForecastService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 电力产能预测Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-12
 */
@Service
public class ElecProdForecastServiceImpl implements IElecProdForecastService {
    @Autowired
    private ElecProdForecastMapper admEmsElecProdForecastMapper;

    /**
     * 查询电力产能预测
     *
     * @param id 电力产能预测主键
     * @return 电力产能预测
     */
    @Override
    public ElecProdForecast selectElecProdForecastById(Long id) {
        return admEmsElecProdForecastMapper.selectElecProdForecastById(id);
    }

    /**
     * 查询电力产能预测列表
     *
     * @param admEmsElecProdForecast 电力产能预测
     * @return 电力产能预测
     */
    @Override
    public List<ElecProdForecast> selectElecProdForecastList(ElecProdForecast admEmsElecProdForecast) {
        return admEmsElecProdForecastMapper.selectElecProdForecastList(admEmsElecProdForecast);
    }

    /**
     * 新增电力产能预测
     *
     * @param admEmsElecProdForecast 电力产能预测
     * @return 结果
     */
    @Override
    public int insertElecProdForecast(ElecProdForecast admEmsElecProdForecast) {
        return admEmsElecProdForecastMapper.insertElecProdForecast(admEmsElecProdForecast);
    }

    /**
     * 修改电力产能预测
     *
     * @param admEmsElecProdForecast 电力产能预测
     * @return 结果
     */
    @Override
    public int updateElecProdForecast(ElecProdForecast admEmsElecProdForecast) {
        return admEmsElecProdForecastMapper.updateElecProdForecast(admEmsElecProdForecast);
    }

    /**
     * 批量删除电力产能预测
     *
     * @param ids 需要删除的电力产能预测主键
     * @return 结果
     */
    @Override
    public int deleteElecProdForecastByIds(Long[] ids) {
        return admEmsElecProdForecastMapper.deleteElecProdForecastByIds(ids);
    }

    /**
     * 删除电力产能预测信息
     *
     * @param id 电力产能预测主键
     * @return 结果
     */
    @Override
    public int deleteElecProdForecastById(Long id) {
        return admEmsElecProdForecastMapper.deleteElecProdForecastById(id);
    }

    @Override
    public List<ElecProdForecast> calcElecProdForecastDateRange(ElecProdForecast elecProdForecast) {
        return admEmsElecProdForecastMapper.calcElecProdForecastDateRange(elecProdForecast);
    }
}
