<?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.energy.mapper.EleIntegrityMapper">

    <select id="getPowerLineId" resultType="string">
        SELECT
            D.Line_Id
        FROM
            ele_net_dev A,
            ele_logic_access B,
            ele_logic_dev C,
            ele_line D
        WHERE
            A.NDID = '00B78D110001$GW$PQS570' AND A.Id = B.Pid AND B.State = 2 AND B.Did = C.Did AND C.Type != 'ACgw' AND C.Id = D.Pid ORDER BY Line_Id
    </select>

    <select id="getAirLineId" resultType="string">
    SELECT
        D.Line_Id
    FROM
        ele_net_dev A,
        ele_logic_access B,
        ele_logic_dev C,
        ele_line D
    WHERE
        (A.NDID = '00B78D110002$GW$PQS570' or A.NDID = '00B78D110003$GW$PQS570') AND A.Id = B.Pid AND B.State = 2 AND B.Did = C.Did AND C.Type != 'ACgw' AND C.Id = D.Pid ORDER BY Line_Id
    </select>

</mapper>
