<?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.njcn.event.mapper.TransientMapper">

    <select id="getTransientData" resultType="TransientVO">
        SELECT
        B.`Id` id,
        B.`Name` name,
        B4.`Name` powerCompany,
        B3.`Name` substation,
        D.`Name` voltageLevel,
        E.`IP` networkParam
        FROM
        pq_line B,
        pq_voltage C,
        sys_dict_data D,
        pq_device E,
        pq_line B1,
        pq_line B2,
        pq_line B3,
        pq_line B4
        WHERE
        B.Id IN
        <foreach item="item" collection="list" separator="," open="(" close=")">
            #{item}
        </foreach>
        AND B.Pid = C.Id
        AND C.Scale = D.Id
        AND B.Pid = B1.Id
        AND B1.Pid = E.Id
        AND B1.Pid = B2.Id
        AND B2.Pid = B3.Id
        AND B3.Pid = B4.Id
    </select>


</mapper>