<?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.FaultTransferSchemeOppositeLineLoadFactorMapper">

<select id="getTransferSchemeOppositeLineLoadFactorBySchemeId"
            resultType="com.hdkj.lt.bf.entity.dto.FaultTransferSchemeOppositeLineLoadFactorDTO">

        SELECT
            ollf.id id,
            ollf.scheme_id schemeId,
            ollf.opposite_line_id oppositeLineId,
            ollf.opposite_line_name oppositeLineName,
            ollf.calculated_current calculatedCurrent,
            ollf.rated_current ratedCurrent,
            ollf.load_factor loadFactor,
            ollf.before_load_factor beforeLoadFactor,
            ollf.before_main_transformer_load_factor beforeMainTransformerLoadFactor,
            ollf.after_main_transformer_load_factor afterMainTransformerLoadFactor
        FROM
            fhzg_fault_transfer_scheme_opposite_line_load_factor ollf
        WHERE
            ollf.scheme_id = #{schemeId}
        ORDER BY
            ollf.id desc

    </select> <select id="getTransferSchemeOppositeLineLoadFactorByIdPage"
            resultType="com.hdkj.lt.bf.entity.dto.FhzgFaultTransferSchemeOppositeLineLoadFactorDTO">
        SELECT
            ollf.id id,
            ollf.scheme_id schemeId,
            ollf.opposite_line_id oppositeLineId,
            ollf.opposite_line_name oppositeLineName,
            ollf.calculated_current calculatedCurrent,
            ollf.rated_current ratedCurrent,
            ollf.load_factor loadFactor
        FROM
            fhzg_fault_transfer_scheme_opposite_line_load_factor ollf
        WHERE
            ollf.scheme_id = #{id}
        ORDER BY
            ollf.id desc
    </select></mapper>
