refactor(repair): strictly gate 'Already Outbound' status to system-only trigger

This commit is contained in:
DXC
2026-04-09 09:12:42 +08:00
parent 48efbed46b
commit f4d14f718d
2 changed files with 4 additions and 1 deletions

View File

@ -205,6 +205,10 @@ class RepairInboundService:
"""
专门用于更新维修状态和追加维修日志
"""
# 禁止手动变更为已出库状态,必须通过扫码出库模块进行
if status == '已出库':
raise ValueError("禁止手动变更为已出库状态,请通过扫码出库模块进行操作")
repair = TransRepair.query.get(id)
if not repair:
return None