docs: expand AutoBOM architecture and implementation details

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.
This commit is contained in:
Misaka_Company
2026-01-20 13:42:03 +08:00
parent bc5ea92c52
commit a1347017e3
13 changed files with 2682 additions and 828 deletions

View File

@@ -6,19 +6,19 @@ Option Explicit
Public categoryName As String
Public ParentCategoryName As String
Public Materials As Collection ' 存储 clsMaterialItem 对象
Public SubCategories As Collection ' 存储子类别 clsCategory 对象
Public materials As collection ' 存储 clsMaterialItem 对象
Public SubCategories As collection ' 存储子类别 clsCategory 对象
Public IsLeafCategory As Boolean ' 是否叶子类别(无子类别)
Private Sub Class_Initialize()
Set Materials = New Collection
Set SubCategories = New Collection
Set materials = New collection
Set SubCategories = New collection
IsLeafCategory = True
End Sub
' 添加物料
Public Sub AddMaterial(mat As clsMaterialItem)
Materials.Add mat, mat.code
materials.Add mat, mat.code
End Sub
' 添加子类别
@@ -30,7 +30,7 @@ End Sub
' 获取物料(按代号)
Public Function GetMaterial(code As String) As clsMaterialItem
On Error Resume Next
Set GetMaterial = Materials(code)
Set GetMaterial = materials(code)
On Error GoTo 0
End Function