feat(shipping): 实现订单批处理聊天聚合展示与优化后端逻辑

This commit is contained in:
hugo committed 2026-08-13 17:40:43 +08:00
1 parent 11cef575b4
commit 523b791c92
38 files changed
+2868 -414

No files matched your search

@@ -311,7 +311,7 @@ describe('useShippingNoticeWorkflow', () => {
ctl.stop();
});
it('derives sibling OT tasks from work_items when embedded conversation_processing omits them', async () => {
it('aggregates sibling EML OT work_items into one highest-attention Intake card', async () => {
api.getShippingProcessing.mockResolvedValue({
conversation_id: 'conv-1',
work_items: [
@@ -397,7 +397,12 @@ describe('useShippingNoticeWorkflow', () => {
await Promise.resolve();
expect(ctl.processing.value?.needs_action.map((t) => t.user_task_no)).toEqual(['OT-ROOT']);
expect(ctl.processing.value?.processing.map((t) => t.user_task_no)).toEqual(['OT-SIBLING']);
expect(ctl.processing.value?.processing).toEqual([]);
expect(ctl.processing.value?.needs_action[0]?.aggregateSummary).toMatchObject({
intakeNo: 'SNI-1',
total: 2,
processing: 1,
});
expect(ctl.processing.value?.focused_task_no).toBe('OT-ROOT');
expect(ctl.processing.value?.recent_task_no).toBe('OT-SIBLING');
ctl.stop();