<?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.pms.mapper.majornetwork.TractionStationMapper">

    <!--获取牵引站详细信息-->
    <select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
        SELECT
        pts.Id AS id,
        pts.`NAME` AS name,
        ptse.`railway_type` AS railwayType,
        pts.Org_Name AS orgName,
        pts.Org_Id AS orgId,
        pts.Operation_Name AS operationName,
        pts.Operation_Id AS operationId,
        pts.Voltage_Level AS voltageLevel,
        pts.Railway_Line_Id AS railwayLineId,
        pts.Railway_Line_Name AS railwayLineName,
        pts.Connet_Group_Way AS connetGroupWay,
        pts.Rated_Capacity AS ratedCapacity,
        pts.Power_Id AS powerId,
        pts.Power_Name AS powerName,
        pts.Power_Voltage_Level AS powerVoltageLevel,
        pts.If_Special AS ifSpecial,
        pts.Created_Date AS createdDate,
        pts.User_Tag AS userTag,
        pts.Is_Up_To_Grid AS isUpToGrid,
        pts.`STATUS` AS `status`,
        pts.Create_By AS createBy,
        pts.Create_Time AS createTime,
        pts.Update_By AS updateBy,
        pts.Update_Time AS updateTime
        FROM
        pms_traction_Station pts
        LEFT JOIN pms_traction_station_expand  ptse on ptse.traction_Station_Id=pts.id and ptse.Org_Id=pts.Org_Id
        WHERE
        pts.Org_Id IN
        <foreach collection="param.orgIds" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>
</mapper>

