<?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.yfd.platform.modules.algorithm.mapper.AlgorithmClassComponentMapper">

    <select id="getAlgorithmComponentList" resultType="java.util.Map">
        SELECT
        acc.id,
        acc.algorithm_id,
        acc.station_code,
        acc.station_name,
        acc.component_id,
        CONCAT( acc.main_device_name, '-', acc.component_name ) component_name,
        ac.algorithm_class_name
        FROM
        iis_algorithm_class ac
        INNER JOIN iis_algorithm_class_component acc ON ac.id = acc.algorithm_id
        WHERE
        acc.station_code=#{stationCode}
        <if test="algorithmClassName != null and algorithmClassName != ''">
            AND ac.algorithm_class_name LIKE CONCAT('%',#{algorithmClassName},'%')
        </if>
    </select>
</mapper>
