| | |
| | | </if> |
| | | </where> |
| | | group by product_model_id, model, unit, product_name, product_id, unQualifiedBatchNo, materialCode, processCategory, voltage |
| | | having SUM(qualifiedQuantity) > 0 or SUM(unQualifiedQuantity) > 0 |
| | | </select> |
| | | |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | |
| | | </if> |
| | | </where> |
| | | group by product_model_id, model, unit, product_name, unQualifiedBatchNo, materialCode, processCategory, voltage |
| | | having SUM(qualifiedQuantity) > 0 or SUM(unQualifiedQuantity) > 0 |
| | | </select> |
| | | <select id="stockInventoryPage" resultType="com.ruoyi.stock.dto.StockInRecordDto"> |
| | | select sir.*,si.qualitity as current_stock, |
| | |
| | | si.process_category as processCategory, |
| | | si.voltage, |
| | | pm.material_code as materialCode, |
| | | pm.unit |
| | | pm.unit, |
| | | si.qualitity as qualitity |
| | | from stock_inventory si |
| | | inner join product_model pm on si.product_model_id = pm.id |
| | | inner join product p on pm.product_id = p.id |
| | |
| | | <if test="ew.voltage != null and ew.voltage != ''"> |
| | | and si.voltage = #{ew.voltage} |
| | | </if> |
| | | and si.qualitity > 0 |
| | | </where> |
| | | order by p.id asc, pm.id asc, si.id asc |
| | | </select> |