| | |
| | | t2.product_category, |
| | | t1.id, |
| | | t1.code, |
| | | t1.batch_no, |
| | | t5.shipping_no, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.tax_rate, |
| | |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1 |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | left join procurement_record_storage t4 on t4.id = t1.procurement_record_storage_id |
| | | left join shipping_info t5 on t5.id = t1.shipping_info_id |
| | | <where> |
| | | and t1.type = 2 |
| | | <if test="req.customerName != null and req.customerName != ''"> |
| | |
| | | order by id desc |
| | | limit 1 |
| | | </select> |
| | | <select id="listBatchNoByProductModelId" resultType="com.ruoyi.procurementrecord.bean.vo.BatchNoOptionVo"> |
| | | select si.product_model_id, |
| | | si.batch_no, |
| | | (si.qualitity - ifnull(si.locked_quantity, 0)) as availableQuantity |
| | | from stock_inventory si |
| | | where si.product_model_id = #{productModelId} |
| | | and si.batch_no is not null |
| | | and si.batch_no != '' |
| | | and (si.qualitity - ifnull(si.locked_quantity, 0)) > 0 |
| | | order by si.batch_no |
| | | </select> |
| | | |
| | | <select id="listPageBySemiProduct" resultType="com.ruoyi.procurementrecord.bean.dto.ProcurementRecordOutPageDto"> |
| | | select |
| | | t1.id, |