5 天以前 92d8d06d8ae38c407715a5e9389691b446413e0a
src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -13,14 +13,28 @@
    </resultMap>
    <select id="pageProcessRouteDto" resultType="com.ruoyi.production.dto.ProcessRouteDto">
        select ps.*, pm.speculative_trading_name
        select ps.*, p.product_name,pm.product_id,pm.model,pb.bom_no,pm.drawing_number,group_concat(pp.name) as processName
        from process_route ps
                 left join product_model pm on ps.product_model_id = pm.id
        left join process_route_item ppi on ps.id = ppi.route_id
        left join product_process pp on ppi.process_id = pp.id
        left join product_bom pb on ps.bom_id = pb.id
        left join product_model pm on ps.product_model_id = pm.id
        left join product p on pm.product_id = p.id
        <where>
            <if test="c.speculativeTradingName != null || c.speculativeTradingName != ''">
                and pm.speculative_trading_name like concat('%',#{c.speculativeTradingName},'%')
            <if test="c.model != null and c.model != ''">
                and pm.model like concat('%',#{c.model},'%')
            </if>
            <if test="c.processRouteCode != null and c.processRouteCode != ''">
                and ps.process_route_code like concat('%',#{c.processRouteCode},'%')
            </if>
            <if test="c.processRouteName != null and c.processRouteName != ''">
                and ps.process_route_name like concat('%',#{c.processRouteName},'%')
            </if>
            <if test="c.processName != null and c.processName != ''">
                and pp.name like concat('%',#{c.processName},'%')
            </if>
        </where>
        group by ps.id
        order by ps.id asc
    </select>
</mapper>