feat(shipping-notice): 落地 XFA 统一视觉拆分确认门禁与处理投影收敛
闭合拆分预览令牌单次消费、样本 checksum 绑定与确认审计;正式提取改为 bindings-only。 同步统一标注工作台交互,并补齐进度投影/任务中心与迁移文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d2b3d74def
commit
84a881b554
195 files changed
+20269
-3463
No files matched your search
@@ -481,6 +481,8 @@ describe('conversationProcessingProjection', () => {
|
||||
sourceType: 'eml',
|
||||
rootOrderTaskNo: 'OT-WAIT',
|
||||
shippingNoticeNo: null,
|
||||
runNo: 'RUN-WAIT',
|
||||
caseNo: 'CASE-WAIT',
|
||||
conversationId: 'conv-1',
|
||||
submissionNo: 'SOS-1',
|
||||
intakeNo: 'SNI-2',
|
||||
@@ -545,6 +547,53 @@ describe('conversationProcessingProjection', () => {
|
||||
expect(projection!.processing.map((t) => t.user_task_no)).toEqual(['OT-RUN']);
|
||||
expect(projection!.needs_action[0]?.file_count).toBe(2);
|
||||
expect(projection!.needs_action[0]?.display_kind).toBe('multi_document_task');
|
||||
// [P0] 合成任务必须透传 run_no,禁止写死 null。
|
||||
expect(projection!.needs_action[0]?.run_no).toBe('RUN-WAIT');
|
||||
});
|
||||
|
||||
it('deduplicates conversation total_files by authoritative PDF id', () => {
|
||||
const base = {
|
||||
sourceType: 'direct_pdf' as const,
|
||||
shippingNoticeNo: null,
|
||||
conversationId: 'conv-1',
|
||||
submissionNo: 'SOS-1',
|
||||
intakeNo: 'SNI-1',
|
||||
status: 'waiting_review' as const,
|
||||
stage: 'waiting_review' as const,
|
||||
progressVersion: 1,
|
||||
lastActivityAt: '2026-08-06T00:00:00Z',
|
||||
currentGate: null,
|
||||
availableActions: ['open_order_review'],
|
||||
childOrderTasks: [],
|
||||
};
|
||||
const workItems: ShippingProcessingProjection[] = [
|
||||
{
|
||||
...base,
|
||||
workItemType: 'order_task',
|
||||
workItemNo: 'OT-A',
|
||||
rootOrderTaskNo: 'OT-A',
|
||||
sourceSummary: {
|
||||
emailSubject: null, filename: 'a.pdf', documentId: 17,
|
||||
documentCount: 1, parsedDocumentCount: 1, candidateCount: 1,
|
||||
customerName: null, poNumber: 'PO-A',
|
||||
},
|
||||
},
|
||||
{
|
||||
...base,
|
||||
workItemType: 'order_task',
|
||||
workItemNo: 'OT-B',
|
||||
rootOrderTaskNo: 'OT-A',
|
||||
sourceSummary: {
|
||||
emailSubject: null, filename: 'a.pdf', documentId: 17,
|
||||
documentCount: 1, parsedDocumentCount: 1, candidateCount: 1,
|
||||
customerName: null, poNumber: 'PO-B',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const projection = projectConversationProcessingFromWorkItems(workItems);
|
||||
// 异常重复绑定同一主 PDF 时,顶部必须仍显示 1 个文件。
|
||||
expect(projection?.summary.total_files).toBe(1);
|
||||
});
|
||||
|
||||
it('prefers work_items task lists over embedded conversation_processing when both exist', () => {
|
||||
|
||||
Reference in new issue
Block a user