<?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.fjhx.mapper.working.WorkingRouteMapper">

    <select id="getPage" resultType="com.fjhx.params.working.WorkingRouteEx">
        select wr.id,
               wr.name,
               wr.introduce,
               group_concat(distinct wp.name separator ' > ') workingProcedureGroup,
               group_concat(distinct p.name)                productGroup
        from working_route wr
                 left join working_route_procedure wrp on wr.id = wrp.working_route_id
                 left join working_procedure wp on wrp.working_procedure_id = wp.id
                 left join product_ex pe on wr.id = pe.working_route_id
                 left join product p on p.id = pe.id
            ${ew.customSqlSegment}
    </select>

</mapper>
