From d594137a0d5684bb32db001cfc3dde065469d178 Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期二, 10 十月 2023 21:29:27 +0800
Subject: [PATCH] 产能分配优化
---
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl | 21 ++
_Main/UI/MacroPlannerWebApp/Views/订单锁定_解锁.vw | 414 ++++++++++++++++++++++++++++++++++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPagePlan.def | 8
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl | 16 +
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_AutomaticallyGenerate_OnClick.def | 16 +
_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def | 4
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def | 11 +
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupPlanViews.def | 18 ++
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def | 1
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupPlanViews_ButtonOrderLockAndUnlock_OnCl.def | 16 +
_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def | 2
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialStockingPointID.qbl | 8
12 files changed, 533 insertions(+), 2 deletions(-)
diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialStockingPointID.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialStockingPointID.qbl
new file mode 100644
index 0000000..d26fc6e
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialStockingPointID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PanelMaterialStockingPointID
+{
+ #keys: '3[414702.1.15456051][414702.1.15456050][414702.1.15456052]'
+ IsReadOnly: true
+ ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl
new file mode 100644
index 0000000..afe440f
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod AutomaticallyGenerateCapacityRules (
+ GlobalOTDTable globalOTDTable,
+ MacroPlan macroPlan
+)
+{
+ TextBody:
+ [*
+ targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = "Chassis - SUV 1" );
+
+ traverse ( targetProduct_MP, ProductInStockingPoint_MP, pisp ) {
+ CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, pisp );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl
new file mode 100644
index 0000000..e5b4fa6
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod RecursiveGeneration (
+ MacroPlan macroPlan,
+ ProductInStockingPoint_MP outputPISP
+)
+{
+ TextBody:
+ [*
+ operations := selectset( macroPlan, Routing.RoutingStep.Operation, tempO,
+ exists( tempO, OperationOutput, tempOO, tempOO.ProductInStockingPoint_MP() = outputPISP ) );
+
+ traverse ( operations, Elements, o ) {
+ traverse ( o, OperationInput, tempOI ) {
+ inputPISP := tempOI.ProductInStockingPoint_MP();
+ CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, tempOI.ProductInStockingPoint_MP() );
+ info( "杈撳叆PISP锛�", inputPISP.Name(), " 杈撳嚭PISP锛�", outputPISP.Name() );
+ }
+ }
+ *]
+}
diff --git a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def
index 6253182..5009e48 100644
--- a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def
+++ b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def
@@ -5,7 +5,7 @@
#keys: '[414384.0.605664178]'
Body:
[*
- MacroPlan::DoSync( MacroPlan,false,false);
+ //MacroPlan::DoSync( MacroPlan,false,false);
*]
DefinitionID: 'Responsedef_Menu_OnClick'
Precondition:
diff --git a/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def
index e164af9..dde6eff 100644
--- a/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def
+++ b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def
@@ -5,7 +5,9 @@
#keys: '[414702.0.340554926]'
Body:
[*
- CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan, SelectionScenario.Data() );
+ //CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan, SelectionScenario.Data() );
+
+ CapacityAllocationResultsRuleConfiguration::AutomaticallyGenerateCapacityRules( GlobalOTDTable, MacroPlan );
*]
CanBindMultiple: false
DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupPlanViews.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupPlanViews.def
new file mode 100644
index 0000000..af02447
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupPlanViews.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+Component ActionBarGroupPlanViews #extension
+{
+ Children:
+ [
+ Component ButtonOrderLockAndUnlock
+ {
+ #keys: '[414702.1.15778581]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Image: 'DOCUMENT_LOCK'
+ Label: '璁㈠崟閿佸畾&瑙i攣'
+ Taborder: 8
+ ]
+ }
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPagePlan.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPagePlan.def
new file mode 100644
index 0000000..cde4c13
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPagePlan.def
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+Component ActionBarPagePlan #extension
+{
+ Children:
+ [
+ #child: ActionBarGroupPlanViews
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupPlanViews_ButtonOrderLockAndUnlock_OnCl.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupPlanViews_ButtonOrderLockAndUnlock_OnCl.def
new file mode 100644
index 0000000..af7fe50
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupPlanViews_ButtonOrderLockAndUnlock_OnCl.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ActionBarGroupPlanViews/ButtonOrderLockAndUnlock
+Response OnClick () id:Response_TIANMA_JITUAN_ActionBarGroupPlanViews_ButtonOrderLockAndUnlock_OnClick
+{
+ #keys: '[414702.1.14334079]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ ApplicationScope.ViewManager().ResetUserViewById( "璁㈠崟閿佸畾_瑙i攣", true );
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
index b0bcb6e..381d169 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
@@ -12,6 +12,7 @@
#child: ActionBarPageData
#child: ActionBarPageSales
#child: applicationDevelopmentActionBarPageDef_1
+ #child: ActionBarPagePlan
]
}
Component DataHolderCapacityAndSaleBudgeFilterItem
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def
index 367ca52..61c7b78 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def
@@ -27,6 +27,17 @@
Taborder: 1
]
}
+ Component AutomaticallyGenerate
+ {
+ #keys: '[414702.1.14342122]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Image: 'CAR_CYAN'
+ Label: '鑷姩鐢熸垚瑙勫垯'
+ Taborder: 2
+ ]
+ }
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_AutomaticallyGenerate_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_AutomaticallyGenerate_OnClick.def
new file mode 100644
index 0000000..65bad86
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_AutomaticallyGenerate_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: PanelImportAndExport/AutomaticallyGenerate
+Response OnClick () id:Response_PanelImportAndExport_AutomaticallyGenerate_OnClick
+{
+ #keys: '[414702.1.14304989]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ CapacityAllocationResultsRuleConfiguration::AutomaticallyGenerateCapacityRules( GlobalOTDTable, MacroPlan );
+ *]
+ }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Views/\350\256\242\345\215\225\351\224\201\345\256\232_\350\247\243\351\224\201.vw" "b/_Main/UI/MacroPlannerWebApp/Views/\350\256\242\345\215\225\351\224\201\345\256\232_\350\247\243\351\224\201.vw"
new file mode 100644
index 0000000..86a57f0
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Views/\350\256\242\345\215\225\351\224\201\345\256\232_\350\247\243\351\224\201.vw"
@@ -0,0 +1,414 @@
+Quintiq file version 2.0
+{
+ viewcontents
+ {
+ forms
+ {
+ form_FormOrderLock
+ {
+ title: 'QTIANMA_JITUAN::FormOrderLock'
+ shown: true
+ componentID: 'QTIANMA_JITUAN::FormOrderLock'
+ layout
+ {
+ mode: 'open'
+ rowPosition: 1
+ rowSpan: 8
+ columnPosition: 1
+ columnSpan: 12
+ }
+ components
+ {
+ FormOrderLock_PanelOrderLock
+ {
+ sizeRatio: 1
+ }
+ FormOrderLock_PanelOrderLockHeader
+ {
+ sizeRatio: 1
+ }
+ FormOrderLock_PanelOrderLockOrder
+ {
+ sizeRatio: 1
+ }
+ FormOrderLock_ListOrderLock
+ {
+ }
+ FormOrderLock_DataSetLevelOrderLock
+ {
+ groupDepth: -1
+ column_OrderID
+ {
+ columnId: 'OrderID'
+ dataPath: 'OrderID'
+ dataType: 'string'
+ index: 0
+ subtotals: ''
+ width: 150
+ }
+ column_ProductID
+ {
+ columnId: 'ProductID'
+ dataPath: 'ProductID'
+ dataType: 'string'
+ index: 1
+ subtotals: ''
+ width: 150
+ }
+ column_SalesSegmentName
+ {
+ columnId: 'SalesSegmentName'
+ dataPath: 'SalesSegmentName'
+ dataType: 'string'
+ index: 2
+ subtotals: ''
+ width: 150
+ }
+ column_StockingPointID
+ {
+ columnId: 'StockingPointID'
+ dataPath: 'StockingPointID'
+ dataType: 'string'
+ index: 3
+ subtotals: ''
+ width: 150
+ }
+ column_CustomerName
+ {
+ columnId: 'CustomerName'
+ dataPath: 'CustomerName'
+ dataType: 'string'
+ index: 4
+ subtotals: ''
+ width: 150
+ }
+ column_Quantity
+ {
+ columnId: 'Quantity'
+ dataPath: 'Quantity'
+ dataType: 'real'
+ index: 5
+ subtotals: ''
+ width: 150
+ }
+ column_UnitOfMeasureName
+ {
+ columnId: 'UnitOfMeasureName'
+ dataPath: 'UnitOfMeasureName'
+ dataType: 'string'
+ index: 6
+ subtotals: ''
+ width: 150
+ }
+ column_Price
+ {
+ columnId: 'Price'
+ dataPath: 'Price'
+ dataType: 'real'
+ index: 7
+ subtotals: ''
+ width: 150
+ }
+ column_StartDate
+ {
+ columnId: 'StartDate'
+ dataPath: 'StartDate'
+ dataType: 'date'
+ index: 8
+ subtotals: ''
+ width: 150
+ }
+ column_IsLocked
+ {
+ columnId: 'IsLocked'
+ dataPath: 'IsLocked'
+ dataType: 'boolean'
+ index: 9
+ subtotals: ''
+ width: 150
+ }
+ column_First_AsPlanningBaseSalesDemandInPeriod_End
+ {
+ columnId: 'First.AsPlanningBaseSalesDemandInPeriod.End'
+ dataPath: 'First.AsPlanningBaseSalesDemandInPeriod.End'
+ dataType: 'datetime'
+ index: 10
+ subtotals: ''
+ width: 150
+ }
+ column_LastModify
+ {
+ columnId: 'LastModify'
+ dataPath: 'LastModify'
+ dataType: 'string'
+ index: 11
+ subtotals: ''
+ width: 150
+ }
+ column_LastModifyTime
+ {
+ columnId: 'LastModifyTime'
+ dataPath: 'LastModifyTime'
+ dataType: 'datetime'
+ index: 12
+ subtotals: ''
+ width: 150
+ }
+ }
+ FormOrderLock_PanelOrderLockPlanning
+ {
+ sizeRatio: 1
+ }
+ FormOrderLock_PanelMatrix
+ {
+ sizeRatio: 1
+ }
+ FormOrderLock_MatrixEditorProductPlanning
+ {
+ gridColor: '#c4c4c4'
+ totalHeaderWidth: 200
+ attributeHeaderWidthRatio: 0.6
+ nameHeaderWidthRatio: 0.4
+ columnWidth: 100
+ horizontalGrid: true
+ verticalGrid: true
+ backendState
+ {
+ componentId: 'QTIANMA_JITUAN::FormOrderLock.MatrixEditorProductPlanning'
+ state
+ {
+ cells
+ {
+ attributes
+ {
+ attribute_DisplaySupplyQuantity
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 0
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'DisplaySupplyQuantity'
+ }
+ attribute_DependentDemandAndSalesDemandQuantity
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 1
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'DependentDemandAndSalesDemandQuantity'
+ }
+ attribute_TargetInventoryLevel
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 2
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'TargetInventoryLevel'
+ }
+ attribute_InventoryLevelEnd
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 3
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'InventoryLevelEnd'
+ }
+ attribute_StockLevelInDays
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 4
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'StockLevelInDays'
+ }
+ }
+ }
+ columns
+ {
+ sorting
+ {
+ criteria: "datamember:'Start'"
+ }
+ }
+ rows
+ {
+ sorting
+ {
+ criteria: "datamember:'Product_MP.DisplayIndex';datamember:'Name'"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ form_FormOrderLockLog
+ {
+ title: 'QTIANMA_JITUAN::FormOrderLockLog'
+ shown: true
+ componentID: 'QTIANMA_JITUAN::FormOrderLockLog'
+ layout
+ {
+ mode: 'open'
+ rowPosition: 9
+ rowSpan: 8
+ columnPosition: 1
+ columnSpan: 12
+ }
+ components
+ {
+ FormOrderLockLog_PanelOrderLockLog
+ {
+ sizeRatio: 1
+ }
+ FormOrderLockLog_ListOrderLockLog
+ {
+ }
+ FormOrderLockLog_DataSetLevelOrderLockLog
+ {
+ groupDepth: -1
+ column_OrderID
+ {
+ columnId: 'OrderID'
+ dataPath: 'OrderID'
+ dataType: 'string'
+ index: 0
+ subtotals: ''
+ width: 150
+ }
+ column_ProductID
+ {
+ columnId: 'ProductID'
+ dataPath: 'ProductID'
+ dataType: 'string'
+ index: 1
+ subtotals: ''
+ width: 150
+ }
+ column_SalesSegmentName
+ {
+ columnId: 'SalesSegmentName'
+ dataPath: 'SalesSegmentName'
+ dataType: 'string'
+ index: 2
+ subtotals: ''
+ width: 150
+ }
+ column_StockingPointID
+ {
+ columnId: 'StockingPointID'
+ dataPath: 'StockingPointID'
+ dataType: 'string'
+ index: 3
+ subtotals: ''
+ width: 150
+ }
+ column_CustomerName
+ {
+ columnId: 'CustomerName'
+ dataPath: 'CustomerName'
+ dataType: 'string'
+ index: 4
+ subtotals: ''
+ width: 150
+ }
+ column_Quantity
+ {
+ columnId: 'Quantity'
+ dataPath: 'Quantity'
+ dataType: 'real'
+ index: 5
+ subtotals: ''
+ width: 150
+ }
+ column_UnitOfMeasureName
+ {
+ columnId: 'UnitOfMeasureName'
+ dataPath: 'UnitOfMeasureName'
+ dataType: 'string'
+ index: 6
+ subtotals: ''
+ width: 150
+ }
+ column_Price
+ {
+ columnId: 'Price'
+ dataPath: 'Price'
+ dataType: 'real'
+ index: 7
+ subtotals: ''
+ width: 150
+ }
+ column_EndDate
+ {
+ columnId: 'EndDate'
+ dataPath: 'EndDate'
+ dataType: 'date'
+ index: 8
+ subtotals: ''
+ width: 150
+ }
+ column_IsLocked
+ {
+ columnId: 'IsLocked'
+ dataPath: 'IsLocked'
+ dataType: 'boolean'
+ index: 9
+ subtotals: ''
+ width: 150
+ }
+ column_End
+ {
+ columnId: 'End'
+ dataPath: 'End'
+ dataType: 'date'
+ index: 10
+ subtotals: ''
+ width: 150
+ }
+ column_LastModify
+ {
+ columnId: 'LastModify'
+ dataPath: 'LastModify'
+ dataType: 'string'
+ index: 11
+ subtotals: ''
+ width: 150
+ }
+ column_LastModifyTime
+ {
+ columnId: 'LastModifyTime'
+ dataPath: 'LastModifyTime'
+ dataType: 'datetime'
+ index: 12
+ subtotals: ''
+ width: 150
+ }
+ column_Notes
+ {
+ columnId: 'Notes'
+ dataPath: 'Notes'
+ dataType: 'string'
+ index: 13
+ subtotals: ''
+ width: 150
+ }
+ }
+ }
+ }
+ }
+ userconfigurableinformation
+ {
+ }
+ page: ''
+ group: ''
+ index: 0
+ image: 'TEXT_LOCK'
+ description: ''
+ }
+ formatversion: 2
+ id: '璁㈠崟閿佸畾_瑙i攣'
+ name: '璁㈠崟閿佸畾&瑙i攣'
+ isglobal: false
+ isroot: true
+}
--
Gitblit v1.9.3