feat(shipping-notice): 新增发货通知自动上传功能与候选资格评估

- 在环境配置中新增 SHIPPING_NOTICE_AUTO_UPLOAD_ENABLED 选项,默认关闭,需显式开启以支持自动上传。
- 引入新的 pytest.ini 文件,增加测试标记以支持自动化测试。
- 删除不再使用的 seed_shipping_notice_agents.py 文件,简化代码库。
- 更新相关 API,增强发货通知与候选资格评估功能,支持多种筛选条件。
- 增强文档与代码注释,反映新的业务逻辑与功能要求。
This commit is contained in:
hugo committed 2026-08-02 19:26:35 +08:00
1 parent cef3d5b26a
commit 3a9fbac2fc
226 files changed
+25010 -2098

No files matched your search

+233 -2
View File
@@ -1481,8 +1481,120 @@
"evidenceSummary": "选择字段旁的定位图标可查看证据。",
"evidenceAt": "PDF 第 {page} 页",
"evidenceNoHighlight": "该证据没有可靠坐标,仅提供页码与引文,不显示虚假高亮。",
"evidenceInvalidHighlight": "坐标非法或与字段值不一致,已禁止绘制高亮框。",
"highlightQuality": {
"verified": "已验证",
"candidate": "候选",
"unavailable": "无坐标",
"invalid": "坐标无效"
},
"highlightSource": {
"pdf_coordinate": "PDF 坐标",
"frozen_layout_cell": "冻结单元格",
"native_glyph": "原生文字",
"ocr": "OCR",
"machine_extraction": "机器抽取",
"unknown": "未知来源"
},
"highlightLegend": {
"verified": "已验证位置(黄实线)",
"candidate": "候选位置,尚未严格验证(橙虚线)"
},
"coordinateIssues": {
"coordinate_missing": "未获得可靠字段级坐标",
"coordinate_bbox_invalid": "坐标几何非法",
"coordinate_page_missing": "缺少页码",
"coordinate_page_out_of_range": "页码超出范围",
"duplicate_text_coordinate_ambiguous": "重复文本导致坐标歧义",
"value_bbox_text_mismatch": "高亮区域文本与字段值不一致",
"quote_not_independent": "缺少独立区域文本,无法证明高亮对应字段值",
"cell_token_unbound": "单元格未绑定文字词元",
"ocr_confidence_insufficient": "OCR 置信度不足",
"ocr_multi_candidate": "OCR 存在多个候选",
"html_only_no_pdf_bbox": "仅有 HTML 结构,无 PDF 坐标",
"coordinate_outside_table": "坐标超出表格范围",
"coordinate_shared_token_conflict": "文字词元被多个单元格共享"
},
"evidenceDrawer": {
"title": "证据核对",
"pageUnknown": "页码未知",
"prevEvidence": "上一证据",
"nextEvidence": "下一证据",
"field": "字段:{field}",
"currentValue": "当前值",
"machineValue": "机器值",
"source": "来源",
"highlightQuality": "高亮质量",
"highlightSource": "坐标来源",
"layoutPath": "版面路径",
"detailsToggle": "证据详情"
},
"previewZoom": {
"fitWidth": "适合宽度",
"fitWidthShort": "适宽",
"fitPage": "适合页面",
"fitPageShort": "适页",
"actual": "实际大小 100%",
"jumpPage": "跳转到页码",
"go": "跳转"
},
"workbench": {
"mode": {
"standard": "标准复核",
"evidence": "证据核对",
"inventory": "库存处理",
"reparse": "重新识别",
"confirm_progress": "建单进度"
},
"enterInventory": "查看库存问题",
"returnStandard": "返回标准复核",
"openPdf": "打开 PDF",
"closePdf": "关闭 PDF",
"pinPdf": "退出后保留",
"unpinPdf": "退出后关闭",
"pinPdfHint": "退出证据模式后仍保留 PDF 打开(不是固定侧栏)",
"unpinPdfHint": "退出证据模式时关闭 PDF",
"expandPdf": "展开",
"collapsePdf": "收起",
"expandPdfHint": "放大当前浮动证据面板",
"collapsePdfHint": "恢复紧凑浮窗尺寸",
"dockPdf": "固定为侧栏",
"undockPdf": "取消固定",
"dockPdfHint": "切换为双栏对照(会占用编辑区宽度)",
"undockPdfHint": "改回浮动证据面板,释放订单编辑宽度",
"movePdfLeft": "移至左侧",
"movePdfRight": "移至右侧",
"movePdfSideHint": "将浮窗移到另一侧,减少遮挡当前字段",
"moreActions": "更多",
"openVersionHistory": "版本历史",
"auditFailed": "审计记录失败,敏感面板未打开,请重试",
"summaryRail": "摘要",
"aiForFocusedField": "针对当前字段请求 AI 建议",
"primaryBlock": "优先处理",
"blockCount": "共 {count} 项待处理",
"viewFullChecks": "查看完整检查",
"fullChecksTitle": "完整订单检查",
"noLineChecks": "暂无明细检查结果",
"inventoryIssues": "库存处理问题"
},
"viewEvidence": "查看证据",
"dblclickLocateHint": "双击定位 PDF 证据(Alt+[ / Alt+] 切换异常字段)",
"exceptionNav": {
"prev": "上一异常",
"next": "下一异常",
"prevHint": "上一个异常字段(Alt+[)",
"nextHint": "下一个异常字段(Alt+])"
},
"locateSource": "定位原文:{field}",
"locateUnavailableHint": "无可靠坐标;可点击查看诊断,不能执行精确高亮",
"locateCandidateHint": "候选位置,尚未严格验证;可定位预览但不可当作已确认",
"locateDiagnoseOnly": "仅诊断",
"locateLegend": {
"title": "定位图标说明",
"verified": "绿色准星:已验证坐标,可精确高亮",
"candidate": "橙色准星:候选坐标,仅供参考",
"unavailable": "红色警示:无可靠坐标或坐标非法,仅可查看诊断,不能精确高亮"
},
"orderFields": "订单字段",
"schemaVersion": "订单字段版本 V{version}",
"issues": "待处理问题",
@@ -1637,7 +1749,9 @@
"autoProgress": {
"result": "自动推进结果:{status}",
"checkpoint": "当前检查点:{checkpoint}",
"viewTask": "查看订单进度",
"viewTask": "返回对话查看进度",
"returnToChat": "返回对话查看进度",
"returnedFocusHint": "已返回对话,并聚焦任务 {taskNo}(见右侧「本次处理中」)",
"status": {
"ok": "已完成当前可自动执行步骤",
"running": "正在处理中",
@@ -1697,6 +1811,99 @@
"viewReadonly": "只读查看",
"open": "打开"
},
"customerResolution": {
"title": "客户识别",
"subtitle": "建单前必须确认标准客户;与「重新识别此 PDF」相互独立。",
"recognizedAs": "识别结果",
"rawName": "原文客户名",
"selectCustomer": "选择标准客户",
"retryCustomer": "重新识别客户",
"retrying": "识别中…",
"retryDone": "已重新识别客户",
"retryFailed": "重新识别客户失败",
"confirmed": "客户已确认",
"confirmReason": "复核工作台人工确认标准客户",
"pdfReparseHint": "若 PDF 版面错误,请使用顶部「重新识别此 PDF」,不要用本区按钮。",
"status": {
"confirmed": "已确认",
"unique_candidate": "唯一候选待确认",
"ambiguous": "存在多个候选",
"unmatched": "未识别",
"unresolved": "未确认"
}
},
"fieldConflict": {
"title": "字段冲突待裁决({count})",
"subtitle": "多来源取值不一致时不会自动写入。请选用一方或填写手工值后再建单。",
"optionLabel": "候选 {index}",
"adoptOption": "采用此值",
"customValue": "填写手工值",
"customPlaceholder": "输入最终字段值",
"submitCustom": "确认手工值",
"focusEvidence": "定位证据",
"resolveSuccess": "冲突已裁决,建单资格已刷新",
"resolveFailed": "裁决失败,请刷新后重试",
"resolveReason": "复核工作台人工裁决字段冲突",
"reasons": {
"cross_source_conflict": "多来源取值冲突",
"insufficient_score_margin": "候选分差不足",
"field_conflict": "字段冲突"
},
"fields": {
"reservation_id": "预约单号",
"qty": "数量",
"customer_pn": "客户料号",
"po_number": "采购订单号"
}
},
"duplicate": {
"title": "重复订单待裁决",
"subtitle": "与历史任务疑似重复时须先选择处理方式,再建单。",
"resolvedBadge": "已裁决",
"resolutionLabel": "处理方式:{action}",
"resolveSuccess": "重复处理已保存,建单资格已刷新",
"resolveFailed": "保存重复处理失败,请刷新后重试",
"resolving": "处理中…",
"refresh": "重新检测重复",
"refreshing": "检测中…",
"refreshDone": "已重新检测重复",
"refreshFailed": "重新检测失败",
"status": {
"none": "未发现重复",
"unchecked": "尚未检测",
"exact_file": "文件内容完全相同",
"same_active_task": "存在进行中的相同业务任务",
"same_completed_task": "存在已完成的相同业务任务",
"possible_duplicate": "疑似重复",
"same_business_content": "业务内容相同",
"possible_revision": "可能为修订版本"
}
},
"profileMatch": {
"title": "文档模板匹配",
"subtitle": "展示本 PDF 命中的文档模板与候选分;换模板需重新识别。",
"selected": "命中模板",
"noSelected": "未选定模板",
"routeType": "路由类型",
"executionMode": "执行模式",
"score": "得分 {score}",
"reselectHint": "若模板不对或版面漂移,请使用顶部「重新识别此 PDF」;门禁重路由见下方恢复卡片。",
"status": {
"unique_match": "唯一命中",
"selected_by_score": "按得分选定",
"no_special_profile_feature": "无专用模板特征",
"no_match": "未命中",
"ambiguous": "多个候选",
"layout_drift": "版面漂移",
"evidence_insufficient": "证据不足",
"unknown": "未知"
},
"reasons": {
"profile_ambiguous": "多个模板候选分差不足",
"profile_not_matched": "未匹配到可用模板",
"profile_drift": "版面相对模板发生漂移"
}
},
"buildEligibility": {
"title": "订单检查",
"subtitle": "检查订单信息和库存来源是否满足创建条件。",
@@ -1714,6 +1921,13 @@
"blockReason": "需要处理的原因",
"manualReason": "人工说明",
"confirmBlocked": "当前草稿未满足建单资格,请先处理库存源或校验问题后再确认。",
"gates": {
"customer_confirmed": "客户已确认",
"required_fields_complete": "必填字段完整",
"evidence_complete": "证据完整",
"duplicate_resolved": "重复检测已完成",
"field_conflicts_resolved": "字段冲突已解决"
},
"status": {
"ready": "可建单",
"needs_review": "待复核",
@@ -1803,7 +2017,21 @@
}
},
"shippingWorkflow": {
"title": "本次处理",
"title": "本次处理中",
"showDetails": "在弹层中查看完整列表",
"detailsDrawerTitle": "批次与文件列表",
"detailsDrawerHint": "弹层展示,不压缩对话区",
"focusTaskBanner": "已聚焦任务 {taskNo},进度见下方处理对象(非独立 Task 工作台)",
"compactSummary": "{active} 个处理中 · 共 {total} 个文件",
"emptyCompact": "暂无进行中的对象;可打开弹层查看全部文件。",
"hideDetails": "关闭",
"processingObjectsTitle": "处理对象({count})",
"objectKind": {
"run": "识别运行",
"candidate": "订单候选",
"task": "履约任务",
"process_gate": "需人工处理"
},
"pdfCount": "共 {count} 个 PDF",
"pendingOnlyFilter": "仅看待处理",
"loading": "加载中…",
@@ -1846,6 +2074,9 @@
"closed": "已完成",
"cancelled": "已取消",
"manual_upload_pending": "待人工上传登记",
"upload_rpa_pending": "货代上传 RPA 进行中",
"upload_rpa_running": "货代上传 RPA 进行中",
"upload_rpa_failed": "货代上传 RPA 失败",
"unknown": "状态待确认"
},
"closedReason": {