huminmin
2026-04-29 ea25a4d9db55901a861b4ff22737fcf24c7bb26c
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -99,6 +99,10 @@
            <if test="req.status != null and req.status ">
                AND slp.pending_tickets_total &gt; 0
            </if>
            <if test="req.supplierNameOrContractNo != null and req.supplierNameOrContractNo != ''">
                AND (sl.supplier_name like concat('%',#{req.supplierNameOrContractNo},'%') or
                sl.purchase_contract_number like concat('%',#{req.supplierNameOrContractNo},'%'))
            </if>
        </where>
        order by slp.register_date desc
    </select>
@@ -131,9 +135,7 @@
        <if test="req.productCategory != null and req.productCategory != ''">
            AND slp.product_category = #{req.productCategory}
        </if>
        <!-- 按产品大类分组聚合 -->
        GROUP BY slp.product_category
        <!-- 按产品大类排序 -->
        GROUP BY slp.product_category, slp.specification_model, sl.supplier_name
        ORDER BY slp.product_category
    </select>
    <select id="selectProductBomStructure" resultType="com.ruoyi.sales.dto.LossProductModelDto">