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
@@ -39,27 +39,26 @@ def build_chat_actions_payload(task) -> dict:
|
||||
构建聊天气泡侧动作按钮兼容 payload。
|
||||
|
||||
核心逻辑:复用统一 UI State 读模型,抽取聊天侧 checkpoint/summary/process_gate;
|
||||
action_buttons 已由 ui_state 在存在 ProcessExecution 时按 Gate 规则收缩(阻断清零)。
|
||||
业务动作只从 ui_state.actions 返回,Chat 不再暴露旧 action_buttons。
|
||||
|
||||
Args:
|
||||
task: ShippingNotice 模型实例。
|
||||
|
||||
Returns:
|
||||
包含 task_no、checkpoint、process_gate、action_buttons 与摘要的字典。
|
||||
包含 task_no、checkpoint、process_gate、actions 与摘要的字典。
|
||||
"""
|
||||
state = build_task_ui_state(task)
|
||||
return {
|
||||
"task_no": state.get("task_no"),
|
||||
"batch_no": state.get("batch_no"),
|
||||
"checkpoint": state.get("checkpoint"),
|
||||
"process_status": state.get("process_status"),
|
||||
"review_status": state.get("review_status"),
|
||||
"pending_human_reason": state.get("pending_human_reason"),
|
||||
"match_status": state.get("match_status"),
|
||||
"current_step": state.get("current_step"),
|
||||
"stage": state.get("stage"),
|
||||
"todo": state.get("todo"),
|
||||
"actions": state.get("actions"),
|
||||
"reason": state.get("reason"),
|
||||
"lifecycle_status": state.get("lifecycle_status"),
|
||||
"summary": state.get("summary"),
|
||||
"process_gate": state.get("process_gate"),
|
||||
"action_buttons": state.get("action_buttons") or [],
|
||||
"updated_at": state.get("updated_at"),
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user