package com.nantian.cloud.jljc.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.jljc.entity.TReportEnergysTructure;
import com.nantian.cloud.jljc.mapper.TReportEnergysTructureMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nantian.cloud.jljc.service.TReportEnergysTructureService;
import com.nantian.cloud.jljc.vo.TReportEnergysTructureVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报表1-2能源消费表 服务实现类
 * @since 2020-09-16
 * @author stz
 */
@Service("tReportEnergysTructureService")
public class TReportEnergysTructureServiceImpl extends ServiceImpl<TReportEnergysTructureMapper, TReportEnergysTructure> implements TReportEnergysTructureService {

    @Override
    public List<TReportEnergysTructure> getTructureByReportId(Long reportId) {
        return baseMapper.getTructureByReportId(reportId);
    }

    @Override
    public List<TReportEnergysTructure> getAllTructureByReportId(Long reportId) {
        return baseMapper.getAllTructureByReportId(reportId);
    }

    @Override
    public List<TReportEnergysTructure> getTructureByReportIdAndName(Long reportId,String name) {
        String[] nameStr = name.split(",");
        return baseMapper.getTructureByReportIdAndName(reportId,nameStr);
    }

    @Override
    public TReportEnergysTructure getSumInfo(Long reportId, String name) {
        return baseMapper.getSumInfo(reportId,name);
    }

    @Override
    public IPage<TReportEnergysTructure> selByPage(Page page, TReportEnergysTructure tReportEnergysTructure) {
        return baseMapper.selByPage(page,tReportEnergysTructure);
    }

    @Override
    public List<String> getEnergyName(Long reportId) {
        return baseMapper.getEnergyName(reportId);
    }
}
