feat(shipping-notice): 收敛订单处理状态与履约门禁
This commit is contained in:
1 parent
bffcd55b40
commit
70dd0051b8
153 files changed
+10916
-4296
No files matched your search
@@ -277,23 +277,17 @@ export function createIntakeOtStabilizer(options?: { graceMs?: number }): Intake
|
||||
}
|
||||
|
||||
/**
|
||||
* 归一化生命周期状态:把旧/兼容形态统一映射为新的单一状态。
|
||||
* 核心逻辑:waiting_human(旧 conversation_processing 兜底)一律归并为
|
||||
* waiting_review(新统一投影);pending_review 收敛到 waiting_review;
|
||||
* 其它保持原值。用于避免两套投影切换时造成状态文本闪烁、语义签名漂移。
|
||||
* 透传生命周期/用户态码;禁止把 F2 user_status 压成 stage 词。
|
||||
* 核心逻辑:waiting_human 保持 waiting_human;waiting_review 仅当输入本就
|
||||
* 是 stage/progress 码时原样返回。不再做 LEGACY-UNIFY 同义词折叠。
|
||||
* @param status - 原始 lifecycle / userStatus / status_label
|
||||
* @returns 归一化后的生命周期状态码
|
||||
* @returns 归一化后的状态码(空输入返回空串)
|
||||
*/
|
||||
export function normalizeLifecycleStatus(
|
||||
status: string | null | undefined,
|
||||
): string {
|
||||
const raw = String(status || '').trim().toLowerCase();
|
||||
if (!raw) return '';
|
||||
// [LEGACY-UNIFY] 旧兼容状态一律收敛为 waiting_review,保证显示「待复核」而非 waiting human。
|
||||
if (raw === 'waiting_human' || raw === 'pending_review' || raw === 'review_required') {
|
||||
return 'waiting_review';
|
||||
}
|
||||
if (raw === 'partially_completed') return 'waiting_review';
|
||||
if (raw === 'manual_upload' || raw === 'waiting_manual_upload') return 'manual_upload_pending';
|
||||
if (raw === 'retryable') return 'failed';
|
||||
return raw;
|
||||
@@ -888,8 +882,8 @@ export function resolveConversationProcessingFromUnified(
|
||||
|
||||
/**
|
||||
* 归一化旧 conversation_processing 投影的生命周期状态。
|
||||
* 核心逻辑:将所有组的 userStatus/status_label 统一为新形态,waiting_human 归并为 waiting_review,
|
||||
* 避免 work_items 为空回退时,旧投影状态与统一 work_items 状态来回切换造成文案闪烁。
|
||||
* 核心逻辑:浅拷贝 tasks 并规范 ui_state;userStatus/status_label 保持 F2 原词,
|
||||
* 禁止把 waiting_human 折叠为 waiting_review。
|
||||
*
|
||||
* @param projection - 原始 embedded conversation_processing 投影
|
||||
* @returns 归一化后的投影(新对象,浅拷贝 tasks 并覆盖 userStatus/status_label)
|
||||
|
||||
Reference in new issue
Block a user