| | |
| | | MAX(warn_num) as warn_num, |
| | | MAX(version) as version, |
| | | model, |
| | | thickness, |
| | | MAX(remark) as remark, |
| | | unit, |
| | | product_name, |
| | |
| | | si.version, |
| | | (si.qualitity - COALESCE(si.locked_quantity, 0)) as un_locked_quantity, |
| | | pm.model, |
| | | pm.thickness, |
| | | si.remark, |
| | | pm.unit, |
| | | p.product_name, |
| | |
| | | su.version, |
| | | (su.qualitity - COALESCE(su.locked_quantity, 0)) as un_locked_quantity, |
| | | pm.model, |
| | | pm.thickness, |
| | | su.remark, |
| | | pm.unit, |
| | | p.product_name, |
| | |
| | | and combined.product_id in (select id from product_tree) |
| | | </if> |
| | | </where> |
| | | group by product_model_id, model, unit, product_name, product_id |
| | | group by product_model_id, model, thickness, unit, product_name, product_id |
| | | </select> |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | | WITH RECURSIVE product_tree AS ( |