feat(shipping_notice): 添加重新上传发货通知功能

- 新增接口支持覆盖当前任务的发货通知
- 重新解析时重置任务状态,避免重复任务
- 增加库存 RPA 等待时间的复查逻辑
- 更新状态机以处理文本抽取失败的情况
- 增强测试用例以覆盖新功能
This commit is contained in:
hugo committed 2026-06-29 17:52:17 +08:00
1 parent f434402530
commit 7f1d5dfbcd
20 files changed
+691 -26

No files matched your search

@@ -26,6 +26,7 @@ export interface ShippingMenuHandlerContext {
sendShippingMenuMessage: (message: string) => Promise<void>;
openShippingInventoryMappingFormForTask: (taskId: string) => Promise<boolean>;
openShippingInventoryPicker: () => boolean;
openShippingNoticePicker: () => boolean;
executeShippingDecision: (decision: string, displayText?: string) => Promise<boolean>;
executeShippingManualUpload: (taskId: string, displayText?: string) => Promise<boolean>;
refreshShippingActions: () => Promise<void>;
@@ -175,6 +176,10 @@ export function createShippingMenuHandlers(ctx: ShippingMenuHandlerContext) {
ctx.openShippingInventoryPicker();
return;
}
if (action.id === 'replace_notice_file') {
ctx.openShippingNoticePicker();
return;
}
if (action.id === 'match_inventory') {
if (chatMsg?.shipping_actions_used) return;
if (chatMsg) chatMsg.shipping_actions_used = true;