4.29扫码获取库位小工具接口

This commit is contained in:
dxc
2026-04-29 15:40:43 +08:00
parent 00839863f5
commit 259f3a7e0d
17 changed files with 455 additions and 64 deletions

View File

@ -253,6 +253,13 @@ class OutboundService:
)
db.session.add(new_record)
# ★ 出库后检查低库存预警
try:
from app.utils.stock_alert import check_and_alert
check_and_alert(stock_record.base_id)
except Exception as e:
current_app.logger.warning(f"⚠️ 低库存预警检查失败: {e}")
# ★ 如果关联了审批单,出库成功后更新审批单状态为"已完成"
if approval:
approval.status = 3 # 3-已完成