Major refactoring of BOM matching error handling mechanism to separate
matching phase from validation phase, enabling cross-worksheet validation
and non-blocking warnings.
Changes:
- clsErrorLogger: Add warning support
- Add RecordWarning() method for non-blocking issues
- Add HasWarnings and HasIssues properties
- Update PrintReport() to show errors and warnings with color coding
- Add "Type" column to distinguish errors from warnings
- M09_BOMExtractor: Implement two-phase validation
- Replace MatchAllMaterialTypes() with MatchAllMaterialTypesWithValidation()
- Add ValidateAllMatchResults() for unified cross-worksheet validation
- Phase 1 (Collection): Gather all worksheet matches without recording errors
- Phase 2 (Validation): Validate all results with special rules for components
- Phase 3 (Generation): Create final material collection based on validation
- Add ToArray() helper for Collection to Array conversion
- Enhanced component/joint/element validation:
- Support warnings for non-blocking conflicts (e.g., component + joint both matched)
- Better cross-validation between "部件", "接头", "弹性元件" worksheets
- Distinguish between errors (blocking) and warnings (non-blocking)
- Documentation updates:
- Update BOM匹配错误判断机制详解.md to v2.0
- Document two-phase verification approach
- Add warning scenarios and handling
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove Test_PP_06_FullIntegration_流程详解.md as preprocessing
workflow is now documented in code comments and CLAUDE.md.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add M05_PreProcessor module to handle value mapping and condition
simplification for "接头" category before parsing.
Features:
- Value mapping: azxs codes (A0/AT/AH→径向, B0/BT/BZ/BH→下轴向,
Z0/ZT/ZZ/ZH→中轴向) and lcfw ranges (M01-M11→低压, M12-M16→高压)
- OR condition merging: automatically removes duplicate OR segments
- Smart parentheses handling: removes parentheses for single atoms,
preserves them when needed for logical structure
- Recursive nested expression processing
- Graceful degradation when "对照表" worksheet is missing
Integration:
- Modified M01_Main to initialize preprocessor after M03_Logic
- Preprocessing applied only for "接头" category
- Updated M99_TestRunner with 8 comprehensive test cases
- All tests passing (50 total: 42 core + 8 preprocessing)
Documentation:
- Added detailed flow documentation for Test_PP_06_FullIntegration
with mermaid diagrams in docs/Test_PP_06_FullIntegration_流程详解.md
- Updated CLAUDE.md with preprocessing module description and
documentation guidelines (docs/ vs reference_docs/)
Example transformation:
Input: gclj=M16 AND (azxs=A0 OR azxs=AT) AND (lcfw=M01 OR lcfw=M15)
Output: gclj=M16 AND azxs=径向 AND (lcfw=低压 OR lcfw=高压)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add *.xlsx to gitignore to exclude Excel files from version control
- Remove Chinese documentation files that are no longer needed
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>