feat: persist captured order execution and controlled batch resend

This commit is contained in:
abaishu0730 committed 2026-10-19 13:37:32 +08:00
1 parent b8cb1e11c6
commit 20589dd950
12 files changed
+419 -42

No files matched your search

+2 -2
View File
@@ -61,8 +61,8 @@ function previewMatch(rules, adapters, input) {
check('标题提取',extracted.issues.length===0,extracted.issues.join(';')||`从标题提取 ${extracted.orders.length} 个订单段落;惠州线索仅供核实,不触发额外发送`);
}
for (const key of new Set(['orderNo', 'appDate', 'customer', 'productLine', 'quantity', ...Object.keys(mappings), 'brief'])) {
const path = key === 'brief' ? extracted?`${titleSource} → 订单段落`:'brief' : mappings[key] || '';
const value = key === 'brief' ? extracted?extracted.brief:sample.brief : path && Object.hasOwn(raw, path) ? raw[path] : null;
const path = key === 'brief' ? extracted?`${titleSource} → 订单段落`:mappings.brief||'brief' : mappings[key] || '';
const value = key === 'brief' ? extracted?extracted.brief:mappings.brief?raw[mappings.brief]:sample.brief : path && Object.hasOwn(raw, path) ? raw[path] : null;
event[key] = value ?? null;
fieldTrace.push({ key, label: labels[key] || key, path, value: value ?? null });
}