package org.jeecg.modules.sensor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.energy.entity.BuElectric;
import org.jeecg.modules.sensor.entity.BuSensorDeviceData;
import org.jeecg.modules.sensor.model.SensorDataHourStatistics;
import org.jeecg.modules.sensor.model.SensorDataStatistics;
import org.jeecg.modules.sensor.model.TableNameStatistics;

import java.util.List;

/**
 * @Description: 设备传感器数据表
 * @Author: jeecg-boot
 * @Date:   2021-02-07
 * @Version: V1.0
 */
public interface IBuSensorDeviceDataService extends IService<BuSensorDeviceData> {

    public List<SensorDataStatistics> timeDataStatistics(String beginTime, String endTime,
                                                         String deviceId, List<String> result, String sensorId);

//    public List<SensorDataStatistics> dayDataStatistics(String time,String deviceId, List<String> result);
//    public List<SensorDataHourStatistics> hourDataStatistics(String time, String deviceId, List<String> result);

    public List<TableNameStatistics> getNameValue(String sensorId,String deviceId);

    public List<SensorDataHourStatistics> getDataValue(String sensorId,String deviceId);

    public List<String> getSelectTimes(String beginTime,String endTime);

    public List<String> getSelectTime(String node,String beginTime,String endTime);

    public List<BuSensorDeviceData> getTestData(String tableName,String sensorId,String beginTime,String endTime);
    public List<BuSensorDeviceData> getOnlineTestData(String tableName,String sensorId);
    public List<BuSensorDeviceData> getTimeData(String tableName,String sensorId,String  year,String month);
    public List<BuSensorDeviceData> getAllTimeData(String sensorId,String  year,String month);
    public List<BuSensorDeviceData> getCalendarData(String  year,String month);
    public List<BuSensorDeviceData> getTestDatas(String node,String time);

    public BuElectric getLastVoltage(String tableName, String sensorId);
    public BuSensorDeviceData getLastVoltages(String tableName,String ip);

    public BuSensorDeviceData getUByTime(String time);
    public BuSensorDeviceData getIByTime(String time);

    List<BuSensorDeviceData> getCustomFieldData(String tableName, String fields, String id, String beginTime, String endTime);


//    public List<BuSensorDeviceData> getChartSelect(String ip,String tableName,String beginTime,String endTime);

}
