refactor: replace row index with production order number in error reports
All checks were successful
NTFY Notification / notify (push) Successful in 12s

Replace "原表行号" (original row number) field with "生产订单号" (production order number) in BOM Extraction System error reporting to improve traceability.

Changes:
- clsErrorLogger: Update Record/RecordWarning signatures to accept OrderNo (String) instead of RowIndex (Long)
- M09_BOMExtractor: Propagate productionOrderNo through validation chain for context-aware error reporting
- M06/M07/M08: Use empty string for system-level errors without production order context
- Error report header: Change column B from "原表行号" to "生产订单号"

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-26 10:12:59 +08:00
parent 8477792d41
commit 7fea574531
5 changed files with 32 additions and 30 deletions

View File

@@ -62,7 +62,7 @@ Public Function ParseProductModel(ByVal modelString As String) As Object
If Len(headerPart) = 0 Then
If Not g_Logger Is Nothing Then
g_Logger.Record 0, "M06.ParseProductModel", "ModelParseError", _
g_Logger.Record "", "M06.ParseProductModel", "ModelParseError", _
"无法提取表头部分,型号可能为空或格式错误", modelString
End If
Set ParseProductModel = params
@@ -75,7 +75,7 @@ Public Function ParseProductModel(ByVal modelString As String) As Object
If Not IsArray(segments) Then
If Not g_Logger Is Nothing Then
g_Logger.Record 0, "M06.ParseProductModel", "ModelParseError", _
g_Logger.Record "", "M06.ParseProductModel", "ModelParseError", _
"表头分割失败", headerPart
End If
Set ParseProductModel = params
@@ -85,7 +85,7 @@ Public Function ParseProductModel(ByVal modelString As String) As Object
' 步骤3: 验证段数是否足够
If UBound(segments) - LBound(segments) + 1 < MODEL_HEADER_MIN_SEGMENTS Then
If Not g_Logger Is Nothing Then
g_Logger.Record 0, "M06.ParseProductModel", "ModelParseError", _
g_Logger.Record "", "M06.ParseProductModel", "ModelParseError", _
"表头段数不足,需要至少" & MODEL_HEADER_MIN_SEGMENTS & "段,实际" & _
(UBound(segments) - LBound(segments) + 1) & "段", headerPart
End If
@@ -160,7 +160,7 @@ Public Function ParseProductModel(ByVal modelString As String) As Object
ErrorHandler:
If Not g_Logger Is Nothing Then
g_Logger.Record 0, "M06.ParseProductModel", "SystemError", _
g_Logger.Record "", "M06.ParseProductModel", "SystemError", _
"解析过程发生错误: " & Err.Description, modelString
End If
Set ParseProductModel = CreateObject("Scripting.Dictionary")