package com.gyee.frame.mapper.FanStatusQueryExportMapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

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

@Repository
public interface FanStatusQueryExportMapper {
    //获取风机Name
    @Select("select id,name from windturbine where windpowerstationid ='${windpowerstationid}'")
    List<Map<String, Object>> getFanName(@Param("windpowerstationid") String windpowerstationid);

    @Select("select windturbineid,statusdesc,starttime,speed,stoptime from windturbinestatus where windturbineid='${windturbineid}' and satuscode='${satuscode}' and stoptime >= TO_DATE ('${starttime} ',' yyyy-MM-dd ') and stoptime <= TO_DATE ('${stoptime} ',' yyyy-MM-dd ')")
    List<Map<String, Object>> getFjStatus(@Param("windturbineid") String windturbineid, @Param("satuscode") String satuscode,@Param("starttime")String starttime,@Param("stoptime") String stoptime);

}
