src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -19,7 +19,8 @@ s.update_user, s.tenant_id, sl.sales_contract_no, slp.specification_model, pm.model as specification_model, pm.unit, p.product_name, sl.customer_name FROM shipping_info s @@ -61,6 +62,7 @@ <select id="getReturnManagementDtoById" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto"> SELECT slp.*, si.shipping_no, GREATEST(slp.quantity - COALESCE(rs.total_return_num, 0), 0) AS un_quantity, COALESCE(rs.total_return_num, 0) AS total_return_num FROM shipping_info si