feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程

清理废弃的shipping xfa ocr automark相关代码和job配置
新增收料报表管理的前端页面、路由和侧边栏入口
新增后端收料报表配置接口、数据库模型和RPA脚本
优化发货通知流程的重试策略,将shipping相关job默认不自动重试
移除废弃的库存源确认相关逻辑,更新流程门禁规则
重构订单模板的值适配器模块,新增坐标OCR值适配器
清理前端shipping菜单和action的废弃选项
更新相关文档和测试用例,调整.gitignore忽略规则
This commit is contained in:
hugo committed 2026-08-20 20:23:10 +08:00
1 parent 260465b72d
commit 1b6483a4ea
466 files changed
+32115 -33796

No files matched your search

@@ -291,7 +291,7 @@ function normalizeAggregateSummary(
/**
* 题4A:规范 inventory_preparation 结构化字段(snake_case → camelCase)。
* 注意:failed_sources 会进一步透传到 exhausted_sources 分开(二者互斥;仅 max_attempts 耗尽的源进 exhausted)。
* 注意:只投影当前准备结果;失败后由具体 Gate 动作决定下一步。
*/
function normalizeInventoryPreparation(raw: unknown): ShippingInventoryPreparationSummary | null {
if (!raw || typeof raw !== 'object') return null;
@@ -308,7 +308,6 @@ function normalizeInventoryPreparation(raw: unknown): ShippingInventoryPreparati
const preparedSources = toStrArr(item.prepared_sources ?? item.preparedSources);
const pendingSources = toStrArr(item.pending_sources ?? item.pendingSources);
const failedSources = toStrArr(item.failed_sources ?? item.failedSources);
const exhaustedSources = toStrArr(item.exhausted_sources ?? item.exhaustedSources);
const activeAttemptCount = Number(item.active_attempt_count ?? item.activeAttemptCount ?? 0) || 0;
const gateAttemptActive = Boolean(item.gate_attempt_active ?? item.gateAttemptActive ?? false);
const latestRaw = (item.latest_attempts ?? item.latestAttempts) as Record<string, unknown> | undefined;
@@ -348,7 +347,6 @@ function normalizeInventoryPreparation(raw: unknown): ShippingInventoryPreparati
preparedSources,
pendingSources,
failedSources,
exhaustedSources,
activeAttemptCount,
gateAttemptActive,
latestAttempts: Object.keys(latestAttempts).length ? latestAttempts : undefined,
@@ -424,14 +422,12 @@ export function normalizeShippingProcessingProjection(
assetStatus: readNullableString(summaryRaw, 'asset_status', 'assetStatus'),
},
childOrderTasks: children,
// [T9 用户态 Projection 7 字段] 优先读后端 user_* / blocking_reason / retryable / primary_action / facts;
// [T9 用户态 Projection 6 字段] 优先读后端 user_* / blocking_reason / primary_action / facts;
// 缺省为 null(旧后端不会下发,旧前端不读取,完全兼容)。
userStatus: readNullableString(item, 'user_status', 'userStatus') as ShippingProcessingProjection['userStatus'],
userStage: readNullableString(item, 'user_stage', 'userStage') as ShippingProcessingProjection['userStage'],
userCurrentGateCode: readNullableString(item, 'user_current_gate_code', 'userCurrentGateCode'),
blockingReason: normalizeBlockingReason(item.blocking_reason ?? item.blockingReason),
retryable:
(item.retryable as boolean | undefined) == null ? false : Boolean(item.retryable),
primaryAction: normalizePrimaryAction(item.primary_action ?? item.primaryAction),
uiState: normalizeProcessingUiState(item.ui_state ?? item.uiState),
facts: normalizeFacts(item.facts),