2026-05-30 8e52d3e600ff49869cc612fd9bf1cc64ac304f50
src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -24,10 +24,12 @@
        p.product_name,
        sl.customer_name,
        spd.totalQuantity,
        sor.outboundBatches
        sor.outboundBatches,
        pl.purchase_contract_number
        FROM shipping_info s
        LEFT JOIN (select shipping_info_id,sum(quantity) totalQuantity from shipping_product_detail GROUP BY shipping_info_id) spd ON spd.shipping_info_id = s.id
        LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
        LEFT JOIN purchase_ledger pl ON sl.purchase_ledger_id = pl.id
        LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1
        left join product_model pm on slp.product_model_id = pm.id
        left join product p on pm.product_id = p.id
@@ -47,6 +49,9 @@
        </if>
        <if test="req.expressNumber != null and req.expressNumber != ''">
            AND s.express_number LIKE CONCAT('%',#{req.expressNumber},'%')
        </if>
        <if test="req.customerId != null">
            AND sl.customer_id = #{req.customerId}
        </if>
        order by create_time DESC
    </select>
@@ -72,6 +77,7 @@
            slp.product_category,
            slp.specification_model,
            slp.unit,
            slp.product_model_id,
            sor.outbound_batches,
            sor.stock_out_num,
            sor.batch_no,
@@ -97,6 +103,7 @@
                si.id = #{shippingId}
            </if>
        </where>
        order by sor.id
    </select>
    <select id="getShippingInfoByCustomerName" resultType="com.ruoyi.sales.pojo.ShippingInfo">
        select * from shipping_info si