package com.ruoyi.ems.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.mapper.CaEmissionForecastMapper;
import com.ruoyi.ems.domain.CaEmissionForecast;
import com.ruoyi.ems.service.ICaEmissionForecastService;

/**
 * 碳排放预测Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-12
 */
@Service
public class CaEmissionForecastServiceImpl implements ICaEmissionForecastService
{
    @Autowired
    private CaEmissionForecastMapper caEmissionForecastMapper;

    /**
     * 查询碳排放预测
     * 
     * @param id 碳排放预测主键
     * @return 碳排放预测
     */
    @Override
    public CaEmissionForecast selectCaEmissionForecastById(Long id)
    {
        return caEmissionForecastMapper.selectCaEmissionForecastById(id);
    }

    /**
     * 查询碳排放预测列表
     * 
     * @param admEmsCaEmissionForecast 碳排放预测
     * @return 碳排放预测
     */
    @Override
    public List<CaEmissionForecast> selectCaEmissionForecastList(CaEmissionForecast admEmsCaEmissionForecast)
    {
        return caEmissionForecastMapper.selectCaEmissionForecastList(admEmsCaEmissionForecast);
    }

    /**
     * 新增碳排放预测
     * 
     * @param admEmsCaEmissionForecast 碳排放预测
     * @return 结果
     */
    @Override
    public int insertCaEmissionForecast(CaEmissionForecast admEmsCaEmissionForecast)
    {
        return caEmissionForecastMapper.insertCaEmissionForecast(admEmsCaEmissionForecast);
    }

    /**
     * 修改碳排放预测
     * 
     * @param admEmsCaEmissionForecast 碳排放预测
     * @return 结果
     */
    @Override
    public int updateCaEmissionForecast(CaEmissionForecast admEmsCaEmissionForecast)
    {
        return caEmissionForecastMapper.updateCaEmissionForecast(admEmsCaEmissionForecast);
    }

    /**
     * 批量删除碳排放预测
     * 
     * @param ids 需要删除的碳排放预测主键
     * @return 结果
     */
    @Override
    public int deleteCaEmissionForecastByIds(Long[] ids)
    {
        return caEmissionForecastMapper.deleteCaEmissionForecastByIds(ids);
    }

    /**
     * 删除碳排放预测信息
     * 
     * @param id 碳排放预测主键
     * @return 结果
     */
    @Override
    public int deleteCaEmissionForecastById(Long id)
    {
        return caEmissionForecastMapper.deleteCaEmissionForecastById(id);
    }
}
