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.EmsEcoDMapper;
import com.ruoyi.ems.domain.EmsEcoD;
import com.ruoyi.ems.service.IEmsEcoDService;

/**
 * 节能计量日Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class EmsEcoDServiceImpl implements IEmsEcoDService
{
    @Autowired
    private EmsEcoDMapper emsEcoDMapper;

    /**
     * 查询节能计量日
     * 
     * @param id 节能计量日主键
     * @return 节能计量日
     */
    @Override
    public EmsEcoD selectEmsEcoDById(Long id)
    {
        return emsEcoDMapper.selectEmsEcoDById(id);
    }

    /**
     * 查询节能计量日列表
     * 
     * @param emsEcoD 节能计量日
     * @return 节能计量日
     */
    @Override
    public List<EmsEcoD> selectEmsEcoDList(EmsEcoD emsEcoD)
    {
        return emsEcoDMapper.selectEmsEcoDList(emsEcoD);
    }

    /**
     * 新增节能计量日
     * 
     * @param emsEcoD 节能计量日
     * @return 结果
     */
    @Override
    public int insertEmsEcoD(EmsEcoD emsEcoD)
    {
        return emsEcoDMapper.insertEmsEcoD(emsEcoD);
    }

    /**
     * 修改节能计量日
     * 
     * @param emsEcoD 节能计量日
     * @return 结果
     */
    @Override
    public int updateEmsEcoD(EmsEcoD emsEcoD)
    {
        return emsEcoDMapper.updateEmsEcoD(emsEcoD);
    }

    /**
     * 批量删除节能计量日
     * 
     * @param ids 需要删除的节能计量日主键
     * @return 结果
     */
    @Override
    public int deleteEmsEcoDByIds(Long[] ids)
    {
        return emsEcoDMapper.deleteEmsEcoDByIds(ids);
    }

    /**
     * 删除节能计量日信息
     * 
     * @param id 节能计量日主键
     * @return 结果
     */
    @Override
    public int deleteEmsEcoDById(Long id)
    {
        return emsEcoDMapper.deleteEmsEcoDById(id);
    }

    @Override
    public EmsEcoD calcEmsEcoDateRange(EmsEcoD emsEcoD){
        return emsEcoDMapper.calcEmsEcoDateRange(emsEcoD);
    }
}
