feat(shipping-notice): 增强订单抽取与审计功能,支持取消与保留策略

- 在环境配置中新增进度细化、订单提取取消与审计导出相关的开关
- 实现订单抽取运行的取消功能,允许管理员在运行中进行操作
- 引入审计事件的保留策略,支持三年保留期的自动清理
- 更新相关模型与服务,确保新功能的完整性与可追溯性
- 增强文档与代码注释,反映新的业务逻辑与审计要求
This commit is contained in:
hugo committed 2026-07-30 14:52:21 +08:00
1 parent c85997884b
commit 95cdfe66b0
158 files changed
+19005 -1201

No files matched your search

+233 -14
View File
@@ -39,7 +39,9 @@
"platformApps": "Platform Apps",
"shippingOrderDocumentProfiles": "Doc Templates",
"shippingFieldAssets": "Field Assets",
"shippingOrderSchema": "Order Schema"
"shippingOrderSchema": "Order Schema",
"shippingAudit": "Audit center",
"shippingReviewSupervision": "Review supervision"
},
"shippingOrderExtractionRuns": {
"eyebrow": "READ-ONLY RUN DIAGNOSTICS",
@@ -55,6 +57,9 @@
"createdAt": "Created",
"totalDuration": "Total duration",
"viewDetail": "View details",
"actions": "Actions",
"cancelRun": "Cancel run",
"cancelFailed": "Failed to cancel run",
"previous": "Previous",
"next": "Next",
"loading": "Loading...",
@@ -168,6 +173,24 @@
"review_required": "Manual review required",
"failed": "Failed",
"cancelled": "Cancelled"
},
"healthStatus": "Health",
"healthStatuses": {
"healthy": "Healthy",
"degraded": "Degraded"
},
"activeCount": "Active runs",
"staleCount": "Stale / backlog",
"failureRate": "Failure rate",
"latencySummary": "Total latency P50 {p50} / P95 {p95} / Max {max}",
"staleRuns": "Stale runs: {runs}",
"healthUnavailable": "Health summary unavailable",
"staleOnly": "Stale only",
"cancellationInFlight": "Cancelling only",
"cancellation": "Cancellation",
"cancellationStates": {
"in_flight": "Cancelling",
"completed": "Cancelled"
}
},
"shippingOrderSchema": {
@@ -344,8 +367,8 @@
"placementHeader": "Order information",
"placementLine": "Item details",
"placement": {
"header": "Order information",
"line": "Item details"
"header": "Header",
"line": "Line"
},
"fieldType": {
"string": "Text",
@@ -552,10 +575,6 @@
"suggestPreviewEmpty": "All suggested fields are already adopted.",
"suggestConfirm": "Confirm adoption",
"suggestCancel": "Cancel",
"placement": {
"header": "Header",
"line": "Line"
},
"operationFailed": "Order template operation failed",
"fieldCategory": "Field category",
"fieldCategoryOption": {
@@ -2702,8 +2721,47 @@
"empty": "No validation runs yet.",
"completed": "Validation run completed.",
"failed": "Validation run failed.",
"currentDraft": "Current draft validation", "currentDraftHint": "The system checks the configuration and reads the current sample once.", "validateCurrent": "Validate current draft", "validating": "Validating...", "goPublishCheck": "Continue to publish check", "structureCheck": "Configuration check", "structureCheckHint": "Checks bindings, page coordinates, scopes, and line structure.", "sampleCheck": "Current sample read", "sampleCheckHint": "Checks whether the annotated sample returns fields and line items.",
"state": { "ready": "Current draft can enter publish check", "stale": "Configuration changed; validate again", "failed": "Validation failed; return to the editor", "pending": "Current draft has not been validated" }, "stateHint": { "ready": "Both configuration and sample checks passed.", "stale": "Historical validation belongs to an earlier draft and cannot publish.", "failed": "Fix the annotations and validate again.", "pending": "Save the annotations, then validate once." }, "runStatus": { "passed": "Passed", "failed": "Failed", "stale": "Stale", "pending": "Not run", "running": "Running" }, "resultsTitle": "Current sample results", "resultsHint": "Only reads from the current draft and current annotations. Deleted lines are shown for review only and are excluded from the order result.", "refreshResults": "Read again", "resultsLoading": "Reading current sample...", "resultsFailed": "No value was read or the read failed. Check the annotations in the editor.", "headerResults": "Order header", "lineResults": "Order lines", "noHeaderResults": "No order header fields were read from the current sample.", "noLineResults": "No order lines were read from the current sample.", "noValue": "No value read", "rowStatus": "Status", "deleted": "Deleted; excluded", "read": "Read"
"currentDraft": "Current draft validation",
"currentDraftHint": "The system checks the configuration and reads the current sample once.",
"validateCurrent": "Validate current draft",
"validating": "Validating...",
"goPublishCheck": "Continue to publish check",
"structureCheck": "Configuration check",
"structureCheckHint": "Checks bindings, page coordinates, scopes, and line structure.",
"sampleCheck": "Current sample read",
"sampleCheckHint": "Checks whether the annotated sample returns fields and line items.",
"state": {
"ready": "Current draft can enter publish check",
"stale": "Configuration changed; validate again",
"failed": "Validation failed; return to the editor",
"pending": "Current draft has not been validated"
},
"stateHint": {
"ready": "Both configuration and sample checks passed.",
"stale": "Historical validation belongs to an earlier draft and cannot publish.",
"failed": "Fix the annotations and validate again.",
"pending": "Save the annotations, then validate once."
},
"runStatus": {
"passed": "Passed",
"failed": "Failed",
"stale": "Stale",
"pending": "Not run",
"running": "Running"
},
"resultsTitle": "Current sample results",
"resultsHint": "Only reads from the current draft and current annotations. Deleted lines are shown for review only and are excluded from the order result.",
"refreshResults": "Read again",
"resultsLoading": "Reading current sample...",
"resultsFailed": "No value was read or the read failed. Check the annotations in the editor.",
"headerResults": "Order header",
"lineResults": "Order lines",
"noHeaderResults": "No order header fields were read from the current sample.",
"noLineResults": "No order lines were read from the current sample.",
"noValue": "No value read",
"rowStatus": "Status",
"deleted": "Deleted; excluded",
"read": "Read"
},
"orderProfilePublishCheck": {
"eyebrow": "PUBLISH GATE",
@@ -2719,7 +2777,16 @@
"noBlocking": "No blocking items.",
"warnings": "Warnings (confirm each item)",
"confirm": "Confirm publication",
"failed": "Publish check failed.", "readyTitle": "Validated draft", "readyHint": "The current-sample validation passed. Generate a check to review prerequisites and changes.", "reportTitle": "Publish check result", "blockedHint": "These issues must be fixed and cannot be acknowledged away.", "reviewHint": "Confirm all listed changes to publish this template version.", "confirmHint": "Confirm that you reviewed the changes above.", "currentValidationRequired": "The current draft must pass current-sample validation first.", "semanticDiffReview": "This version has semantic changes. Confirm that you reviewed them.", "unknownIssue": "The publish check found an issue that needs attention."
"failed": "Publish check failed.",
"readyTitle": "Validated draft",
"readyHint": "The current-sample validation passed. Generate a check to review prerequisites and changes.",
"reportTitle": "Publish check result",
"blockedHint": "These issues must be fixed and cannot be acknowledged away.",
"reviewHint": "Confirm all listed changes to publish this template version.",
"confirmHint": "Confirm that you reviewed the changes above.",
"currentValidationRequired": "The current draft must pass current-sample validation first.",
"semanticDiffReview": "This version has semantic changes. Confirm that you reviewed them.",
"unknownIssue": "The publish check found an issue that needs attention."
},
"shippingOrderProfiles": {
"title": "Order Document Profiles",
@@ -3112,15 +3179,22 @@
"gateTitle": "Pre-publish blind test",
"gateRequiredHint": "Complete and approve an independent blind test before entering the publish check.",
"gateApprovedHint": "The blind test for this draft is approved; you can enter the publish check.",
"status": { "missing": "Not created", "draft": "Action required", "approved": "Approved", "superseded": "Superseded" },
"status": {
"missing": "Not created",
"draft": "Action required",
"approved": "Approved",
"superseded": "Superseded"
},
"samples": "Samples: {count} · {status}",
"notRun": "not run",
"approvedHint": "This blind test is approved; no further run or approval is needed.",
"selectIndependentSample": "Select independent sample",
"loadIndependentSamples": "Load available samples",
"loadingIndependentSamples": "Loading available samples…",
"loadIndependentSamplesTimedOut": "Loading available samples timed out. Confirm the backend is running, then try again.",
"loadIndependentSamplesHint": "Load candidates only when adding a blind-test sample, so opening this page does not wait for historical-sample scanning.",
"selectSamplePlaceholder": "Select an order not used to annotate this template",
"sampleOption": "{filename} · P{page} · Table {table} · {rows} rows x {columns} columns · {header}",
"noIndependentSamples": "No independent sample is available. Upload and parse another matching order first.",
"reviewHint": "Mark every item correct or incorrect. Provide a correction for incorrect items; unreviewed items cannot be added.",
"row": "Line {index}",
@@ -3153,13 +3227,23 @@
"execution": "Run and approve",
"runHint": "Run reparses every blind-test sample with the current draft; all samples must pass before approval.",
"unknownSample": "Unknown sample",
"failure": { "title": "Execution failure details", "hint": "Use the reason to adjust annotations or reconfirm blind-test truth, then run again.", "fieldMismatch": "{sample}: the reread value for order field {field} differs from the human truth.", "fieldNeedsReview": "{sample}: order field {field} is not confirmed; check its anchor and coordinate range.", "fieldUnavailable": "{sample}: no usable value was read for order field {field}; check its anchor, page, and coordinate evidence.", "coordinateEvidenceMissing": "{sample}: table or page coordinate evidence is missing, so the blind test cannot run.", "rowsMismatch": "{sample}: reread order lines differ from the human truth.", "unknown": "{sample}: the blind test did not pass; check the raw diagnostic code below." },
"failure": {
"title": "Execution failure details",
"hint": "Use the reason to adjust annotations or reconfirm blind-test truth, then run again.",
"fieldMismatch": "{sample}: the reread value for order field {field} differs from the human truth.",
"fieldNeedsReview": "{sample}: order field {field} is not confirmed; check its anchor and coordinate range.",
"fieldUnavailable": "{sample}: no usable value was read for order field {field}; check its anchor, page, and coordinate evidence.",
"coordinateEvidenceMissing": "{sample}: table or page coordinate evidence is missing, so the blind test cannot run.",
"rowsMismatch": "{sample}: reread order lines differ from the human truth.",
"unknown": "{sample}: the blind test did not pass; check the raw diagnostic code below."
},
"run": "Run",
"approve": "Approve"
},
"workbench": {
"boundHistoricalSchema": "bound historical version",
"intro": "Drag evidence regions on a controlled document page; saved definitions contain no HTML or storage URL.", "returnToLibrary": "Back to document templates",
"intro": "Drag evidence regions on a controlled document page; saved definitions contain no HTML or storage URL.",
"returnToLibrary": "Back to document templates",
"structure": "Structure",
"saveStatus": {
"saved": "Saved",
@@ -3175,7 +3259,31 @@
"acceptSuggestion": "Accept",
"acceptAdjustedSuggestion": "Accept with adjustments",
"rejectSuggestion": "Reject",
"suggestionAdjustmentField": "Choose replacement field", "sampleValueUnavailable": "No value read", "orderFieldValueReading": "Reading", "orderFieldValueFailed": "Read failed", "currentSampleValue": "Current sample value", "selectedRegion": "Selected annotation", "recognitionResults": "Recognition results", "orderHeaderResults": "Order header fields", "orderLineResults": "Order line fields", "noRecognitionResults": "No structured result available", "lineResultField": "Line {row} · {field}", "previewState": { "idle": "Waiting", "updating": "Reading", "ready": "Updated", "failed": "Read failed" }, "evidenceStatus": { "read": "Read", "review": "Needs review", "loading": "Reading", "failed": "Read failed", "deleted": "Deleted; excluded from results", "unavailable": "No value read" },
"suggestionAdjustmentField": "Choose replacement field",
"sampleValueUnavailable": "No value read",
"orderFieldValueReading": "Reading",
"orderFieldValueFailed": "Read failed",
"currentSampleValue": "Current sample value",
"selectedRegion": "Selected annotation",
"recognitionResults": "Recognition results",
"orderHeaderResults": "Order header fields",
"orderLineResults": "Order line fields",
"noRecognitionResults": "No structured result available",
"lineResultField": "Line {row} · {field}",
"previewState": {
"idle": "Waiting",
"updating": "Reading",
"ready": "Updated",
"failed": "Read failed"
},
"evidenceStatus": {
"read": "Read",
"review": "Needs review",
"loading": "Reading",
"failed": "Read failed",
"deleted": "Deleted; excluded from results",
"unavailable": "No value read"
},
"openCanvas": "Create draft and open canvas",
"loadingPage": "Loading page...",
"canvasZoom": "Page zoom",
@@ -3201,6 +3309,15 @@
"drawHeader": "Draw header",
"drawOrderField": "Draw order field",
"drawOrderAnchor": "Draw order field label",
"drawDocumentMatchAnchor": "Draw document match anchor (label, then fixed value)",
"drawDocumentMatchAnchorShortcut": "Document match anchor (M): label, then fixed value",
"drawOrderAnchorShortcut": "Order field label (A)",
"drawOrderFieldShortcut": "Order field (O)",
"drawHeaderShortcut": "Detail header (H)",
"drawLineShortcut": "Detail row (L)",
"drawFieldShortcut": "Detail field (F)",
"drawExclusionShortcut": "Exclusion area (X)",
"autoSuggestShortcut": "Auto-mark (G)",
"drawLine": "Draw physical line",
"drawField": "Draw field",
"drawExclusion": "Draw exclusion",
@@ -3235,6 +3352,13 @@
"suggestedValue": "Detected value",
"orderAnchor": "Order field label",
"orderAnchorTool": "Field label",
"documentMatchAnchorTool": "Match anchor",
"documentMatchAnchorLabel": "Match anchor label",
"documentMatchAnchorValue": "Match anchor value",
"documentMatchAnchorHint": "Use the left toolbar to select the label and fixed value. Only text inside these boxes is matched, so notes cannot produce a false match.",
"documentMatchAnchorEmpty": "Use the Match anchor tool: select the label first, then the fixed value.",
"documentMatchAnchorTextMissing": "No text was detected in the selected area. Adjust the selection and try again.",
"orderFieldAnchorNext": "Field label read. Select the field value.",
"headerTool": "Table header",
"lineTool": "Detail row",
"fieldTool": "Detail field",
@@ -3422,5 +3546,100 @@
"identity_rule_set": "Customer identity rule sets",
"identity_rule": "Customer identity rules"
}
},
"shippingAudit": {
"title": "Run & audit",
"subtitle": "Query shipping audit events by time, actor, Run/Task and event type. Details show whitelist diffs only; exports are controlled and audited.",
"refresh": "Refresh",
"export": "Export CSV",
"exporting": "Exporting...",
"apply": "Apply",
"loading": "Loading...",
"empty": "No audit events",
"loadFailed": "Failed to load audit events",
"detailFailed": "Failed to load audit detail",
"exportFailed": "Export failed",
"detailTitle": "Audit detail",
"diff": "Diff",
"before": "Before",
"after": "After",
"noDiff": "No whitelist diff to show",
"total": "{count} total",
"previous": "Previous",
"next": "Next",
"filters": {
"eventType": "Event type",
"actorType": "Actor type",
"runNo": "Run no.",
"taskNo": "Task no.",
"operationId": "operation_id",
"q": "ID search",
"all": "All",
"actorId": "Actor ID",
"documentId": "Document ID",
"conversationId": "Conversation ID",
"sessionItemId": "Session work item",
"reviewCaseNo": "Review case no.",
"ownerUserId": "Owner user ID",
"requestId": "request_id",
"result": "Result",
"createdFrom": "From",
"createdTo": "To"
},
"columns": {
"time": "Time",
"event": "Event",
"actor": "Actor",
"run": "Run",
"task": "Task",
"result": "Result",
"conversation": "Conversation",
"sessionItem": "Work item",
"reviewCase": "Case"
}
},
"shippingReviewSupervision": {
"title": "Review supervision",
"subtitle": "Cross-user session PDF work items. Terminate or revoke confirmation requires a reason and explicit confirmation.",
"refresh": "Refresh",
"apply": "Apply",
"loading": "Loading...",
"empty": "No work items",
"loadFailed": "Failed to load supervision list",
"actionFailed": "Action failed. Please try again.",
"terminate": "Terminate",
"revoke": "Revoke confirmation",
"terminateTitle": "Terminate work item",
"revokeTitle": "Revoke confirmation",
"terminateImpact": "This forcibly closes work item {itemNo}. The owner can no longer review it.",
"revokeImpact": "This revokes the confirmation for work item {itemNo} (within 24h and before inventory match).",
"reasonLabel": "Reason (required)",
"reasonRequired": "A reason is required",
"confirmTerminate": "I confirm terminating this work item (CONFIRM_TERMINATE)",
"confirmRevoke": "I confirm revoking this confirmation (CONFIRM_REVOKE)",
"confirmRequired": "Check the confirmation box before submitting",
"submit": "Submit",
"submitting": "Submitting...",
"terminateSuccess": "Work item terminated",
"revokeSuccess": "Confirmation revoked",
"total": "{count} total",
"previous": "Previous",
"next": "Next",
"filters": {
"lifecycleStatus": "Lifecycle",
"ownerUserId": "Owner user ID",
"conversationId": "Conversation ID",
"q": "Search by ID",
"all": "All"
},
"columns": {
"itemNo": "Work item",
"owner": "Owner",
"conversation": "Conversation",
"document": "Current PDF",
"status": "Status",
"updated": "Updated",
"actions": "Actions"
}
}
}