package com.ruoyi.ems.mapper;

import com.ruoyi.ems.domain.AdmEmsElecPgIndex;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

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

/**
 * 电网设施指标Mapper接口
 *
 * @author ruoyi
 * @date 2024-08-30
 */
public interface AdmEmsElecPgIndexMapper {
    /**
     * 查询电网设施指标
     *
     * @param id 电网设施指标主键
     * @return 电网设施指标
     */
    AdmEmsElecPgIndex selectAdmEmsElecPgIndexById(Long id);

    /**
     * 查询电网设施指标列表
     *
     * @param elecPgIndex 电网设施指标
     * @return 电网设施指标集合
     */
    List<AdmEmsElecPgIndex> selectAdmEmsElecPgIndexList(AdmEmsElecPgIndex elecPgIndex);

    /**
     * 新增电网设施指标
     *
     * @param elecPgIndex 电网设施指标
     * @return 结果
     */
    int insertAdmEmsElecPgIndex(AdmEmsElecPgIndex elecPgIndex);

    /**
     * 修改电网设施指标
     *
     * @param elecPgIndex 电网设施指标
     * @return 结果
     */
    int updateAdmEmsElecPgIndex(AdmEmsElecPgIndex elecPgIndex);

    /**
     * 删除电网设施指标
     *
     * @param id 电网设施指标主键
     * @return 结果
     */
    int deleteAdmEmsElecPgIndexById(Long id);

    /**
     * 批量删除电网设施指标
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteAdmEmsElecPgIndexByIds(Long[] ids);

    @MapKey("facsCode")
    Map<String, Map<String, Object>> qryLatestObjIndex(@Param("set") List<String> set);

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

}
