package org.jeecg.modules.device.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.device.entity.BuDeviceRunTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 设备实际运行时间表
 * @Author: jeecg-boot
 * @Date:   2024-06-01
 * @Version: V1.0
 */
public interface BuDeviceRunTimeMapper extends BaseMapper<BuDeviceRunTime> {

    public BuDeviceRunTime getByIdLimit(@Param("deviceId") String deviceId);

    public String getSumPower(@Param("year") int year,@Param("month") int month);
    public String getSumPowerByType(@Param("year") int year,@Param("month") int month,@Param("deviceType") String deviceType);
    public String getSumPowerByDevice(@Param("year") int year,@Param("month") int month,@Param("deviceId") String deviceId);

    public String getSumTime(@Param("year") int year,@Param("month") int month,@Param("day") int day);
    public String getSumTimeByType(@Param("year") int year,@Param("month") int month,@Param("day") int day,@Param("deviceType") String deviceType);
    public String getSumTimeByDevice(@Param("year") int year,@Param("month") int month,@Param("day") int day,@Param("deviceId") String deviceId);
    public Double getPowerByTypeAndId(@Param("date") String date,@Param("deviceType") String deviceType,@Param("deviceId") String deviceId);
    public Integer getSumTimeByTypeAndId(@Param("date") String date,@Param("deviceType") String deviceType,@Param("deviceId") String deviceId);
}
