package com.gyee.runeconomy.mapper.auto;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gyee.runeconomy.model.auto.ProEconEquipmentInfoDay5;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 三率 Mapper 接口
 * </p>
 *
 * @author shilin
 * @since 2022-11-01
 */
public interface ProEconEquipmentInfoDay5Mapper extends BaseMapper<ProEconEquipmentInfoDay5> {


    @Select(" select windpowerstation_id," +
            "sum(TIMERATE20) TIMERATE20," +
            "sum(TIMERATE16) TIMERATE16," +
            "sum(TIMERATE17) TIMERATE17," +
            "sum(TIMERATE18) TIMERATE18," +
            "sum(TIMERATE19) TIMERATE19 " +
            "from pro_econ_equipment_info_day5 where " +
            "record_date>= #{beginDate} and record_date<= #{endDate}" +
            " group by windpowerstation_id ")
    List<ProEconEquipmentInfoDay5> selectResetTimelyRateList(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);


    @Select(" select windpowerstation_id," +
            " sum(TIMERATE13) TIMERATE13,sum(TIMERATE1) TIMERATE1,sum(TIMERATE2) TIMERATE2,sum(TIMERATE3) TIMERATE3,sum(TIMERATE4) TIMERATE4," +
            " sum(TIMERATE14) TIMERATE14,sum(TIMERATE5) TIMERATE5,sum(TIMERATE6) TIMERATE6,sum(TIMERATE7) TIMERATE7,sum(TIMERATE8)  TIMERATE8," +
            " sum(TIMERATE15) TIMERATE15,sum(TIMERATE9) TIMERATE9,sum(TIMERATE10) TIMERATE10,sum(TIMERATE11) TIMERATE11,sum(TIMERATE12) TIMERATE12" +
            " from pro_econ_equipment_info_day5  where" +
            " record_date>= #{beginDate} and record_date<= #{endDate}" +
            " group by windpowerstation_id")
    List<ProEconEquipmentInfoDay5> selectStateConversionRateList(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
}


