| | |
| | | <if test="ew.topParentProductId != null and ew.topParentProductId > 0"> |
| | | and combined.product_id in (select id from product_tree) |
| | | </if> |
| | | <if test="ew.model != null and ew.model !=''"> |
| | | and combined.model like concat('%',#{ew.model},'%') |
| | | </if> |
| | | <if test="ew.batchNo != null and ew.batchNo !=''"> |
| | | and combined.batch_no like concat('%',#{ew.batchNo},'%') |
| | | </if> |
| | | </where> |
| | | group by |
| | | product_model_id, |
| | |
| | | group by spd.stock_inventory_id |
| | | ) as sd on sd.stock_inventory_id = si.id |
| | | where si.product_model_id = #{productModelId} |
| | | and si.qualitity > IFNULL(sd.qualitity, 0) |
| | | </select> |
| | | |
| | | <select id="getBatchNoQty" resultType="com.ruoyi.stock.dto.StockInventoryDto"> |