修复:补齐测试批次恢复锁定

This commit is contained in:
焦龙言
2026-09-23 09:01:50 +08:00
parent f5df2150d8
commit 97b4dc8508
15 changed files with 212 additions and 16 deletions
@@ -304,6 +304,7 @@ class FillingService:
test_scope: TestBatchScope,
) -> CrudResponseModel:
try:
await TestBatchAccessService.lock_active_batch(query_db, test_scope)
warehouse_ids = await cls._warehouse_scope(query_db, current_user)
if warehouse_ids is not None and page_object.warehouse_id not in warehouse_ids:
raise PermissionException(data='', message='无权访问该仓库')
@@ -509,7 +510,7 @@ class FillingService:
request_hash=request_hash,
test_batch_id=test_scope.batch_id,
)
await InventoryDao.add_event(query_db, inventory, event)
await InventoryDao.add_event(query_db, inventory, event, test_scope)
await query_db.commit()
return cls._success(filling_id)
except IntegrityError: