廖井涛
2025-12-12 cf4b24b7757bc76bb9c01fe936140073cb150711
north-glass-erp/src/main/resources/mapper/mm/MaterialStore.xml
@@ -6,9 +6,28 @@
    <select id="getSelectMaterialStore">
        select
        *
        m.id,m.type,m.json,m.create_time,bb.consume,bb.type as bomType,bb.price
        from
        mm.material_store m
        left join sd.bom_base as bb on bb.material_id=m.id
        <where>
            <if test="materialStore.id != null and materialStore.id != ''">
                and m.id regexp #{materialStore.id}
            </if>
            <if test="materialStore.type != null and materialStore.type != ''">
                and m.type regexp #{materialStore.type}
            </if>
        </where>
        order by m.id desc
        limit #{offset},#{pageSize};
    </select>
    <select id="getSelectProductBOM">
        select
        m.id,m.type,m.json,m.create_time,bb.consume,bb.type as bomType,bb.price,bb.id as tabId
        from
        sd.bom_base as bb
        left join   mm.material_store m on bb.material_id=m.id
        <where>
            <if test="materialStore.id != null and materialStore.id != ''">
                and m.id regexp #{materialStore.id}