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

    <select id="selectLineIds" resultType="java.lang.String">
        SELECT
        A2.Id
        FROM
        pq_line A,
        pq_line A1,
        pq_line A2
        WHERE A.Id = #{deviceId}
        AND A1.Pid = A.Id
        AND A2.Pid = A1.Id
    </select>

    <select id="selectLineIdBylineLevel" resultType="java.lang.String">
        SELECT
        Id
        FROM
        pq_line_detail
        WHERE Line_Grade = #{lineLevel}
    </select>


</mapper>