修复:补齐测试批次恢复锁定
This commit is contained in:
@@ -112,6 +112,7 @@ class InventoryDao:
|
||||
db: AsyncSession,
|
||||
inventory: BizPalletInventory,
|
||||
event: BizPalletEvent,
|
||||
scope: TestBatchScope,
|
||||
) -> BizPalletEvent:
|
||||
"""在调用方持有库存行锁时,为托盘追加下一序号事件。"""
|
||||
last_sequence = 0
|
||||
@@ -121,6 +122,7 @@ class InventoryDao:
|
||||
.where(
|
||||
BizPalletEvent.event_id == inventory.last_event_id,
|
||||
BizPalletEvent.pallet_id == inventory.pallet_id,
|
||||
batch_scope_condition(BizPalletEvent.test_batch_id, scope),
|
||||
)
|
||||
.with_for_update()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user