refactor(shipping-notice): 统一料号字段,移除过时的 SKU 相关字段,更新相关逻辑以支持新字段命名
This commit is contained in:
1 parent
dde25344ca
commit
46eb63f5bb
111 files changed
+3116
-1250
No files matched your search
@@ -649,7 +649,7 @@ def test_auto_progress_inventory_trigger_failure_marks_step3(app, tmp_path):
|
||||
process_status="parsed",
|
||||
parse_confidence=0.95,
|
||||
raw_content="客户:ACME\nA001 x 10",
|
||||
lines_json=[{"sku": "A001", "qty": 10}],
|
||||
lines_json=[{"sku": "A001", "reservation_id": "R-1", "qty": 10}],
|
||||
current_step="step2_parse_confirm",
|
||||
step_payload_json={
|
||||
"rpa_inventory_source": {
|
||||
@@ -759,7 +759,7 @@ def test_auto_progress_resolves_dub_inventory_source_into_rpa_trigger(app, tmp_p
|
||||
parse_confidence=0.95,
|
||||
raw_content="Ship to Dublin DUB\nA001 x 10",
|
||||
ship_to="Dublin",
|
||||
lines_json=[{"sku": "A001", "qty": 10}],
|
||||
lines_json=[{"sku": "A001", "reservation_id": "R-1", "qty": 10}],
|
||||
step_payload_json={"destination": {"port_code": "DUB", "city": "Dublin"}},
|
||||
)
|
||||
db.session.add(task)
|
||||
@@ -928,7 +928,7 @@ def test_parse_stage_ui_state_lists_all_issues(app):
|
||||
"issues": [
|
||||
{
|
||||
"line_index": 0,
|
||||
"sku": "A001",
|
||||
"part_number": "A001",
|
||||
"field": "reservation_id",
|
||||
"reason": "invalid_format",
|
||||
"severity": "blocking",
|
||||
@@ -954,7 +954,7 @@ def test_parse_stage_ui_state_lists_all_issues(app):
|
||||
assert issues[0] == "无法根据发货通知唯一确定库存查询来源"
|
||||
assert "部分订单行缺少 Reservation ID,可能影响精确匹配。" in issues
|
||||
assert "解析引擎回退到启发式规则,请人工核对字段。" in issues
|
||||
assert "第 1 行 SKU A001:Reservation ID 1f1a682dfdc446a393415dee93eb36ce 格式不合法。" in issues
|
||||
assert "第 1 行料号 A001:Reservation ID 1f1a682dfdc446a393415dee93eb36ce 格式不合法。" in issues
|
||||
assert "解析置信度不足,确认库存源后仍需复核解析结果。" in issues
|
||||
assert len(issues) == 5
|
||||
|
||||
|
||||
Reference in new issue
Block a user