<?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.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWeightMapper">


    <select id="selectAllByParams" resultType="com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight">
        SELECT  ibfw.sequence_nbr,FLAG,ORG_CODE,POINT_NAME,STATION,ARAE,EQUIPMENT_NAME,TYPE,VALUE,SUBARRAY
        FROM (SELECT MIN(sequence_nbr) as sequence_nbr
        FROM idx_biz_fan_weight WHERE (ORG_CODE LIKE #{orgCode} AND ${name} IS NOT NULL)
        GROUP BY ${name} ORDER BY ${name} ASC)aa
        LEFT JOIN idx_biz_fan_weight ibfw ON ibfw.sequence_nbr=aa.sequence_nbr
    </select>
</mapper>
