<?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.quality.mapper.EleLoadSetMapper">
    <select id="getEleLoadSetDetail" resultType="EleLoadSetVO">
        SELECT
            dic.id loadId,
            dic.NAME loadName,
            dic.algo_describe flag
        FROM
            sys_dict_data dic
        INNER JOIN
            sys_dict_type type on dic.Type_Id = type.Id
        WHERE
            type.name =#{typeName}
        ORDER BY
            dic.sort
    </select>

    <select id="getAllLineListRelation" resultType="String">
        select  c.line_id from sys_dict_data a
        inner join ele_load_set b on a.id = b.id
        inner join ele_line c on b.line_id = c.line_id
        where a.id = #{dicId}
    </select>

    <select id="getAllLineListRelationIds" resultType="String">
        select  c.line_id from sys_dict_data a
        inner join ele_load_set b on a.id = b.id
        inner join ele_line c on b.line_id = c.line_id
        where a.id in
        <foreach collection="list" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>
</mapper>
