refactor(shipping-notice): 重构货代发货通知状态管理,移除废弃的process_status字段
统一货代发货通知的业务阶段为四个标准阶段:接收解析、订单复核、发货准备、上传完成 设置 ui_state 为前端唯一状态数据源,不再依赖 process_status 驱动业务流程 删除 shipping_notices 表的废弃 process_status 列及对应复合索引,新增数据库迁移脚本 替换全栈代码中所有对 process_status 的引用为生命周期、上传状态等领域字段 更新相关文档、测试用例与前端展示逻辑适配新的状态管理规则
This commit is contained in:
1 parent
6684e7181a
commit
5ef8329bd8
178 files changed
+5091
-1734
No files matched your search
@@ -98,7 +98,6 @@ def _task_failure_descriptor(task: ShippingNotice | None) -> dict[str, str] | No
|
||||
if not task_no:
|
||||
return None
|
||||
|
||||
process_status = _clean_text(getattr(task, "process_status", None)).lower()
|
||||
review_status = _clean_text(getattr(task, "review_status", None)).lower()
|
||||
match_status = _clean_text(getattr(task, "match_status", None)).lower()
|
||||
pending_reason = _clean_text(getattr(task, "pending_human_reason", None)).lower()
|
||||
@@ -110,13 +109,13 @@ def _task_failure_descriptor(task: ShippingNotice | None) -> dict[str, str] | No
|
||||
"label": "异常:库存不足",
|
||||
"summary": f"{task_no} 库存匹配失败",
|
||||
}
|
||||
if process_status == "rejected" or review_status == "rejected":
|
||||
if review_status == "rejected" or str(getattr(task, "lifecycle_status", "") or "").lower() in {"voided", "archived"}:
|
||||
return {
|
||||
"reason": "rejected",
|
||||
"label": "已驳回",
|
||||
"summary": f"{task_no} 已被驳回",
|
||||
}
|
||||
if process_status == "upload_failed" or upload_status == "failed" or pending_reason == "upload_rpa_failed":
|
||||
if upload_status == "failed" or pending_reason == "upload_rpa_failed":
|
||||
return {
|
||||
"reason": "upload_failed",
|
||||
"label": "异常:上传失败",
|
||||
|
||||
Reference in new issue
Block a user