12 小时以前 b22ebe8fad1691b35adcf321fe2e136795b3f81d
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -26,9 +26,12 @@
        T1.is_production,
        T1.create_user,
        T1.dept_id,
        T1.device_id,
        T1.storage_location,
        p.product_name as product_category,
        pm.model as specification_model,
        pm.unit as unit,
        dl.device_name,
        CASE
        WHEN (IFNULL(t2.qualitity, 0) - IFNULL(t2.locked_quantity, 0)) >0 THEN 1
        ELSE 0
@@ -101,6 +104,7 @@
        ) t4 ON t4.sales_ledger_product_id = T1.id
        left join product_model pm ON T1.product_model_id = pm.id
        left join product p ON pm.product_id = p.id
        left join device_ledger dl ON T1.device_id = dl.id
        <where>
            <if test="salesLedgerProduct.salesLedgerId != null">
                AND T1.sales_ledger_id = #{salesLedgerProduct.salesLedgerId}