<?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.device.pq.mapper.VoltageMapper">

    <select id="getVoltageByNum" resultType="Voltage">
        select b.* from pq_line a
        inner join pq_voltage b on a.id=b.id
        where a.pid = #{devIndex}
        and a.state = 1
        and b.Num in
        <foreach collection="num" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>


    <select id="getLineDetailByBusBarId" resultType="LineDetail">
        select pq_line_detail.* from pq_line pq_line
        inner join pq_line_detail pq_line_detail on pq_line.id = pq_line_detail.id
        where pid = #{busBarId}
        and pq_line.state = 1
    </select>


</mapper>
