package org.jeecg.modules.energy.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import lombok.Data;
import org.jeecg.modules.energy.entity.BuElectric;

import java.util.List;

/**
 * @Description: bu_electric
 * @Author: jeecg-boot
 * @Date:   2024-05-09
 * @Version: V1.0
 */
public interface IBuElectricService extends IService<BuElectric> {

//    BuElectric getBySensorId(String tableName,String sensorId);
    List<BuElectric> getBySensorId(String tableName,String sensorId);
    public List<BuElectric> getElectricData();
    public List<BuElectric> getElectricByStatus();

    public void insertElectric(String id,String sensorId,String createTime,Double udy,Double vdy,Double wdy,Double udl,Double vdl,Double wdl, Double eng);

    public BuElectric getYesterdayFirstData(String tableName,String sensorId,String time);
    public BuElectric getYesterdayLastData(String tableName,String sensorId,String time);
    public String getAverage(String tableName,String sensorId,String time);

    IPage<BuElectric> selectByDynamicTable(Page<BuElectric> page, String tableName, String deviceId, String sensorId, String beginTime, String endTime);
    List<BuElectric> selectByDynamicTable( String tableName, String deviceId, String sensorId, String beginTime, String endTime);

}
