gongchunyi
2 天以前 5b334f63a33646b57a428c647bad9894cd3f3068
src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -10,19 +10,24 @@
            <result property="tenantId" column="tenant_id"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
        <result property="status" column="status"/>
    </resultMap>
    <select id="pageProcessRouteDto" resultType="com.ruoyi.production.dto.ProcessRouteDto">
        select ps.*, p.product_name,pm.product_id,pm.model,pb.bom_no
        select
        ps.*,
        pm.product_name, pms.product_id, pms.model, pb.bom_no
        from process_route ps
        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
        left join product_material_sku pms on ps.product_model_id = pms.id
        left join product_material pm on pms.product_id = pm.id
        <where>
            <if test="c.model != null and c.model != ''">
                and pm.model like concat('%',#{c.model},'%')
                and pms.model like concat('%', #{c.model}, '%')
            </if>
        </where>
        order by ps.id asc
        order by ps.id
    </select>
</mapper>