- Remove trailing whitespace in BIPUploadModule.bas
- Add missing newline at end of BomItem.cls
- Update .gitignore: rename Claude to AI Agent, add .sisyphus/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add new AccessDataModule for fetching data from Access database based on total queue number
- Add CommandButton3_Click handler in Sheet9 for Access data fetch
- Add support for new "总排号" (Total Queue Number) column at column A
- Adjust all column indices to accommodate the new column (shifted by +1)
- Standardize code style: Collection, Count, Quantity, ProductModel, Description
- Fix inventory check result to write to correct column (F instead of E)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add comprehensive AGENTS.md documentation files across the project structure to document the agent architecture and capabilities.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 生产订单号 field from column A of [产品订单] sheet
- Remove 表头型号 field from output
- Reorder columns to place 生产订单号 as first column
- Update ProcessSingleModel and CreateOutputRowArray signatures
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement automatic component inventory verification that marks
orders with insufficient stock as "Component Priority = No".
Key features:
- Reads orders from [产品订单] worksheet
- Parses BOM to identify component category materials
- Validates inventory against [现存量] worksheet
- Allocates stock in order sequence
- Handles missing components with warnings instead of errors
- Provides detailed statistics on completion
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add fjgn (附加功能) field extraction from instrument characteristics
- Extract additional features from model number's instrument feature field
- Merge all fields from index 5 onwards to handle dot separators in features
- Remove oil-fill type (Y+digit) suffix from additional features
- Normalize separators (comma and dot) to comma for consistent parsing
- Implement multi-value matching for fjgn conditions (contains logic)
- fjgn=N1: true if fjgn contains N1
- fjgn!=N1: true if fjgn does not contain N1
- Add fjgn to condition config in MainModule and BIPUploadModule
Fixes issue where additional features with dot separators (e.g., N3.N2.Y3)
were incorrectly parsed by merging all fields from index 5 onwards.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove "作者: Auto-generated" and date fields from module headers
- Clean up unnecessary metadata comments
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Rename Quantity to quantity in BomItem for consistent naming convention
- Update references in MainModule to use lowercase quantity
- Add newlines at end of files for consistency
- Update vba_metadata.json with new source path and document module
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Optimize BIPUploadModule and MainModule for better performance:
- Replace cell-by-cell writes with batch array operations
- Collect all output data in memory using Collection objects
- Use WriteBatchData to write all data in single operation
- Add CreateBIPRowArray and CreateOutputRowArray helper functions
- Remove deprecated WriteBIPRow and WriteOutputRow functions
Performance improvement:
- Before: N cell write operations per row (thousands of Excel calls)
- After: 1 batch write operation for all data
- Expected speedup: 10-100x depending on data volume
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update MainModule to support component priority field:
- Read component priority from column E of [产品订单] worksheet
- Pass component priority to ProcessSingleModel function
- Apply category exclusion logic based on priority flag:
- When "否"/"0"/"FALSE", exclude "部件" category
- Only extract sub-category materials when disabled
- Consistent with BIPUploadModule implementation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add support for excluding "部件" category based on component priority flag:
- BomExtractor: Add exclude categories functionality
- Add pExcludeCategories collection member
- Add SetExcludeCategories() and ClearExcludeCategories() methods
- Modify DetermineRequiredCategories() to skip excluded categories
- BIPUploadModule: Read and use component priority field
- Read component priority from column E of [产品订单] worksheet
- Pass component priority to ProcessSingleOrder()
- When priority is "否"/"0"/"FALSE", exclude "部件" category
- Only extract sub-category materials when component priority is disabled
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add BIPUploadModule to process product orders and generate BIP upload format:
- Read order data from [产品订单] worksheet
- Extract BOM using existing BomExtractor and ProductModelParser
- Output to [BIP上传模板] with formatted fields:
- Source document number, product code, quantity
- Line number (base 7000 + index)
- Material code (66 code from BOM)
- Supply method, required date, issue organization
- Planned outbound quantity, remarks for errors
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes:
1. Update all modules to use LoadData(wsPlatform) instead of LoadData(wsConfig, wsPlatform)
- modModelParserExamples.bas: Update 7 example procedures
- modBOMProcessor.bas: Update 4 procedures
- modModelParserTest.bas: Update 2 test procedures
2. Fix completeness check logic in GetValidMaterialsByModel
- Only check root categories to avoid duplicate checking of subcategories
- Previously, all required categories (including subcategories) were checked,
causing subcategories to be added to missing list multiple times
- Now only checks categories with ParentCategoryName = ""
- CheckCategoryCompleteness already recursively checks all subcategories
3. Improve completeness judgment logic for categories with subcategories
- Method 1: Parent category has 1 matching material → Complete
- Method 2: Parent category has 0 matching materials, but all subcategories are complete → Complete
- Other cases → Incomplete
Impact:
- Fixes "category missing" errors in Example9_BatchProcessOrders_WithCheck
- Eliminates duplicate entries in missing categories list
- Properly handles category hierarchy where parent categories are satisfied through subcategories
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Commented out verbose Debug.Print statements in `GetMaterialsByModel` and `FilterCategoryWithSubcategories` to reduce console noise.
- Added validation checks to ensure required worksheets ('平台配置清单', '产品订单') exist before loading data.
- Refactored order processing logic to aggregate results into a Collection for structured output generation, including headers.
- Update GetValidMaterialsByModel to aggregate and return missing
category names under the "MissingCategories" key.
- Remove debug print statements and unused variables to improve
code cleanliness.
- Enhance result visualization to display completeness status
with color formatting and detailed material tables.
Implemented logic to retrieve materials based on a model string and verify if the resulting set is complete.
Added:
- `GetValidMaterialsByModel`: Parses the model, extracts conditions, and matches materials against root categories.
- `CheckCategoryCompleteness`: Recursively validates categories to ensure exactly one material match per required category (leaf or parent).
This enables the BOM Manager to return a collection of materials alongside a boolean flag indicating if the collection satisfies the structural completeness rules.
Added the `autoFallback` optional parameter to `GetMaterialsByModel`.
This flag controls whether the search automatically descends to
subcategories when no matches are found in the target category.
- Defaults to True to maintain previous recursive behavior.
- When False, the search is restricted strictly to the specified category.
- Updated documentation with usage examples and logic explanations.
Refactored the material retrieval logic in GetMaterialsByModel to
automatically search within subcategories if no matches are found in the
specified parent category.
- Added FilterCategoryWithSubcategories helper function to handle recursive
searching and fallback logic.
- Restructured main function to delegate filtering to the new helper.
- Enhanced code comments to clarify the step-by-step matching process.
Refine project overview to include specific business context (Blaidy Company) and the main workbook file. Restructure the architecture section into a layered object-oriented design (Data, Processing, Application layers) and define the responsibilities of core VBA classes.
Add new technical documentation sections covering:
- Model number format parsing structure
- Condition expression language syntax
- Category hierarchy logic and picking strategies
- Material matching pipeline flow
Include VBA code examples for key methods such as CollectAllMaterials and GetMaterialsByCategoryAndModel to illustrate recursive traversal and material retrieval logic. Clarify the structure of key Excel configuration sheets.
- Introduced a comprehensive document detailing the project overview, goals, core functionalities, and technical architecture for the order material extraction feature.
- Defined the product model coding rules and extraction logic for selection conditions.
- Designed class structures for model parsing, condition evaluation, and order material list management.
- Outlined implementation steps, testing plans, and risk assessments for the development process.
- Created clsBOMManager for managing BOM data
- Added clsCategory and clsMaterialItem for category and material representation
- Implemented methods for loading and organizing BOM data from Excel
- Introduced .gitignore to exclude unnecessary files
- Added metadata JSON for module tracking