feat(cleaner-history): record missing orders with production ID tracking

Record ALL input orders in history, including resolution failures (not_found)
and ERP query misses (erp_not_found). Add ProductionId column to track original
总排号 input. Add 总排号 column and new status styles to the history UI. Fix
empty result caching that prevented retry on transient query failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-04-14 10:08:15 +08:00
parent 95eb44979a
commit 6f49596467
9 changed files with 278 additions and 39 deletions

View File

@@ -307,7 +307,7 @@ export class CleanerService {
for (const missingOrder of missingOrders) {
const missingMessage = '订单未出现在查询结果中'
result.errors.push(`Order ${missingOrder}: ${missingMessage}`)
result.details.push(this.createErrorDetail(missingOrder, missingMessage))
result.details.push(this.createErrorDetail(missingOrder, missingMessage, true))
}
},
{
@@ -1115,7 +1115,7 @@ export class CleanerService {
return /^SC\d{14}$/.test(value)
}
private createErrorDetail(orderNumber: string, message: string): OrderCleanDetail {
private createErrorDetail(orderNumber: string, message: string, notFound: boolean = false): OrderCleanDetail {
return {
orderNumber,
materialsDeleted: 0,
@@ -1129,7 +1129,8 @@ export class CleanerService {
retrySuccess: false,
materialsFailed: 0,
failedMaterials: [],
uncertainDeletions: 0
uncertainDeletions: 0,
notFound
}
}