Add strategy pattern architecture for BOM module processing
- Add IModuleProcessor interface defining the processor contract - Implement cProcessor_AppendOnly strategy for modifying existing BOM rows - Implement cProcessor_CloneNew strategy for creating new BOM rows - Add mProcessorFactory module for creating processor instances - Add mSpecAdditionManager module for coordinating spec addition operations - Enhance test suite with business logic layer and pipeline integration tests This implements the Strategy pattern to allow flexible BOM modification behaviors while maintaining clean separation of concerns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
16
VBA/ClassModules/IModuleProcessor.cls
Normal file
16
VBA/ClassModules/IModuleProcessor.cls
Normal file
@@ -0,0 +1,16 @@
|
||||
' ==============================================================================
|
||||
' 模块名称: IModuleProcessor
|
||||
' 模块类别: 类模块 (用作接口 Interface)
|
||||
' 模块职责: 定义统一的业务处理接口,基于UI用户选择的物料名称进行精准处理
|
||||
' ==============================================================================
|
||||
Option Explicit
|
||||
|
||||
' 方法名: ProcessSpec
|
||||
' allBOMs: 包含所有物料信息的集合 (库里的所有数据)
|
||||
' targetItemName: 要被处理的物料的名称字段 (瞄准镜)
|
||||
' paramName: 参数名(如 lcfw)
|
||||
' newValue: 新规格代码(如 M19)
|
||||
' engine: 条件注入引擎实例
|
||||
Public Sub ProcessSpec(ByRef allBOMs As Collection, ByVal targetItemName As String, ByVal paramName As String, ByVal newValue As String, ByRef engine As cConditionEngine)
|
||||
' 接口中不写任何实现代码
|
||||
End Sub
|
||||
Reference in New Issue
Block a user