package com.ruoyi.ems.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import com.ruoyi.ems.domain.ElecUseH;

/**
 * 用能计量-小时Mapper接口
 *
 * @author ruoyi
 * @date 2024-08-15
 */
public interface ElecUseHMapper
{
    /**
     * 查询用能计量-小时
     *
     * @param id 用能计量-小时主键
     * @return 用能计量-小时
     */
     ElecUseH selectElecUseHById(Long id);

    /**
     * 查询用能计量-小时列表
     *
     * @param elecUseH 用能计量-小时
     * @return 用能计量-小时集合
     */
     List<ElecUseH> selectElecUseHList(ElecUseH elecUseH);

    /**
     * 新增用能计量-小时
     *
     * @param elecUseH 用能计量-小时
     * @return 结果
     */
     int insertElecUseH(ElecUseH elecUseH);

    /**
     * 修改用能计量-小时
     *
     * @param elecUseH 用能计量-小时
     * @return 结果
     */
     int updateElecUseH(ElecUseH elecUseH);

    /**
     * 删除用能计量-小时
     *
     * @param id 用能计量-小时主键
     * @return 结果
     */
     int deleteElecUseHById(Long id);

    /**
     * 批量删除用能计量-小时
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
     int deleteElecUseHByIds(Long[] ids);

    List<Map<String, Object>> selectElecUseHByMonth(@Param("areaCode") String areaCode, @Param("date") String date);

    @MapKey("areaCode")
    Map<String, Object> selectThisDayElecUse(@Param("areaCode") String areaCode, @Param("date") String date);

    List<Map<String, Object>> selectMonthElecUse(@Param("areaCode") String areaCode, @Param("date") String date);

    List<Map<String, Object>> selectThisDayFacsTypeElecUse(@Param("areaCode") String areaCode, @Param("date") String date);
}
