Merge branch 'feature/export-cleaner-data' into dev

This commit is contained in:
Misaka
2026-03-03 22:52:43 +08:00
7 changed files with 236 additions and 6 deletions

View File

@@ -19,3 +19,32 @@ export interface OrderCleanDetail {
materialsSkipped: number
errors: string[]
}
/**
* Single validation result item for export
*/
export interface ExportResultItem {
materialName: string
materialCode: string
specification: string
model: string
managerName: string
isMarkedForDeletion: boolean
isSelected: boolean
}
/**
* Request payload for exporting validation results
*/
export interface ExportResultRequest {
items: ExportResultItem[]
}
/**
* Response for export operation
*/
export interface ExportResultResponse {
success: boolean
filePath?: string
error?: string
}

View File

@@ -4,7 +4,12 @@
*/
import type { ExtractorInput, ExtractorResult } from './extractor.types'
import type { CleanerInput, CleanerResult } from './cleaner.types'
import type {
CleanerInput,
CleanerResult,
ExportResultItem,
ExportResultResponse
} from './cleaner.types'
/**
* MySQL connection configuration
@@ -104,6 +109,12 @@ export interface CleanerAPI {
runCleaner: (
input: CleanerInput
) => Promise<{ success: boolean; data?: CleanerResult; error?: string }>
/**
* Export validation results to Excel
* @param items - Validation result items to export
*/
exportResults: (items: ExportResultItem[]) => Promise<ExportResultResponse>
}
/**