zss
17 小时以前 e0c8edd1d949fae5883a60019d02a9c5f7cb7a29
src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -4,25 +4,30 @@
    <resultMap id="basicMap" type="com.ruoyi.production.pojo.ProcessRoute">
            <id property="id" column="id"/>
            <result property="productModelId" column="product_model_id"/>
            <result property="description" column="description"/>
            <result property="tenantId" column="tenant_id"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
        <id property="id" column="id"/>
        <result property="productModelId" column="product_model_id"/>
        <result property="description" column="description"/>
        <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>