feat(shipping-notice): 新增库存快照管理与RPA批量导出功能
This commit is contained in:
1 parent
fc694a8f43
commit
d54f51ddc3
48 files changed
+4970
-543
No files matched your search
@@ -85,6 +85,7 @@ _BLOCKED_CHECKPOINTS = {
|
||||
CP_ALIGN_REVIEW,
|
||||
RS_SHORTAGE_REVIEW,
|
||||
CP_NOTICE_TEXT_EXTRACTION_FAILED,
|
||||
CP_UPLOAD_REQ,
|
||||
CP_UPLOAD_FAILED,
|
||||
}
|
||||
|
||||
@@ -142,6 +143,7 @@ def build_shipping_workflow_steps(task: ShippingTask, checkpoint: str | None) ->
|
||||
"""
|
||||
current_index = _derive_current_step_index(task)
|
||||
process_status = str(task.process_status or "").strip()
|
||||
pending_reason = str(task.pending_human_reason or "").strip()
|
||||
checkpoint_value = str(checkpoint or "").strip()
|
||||
steps: list[dict[str, str]] = []
|
||||
for index, step in enumerate(WORKFLOW_STEPS):
|
||||
@@ -153,7 +155,11 @@ def build_shipping_workflow_steps(task: ShippingTask, checkpoint: str | None) ->
|
||||
status = "current"
|
||||
else:
|
||||
status = "pending"
|
||||
if index == current_index and checkpoint_value in _BLOCKED_CHECKPOINTS:
|
||||
inventory_blocked = (
|
||||
index == 2
|
||||
and pending_reason in {PH_INV_UNAVAIL, PH_RPA_EXHAUSTED}
|
||||
)
|
||||
if index == current_index and (checkpoint_value in _BLOCKED_CHECKPOINTS or inventory_blocked):
|
||||
status = "blocked"
|
||||
steps.append({**step, "status": status})
|
||||
return steps
|
||||
|
||||
Reference in new issue
Block a user