fix: resolve production ID case-sensitivity and SQL Server compatibility issues

- Add getTableName() method to convert MySQL table names to SQL Server format
- Use queryWithParams with sql.NVarChar for proper SQL Server parameter handling
- Implement case-insensitive matching for production IDs (e.g., 26b10433 vs 26B10433)
- Align resolver logic with validation-handler.ts for consistent database queries

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-03-04 11:27:37 +08:00
parent 240e3838ba
commit abe51d17fa
4 changed files with 342 additions and 206 deletions

View File

@@ -1,3 +1,5 @@
import type { ErpSession } from './erp.types'
export interface ExtractorInput {
orderNumbers: string[]
batchSize?: number
@@ -15,3 +17,22 @@ export interface OrderInfo {
orderNumber: string
productionId: string
}
/**
* Input for ExtractorCore - handles web page operations
*/
export interface ExtractorCoreInput {
session: ErpSession
orderNumbers: string[]
downloadDir: string
batchSize: number
onProgress?: (message: string, progress: number) => void
}
/**
* Result from ExtractorCore - list of downloaded file paths
*/
export interface ExtractorCoreResult {
downloadedFiles: string[]
errors: string[]
}