This commit is contained in:
ywb
2026-06-16 14:55:38 +08:00
parent fede57e69a
commit 3d0bcc8f6f
2 changed files with 22 additions and 4 deletions
+14 -1
View File
@@ -800,7 +800,20 @@ class MissionExecutorV3:
has_inspection = data.get("hasInspection", False)
self._log(f" 📊 解析结果: modelName={model}, inventoryCode={inv_code}, hasInspection={has_inspection}, matched={'yes' if matched else 'no'}")
if matched:
self._log(f" 🏷️ 机型: {model} (物料:{inv_code}) — 查验 {matched['inspected']}/{matched['quantify']}")
inspected = matched.get('inspected', 0)
quantify = matched.get('quantify', 0)
# 超量检查:已查验数量超过报关单数量
if inspected > quantify:
self._log(f" ⚠️ 机型「{model}」已查验 {inspected} 台,超过报关单数量 {quantify}")
new_qr = self._request_manual_qr(
f"机型「{model}」在报关单中只需查验 {quantify} 台,\n当前已扫到第 {inspected} 台,请重新扫描或手动输入正确的二维码:"
)
# 超量时不能跳过,必须重新输入
if self._stop.is_set():
return model
qr_value = new_qr
continue # 用新二维码重试
self._log(f" 🏷️ 机型: {model} (物料:{inv_code}) — 查验 {inspected}/{quantify}")
return model
elif has_inspection and not matched:
# 有查验但机型不在报关单中 → 弹窗