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.ElecStoreIndexMapper;
import com.ruoyi.ems.domain.ElecStoreIndex;
import com.ruoyi.ems.service.IElecStoreIndexService;

/**
 * 储能设施指标Service业务层处理
 * 
 * @author ruoyi
 * @date 2026-01-28
 */
@Service
public class ElecStoreIndexServiceImpl implements IElecStoreIndexService 
{
    @Autowired
    private ElecStoreIndexMapper elecStoreIndexMapper;

    /**
     * 查询储能设施指标列表
     * 
     * @param elecStoreIndex 储能设施指标
     * @return 储能设施指标
     */
    @Override
    public List<ElecStoreIndex> selectElecStoreIndexList(ElecStoreIndex elecStoreIndex)
    {
        return elecStoreIndexMapper.selectElecStoreIndexList(elecStoreIndex);
    }

    @Override
    public List<ElecStoreIndex> selectLatestByDevice(ElecStoreIndex elecStoreIndex)
    {
        return elecStoreIndexMapper.selectLatestByDevice(elecStoreIndex);
    }

    /**
     * 新增储能设施指标
     * 
     * @param elecStoreIndex 储能设施指标
     * @return 结果
     */
    @Override
    public int insertElecStoreIndex(ElecStoreIndex elecStoreIndex)
    {
        return elecStoreIndexMapper.insertElecStoreIndex(elecStoreIndex);
    }

    /**
     * 修改储能设施指标
     * 
     * @param elecStoreIndex 储能设施指标
     * @return 结果
     */
    @Override
    public int updateElecStoreIndex(ElecStoreIndex elecStoreIndex)
    {
        return elecStoreIndexMapper.updateElecStoreIndex(elecStoreIndex);
    }

    /**
     * 批量删除储能设施指标
     * 
     * @param ids 需要删除的储能设施指标主键
     * @return 结果
     */
    @Override
    public int deleteElecStoreIndexByIds(Long[] ids)
    {
        return elecStoreIndexMapper.deleteElecStoreIndexByIds(ids);
    }

    /**
     * 删除储能设施指标信息
     * 
     * @param id 储能设施指标主键
     * @return 结果
     */
    @Override
    public int deleteElecStoreIndexById(Long id)
    {
        return elecStoreIndexMapper.deleteElecStoreIndexById(id);
    }
}
