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

    <resultMap id="BaseResultMap" type="com.hdkj.lt.core.bizms.modle.po.voltageLimitViolation.FhzgLimitTransferSchemeSwitchingFinalSwCurrentDetail">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="switchingId" column="switching_id" jdbcType="BIGINT"/>
            <result property="switchId" column="switch_id" jdbcType="VARCHAR"/>
            <result property="switchName" column="switch_name" jdbcType="VARCHAR"/>
            <result property="lineId" column="line_id" jdbcType="VARCHAR"/>
            <result property="lineName" column="line_name" jdbcType="VARCHAR"/>
            <result property="preLoopCloseCurrent" column="pre_loop_close_current" jdbcType="VARCHAR"/>
            <result property="loopCloseCurrent" column="loop_close_current" jdbcType="VARCHAR"/>
            <result property="loopOpenCurrent" column="loop_open_current" jdbcType="VARCHAR"/>
            <result property="currentThreshold" column="current_threshold" jdbcType="VARCHAR"/>
            <result property="switchCurrentCheck" column="switch_current_check" jdbcType="VARCHAR"/>
            <result property="creator" column="creator" jdbcType="BIGINT"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="lastEditor" column="last_editor" jdbcType="BIGINT"/>
            <result property="lastTime" column="last_time" jdbcType="TIMESTAMP"/>
            <result property="maxAfter24hI" column="max_after24h_i" jdbcType="VARCHAR"/>
            <result property="lineRateCurrent" column="line_rate_current" jdbcType="VARCHAR"/>
            <result property="switchRateCurrent" column="switch_rate_current" jdbcType="VARCHAR"/>
    </resultMap>


    <select id="getTransferSchemeFinalSwitchCurrentDetailByIdPage" resultType="com.hdkj.lt.bf.entity.dto.FhzgLimitTransferSchemeFinalSwitchCurrentDetailDTO">
        SELECT
            fscd.id id,
            fscd.switching_id switchingId,
            fscd.switch_id switchId,
            fscd.switch_name switchName,
            fscd.line_id lineId,
            fscd.line_name lineName,
            fscd.pre_loop_close_current preLoopCloseCurrent,
            fscd.loop_close_current loopCloseCurrent,
            fscd.loop_open_current loopOpenCurrent,
            fscd.current_threshold currentThreshold,
            fscd.switch_current_check switchCurrentCheck,
            fscd.max_after24h_i maxAfter24hI,
            fscd.line_rate_current lineRateCurrent,
            fscd.switch_rate_current switchRateCurrent,
            fscd.create_time
        FROM
            fhzg_limit_transfer_scheme_switching_final_sw_current_detail fscd
        WHERE
            fscd.switching_id = #{switchingId}
        order by fscd.create_time desc
    </select>
</mapper>
