package com.nantian.cloud.jljc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.jljc.entity.EnergyInfo;
import com.nantian.cloud.jljc.vo.EnergyInfoTreeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 能源信息 Mapper 接口
 * </p>
 *
 * @author stz
 * @since 2020-08-05
 */
@Mapper
public interface EnergyInfoMapper extends BaseMapper<EnergyInfo> {

    //根据字符串获取信息
    List<EnergyInfo> getInfoByStr(@Param("list") String[] list);

    List<EnergyInfoTreeVo> getEnergyInfoTree();

    //IPage<EnergyInfo> getPageScope(Page page,@Param("query") EnergyInfo energyInfo, DataScope dataScope);
    IPage<EnergyInfo> getPageScope(Page page,@Param("query") EnergyInfo energyInfo);

    //获取所有pid的能源编码信息
    List<String> getCodeByPid();

    //获取所有能源和下级能源
    List<EnergyInfo> energyListAndChild();
    //获取所有能源code
    List<EnergyInfo> energyCodeList();

    List<Map<String, Object>> getEnergyInfoList();

    List<EnergyInfo> getEnergyInfoByReportSetting(@Param("list") List<EnergyInfo> infoList);
}
