-
This commit is contained in:
@@ -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:
|
||||
# 有查验但机型不在报关单中 → 弹窗
|
||||
|
||||
Reference in New Issue
Block a user