<?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.harmonic.mapper.SteadyQualifyMapper">

    <select id="getSteadyQualifyData" resultType="SteadyQualifyVO">
        SELECT
            A.Id,
            A.Pid,
            A.Pids,
            A.`Name` name,
            C.`Name` voltageLevel,
            D.`IP` networkParam,
            C1.`Name` factoryName,
            A.`Name` lineName
        FROM
            pq_line A,
            pq_voltage B,
            sys_dict_data C,
            pq_device D,
            pq_line A1,
            sys_dict_data C1
        WHERE
        A.Id IN
        <foreach item="item" collection="list" separator="," open="(" close=")">
            #{item}
        </foreach>
        AND A.Pid = B.Id
        AND B.Scale = C.Id
        AND A.Pid = A1.Id
        AND A1.Pid = D.Id
        AND D.Manufacturer = C1.Id
    </select>

    <select id="getLineInfoByList" resultType="SteadyQualifyVO">
        SELECT
        Id,
        Pid,
        Pids,
        `Name`
        FROM
        pq_line
        WHERE
        Id IN
        <foreach item="item" collection="list" separator="," open="(" close=")">
            #{item}
        </foreach>
    </select>

</mapper>