<?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.hdkj.lt.bf.mapper.FhzgReconVolDetailMapper">


    <select id="getLoadListbySpecRule" resultType="com.hdkj.lt.modle.po.FhzgReconVolDetail">
        select * from (
        select *
        from fhzg_recon_vol_detail
        where result_id = #{id}
        and (before_u >= 10.7 or 9.3 >= before_u
        or after_u >= 10.7 or 9.3 >= after_u)
        union
        select *
        from fhzg_recon_vol_detail
        where result_id = #{id}
        and (10.7 > before_u or before_u > 9.3
        or 10.7 > after_u or after_u > 9.3)
        order by abs(after_u-before_u)) a limit 10
    </select>
</mapper>