| | |
| | | </if> |
| | | update_time = now() |
| | | </set> |
| | | where product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity} |
| | | where |
| | | product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity} |
| | | <if test="ew.batchNo == null"> |
| | | and batch_no is null |
| | | </if> |
| | | <if test="ew.batchNo != null"> |
| | | and batch_no = #{ew.batchNo} |
| | | </if> |
| | | |
| | | </update> |
| | | <update id="updateAddStockUnInventory"> |
| | | update stock_uninventory |
| | |
| | | update_time = now() |
| | | </set> |
| | | where product_model_id = #{ew.productModelId} |
| | | <if test="ew.batchNo == null"> |
| | | and batch_no is null |
| | | </if> |
| | | <if test="ew.batchNo != null"> |
| | | and batch_no = #{ew.batchNo} |
| | | </if> |
| | | </update> |
| | | <select id="pageStockUninventory" resultType="com.ruoyi.stock.dto.StockUninventoryDto"> |
| | | select su.id, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectPendingOutQuantity" resultType="java.math.BigDecimal"> |
| | | SELECT IFNULL(SUM(sor.stock_out_num), 0) |
| | | FROM stock_out_record sor |
| | | WHERE sor.product_model_id = #{productModelId} |
| | | AND (sor.batch_no = #{batchNo} OR (#{batchNo} IS NULL AND sor.batch_no IS NULL)) |
| | | AND sor.type = #{type} |
| | | AND sor.approval_status = 0 |
| | | </select> |
| | | |
| | | </mapper> |