test(shipping): 更新订单复核库存与通知流程测试
This commit is contained in:
1 parent
8ec028e6a3
commit
265a6e179a
168 files changed
+9420
-4613
No files matched your search
@@ -22,6 +22,7 @@ _ATOMIC_PO_NUMBER_PATTERN = re.compile(r"[A-Za-z0-9][A-Za-z0-9\-_/]*")
|
||||
def normalize_po_number(value: Any) -> str:
|
||||
"""
|
||||
标准化采购单号;Wistron 等客户原文常带 ZNB 前缀(如 ZNB16754796 / ZNB-16754796),输出为纯数字段。
|
||||
纯数字 PO 前导零视为格式差异(0060208010 与 60208010 是同一张 PO),统一剥除,避免跨来源误判冲突。
|
||||
"""
|
||||
text = str(value or "").strip()
|
||||
if not text:
|
||||
@@ -32,8 +33,8 @@ def normalize_po_number(value: Any) -> str:
|
||||
if upper.startswith("ZNB") and len(text) > 3:
|
||||
tail = text[3:].strip().lstrip("-_/ ")
|
||||
if tail.isdigit():
|
||||
return tail
|
||||
return text
|
||||
return tail.lstrip("0") or "0"
|
||||
return text.lstrip("0") or "0"
|
||||
|
||||
|
||||
def normalize_atomic_po_number(value: Any) -> str:
|
||||
|
||||
Reference in new issue
Block a user