mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 12:13:33 +09:00
#수정
재고량이 수정되어 예약된 출고량보다 낮아지면 즉시 출고 안됨
This commit is contained in:
@@ -37,10 +37,11 @@
|
||||
|
||||
|
||||
<select id="outOne" parameterType="Map" resultType="Map">
|
||||
select o.id as id, p.name as product_name, p.kan_code, o.quantity, w.name as warehouse_name, w.id as warehouse_id, p.id as product_id, o.expected_delivery_date, o.delivery_date, o.note
|
||||
select o.id as id, p.name as product_name, p.kan_code, o.quantity as outQuantity, s.quantity as stockQuantity, w.name as warehouse_name, w.id as warehouse_id, p.id as product_id, o.expected_delivery_date, o.delivery_date, o.note
|
||||
from product_out o
|
||||
left join warehouse w on o.warehouse_id = w.id
|
||||
left join product p on o.product_id = p.id
|
||||
left join warehouse w on o.warehouse_id = w.id
|
||||
left join stock s on o.product_id = s.product_id and o.warehouse_id = s.warehouse_id
|
||||
|
||||
where o.id = #{id}
|
||||
</select>
|
||||
@@ -103,7 +104,7 @@
|
||||
|
||||
<update id="updateWarehouseDeleteStock" parameterType="com.no1.wms.out.ProductOutDto">
|
||||
update warehouse
|
||||
set current_capacity = current_capacity - #{quantity}
|
||||
set current_capacity = current_capacity - #{outQuantity}
|
||||
where id = #{warehouse_id};
|
||||
</update>
|
||||
|
||||
@@ -116,13 +117,13 @@
|
||||
|
||||
<update id="outNowUpdate" parameterType="com.no1.wms.out.ProductOutDto">
|
||||
update product_out
|
||||
set quantity = #{quantity}, expected_delivery_date = #{expected_delivery_date}, delivery_date = #{delivery_date}
|
||||
set quantity = #{outQuantity}, expected_delivery_date = #{expected_delivery_date}, delivery_date = #{delivery_date}
|
||||
where id = #{id};
|
||||
</update>
|
||||
|
||||
<update id="stockQuantityUpdate" parameterType="com.no1.wms.out.ProductOutDto">
|
||||
update stock
|
||||
set quantity = quantity - #{quantity}
|
||||
set quantity = quantity - #{outQuantity}
|
||||
where product_id = #{product_id} and warehouse_id = #{warehouse_id};
|
||||
</update>
|
||||
<!-- update -->
|
||||
|
||||
Reference in New Issue
Block a user