<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gyee.wisdom.alarm.schedule.mapper.FaultStatisticWindturbineMapper">


    <select id="selectFaultStatisticWindturbineByyearandmonth"
            resultType="com.gyee.wisdom.alarm.schedule.entity.FaultStatisticWindturbine">

        select *
        from FaultStatisticWindturbine
        <where>

            <if test="year !=null and year !=''">
                and year = #{year}
            </if>

            <if test="month !=null and month !=''">
                and month = #{month}
            </if>

            <if test="warningtype !=null and warningtype !=''">
                and warningtype =#{warningtype}
            </if>
            <if test="windturbineId !=null and windturbineId !=''">
                and windturbineId = #{windturbineId}
            </if>

            <if test="stationid !=null and stationid !=''">
                and windpowerstationid = #{stationid}
            </if>

        </where>

    </select>
</mapper>