From 4a3d9ec9b4d11f096fc24cfeee40246492dc08fd Mon Sep 17 00:00:00 2001
From: Administrator <renhui.hao@capgemini.com>
Date: 星期一, 25 九月 2023 22:43:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev'

---
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
index ef9782f..119198c 100644
--- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
@@ -2,27 +2,32 @@
 #parent: #root
 StaticMethod CreateDate (
   GlobalOTDTable globalOTDTable,
-  MacroPlan macroPlan
+  MacroPlan macroPlan,
+  Scenario scenario
 )
 {
   TextBody:
   [*
     globalOTDTable.CapacityAllocationResults( relflush );
     
-    finaleProduct_MPs := CapacityAllocationResults::ObtainTheFinalOutputProduct( macroPlan );
+    finaleProductInStockingPoint_MPs := CapacityAllocationResults::ObtainTheFinalOutputProduct( macroPlan, globalOTDTable );
     
     period_MPS := null( Period_MPs );
     traverse ( macroPlan, PeriodSpecification_MP, psmp, psmp.ID() = "Planning periods" ) {
       period_MPS := selectsortedset( psmp, PeriodSpecificationPeriod.Period_MP, pmp, not pmp.IsHistorical(), pmp.StartDate() );
     }
     
-    traverse ( finaleProduct_MPs, Elements, fpmp/*, fpmp.ID() = "ProXOver 1 D2.6 A"*/ ) {
-      traverse ( fpmp, ProductInStockingPoint_MP, pisp, /*pisp.Name() = "ProXOver 1 D2.6 A in Finished Cars (France)" and*/ not pisp.IsSystem() ) {
-        traverse ( period_MPS, Elements, pmp ) {     
-          CapacityAllocationResults::IterativeGeneration( globalOTDTable, pisp, 1, null( NewSupply ), -1.0, pmp.StartDate() );
-        }
-    //    info( pisp.Name() );
+    traverse ( finaleProductInStockingPoint_MPs, Elements, fpispmp ) {
+      capacityAllocationResultsRuleConfigurations := selectset( globalOTDTable, CapacityAllocationResultsRuleConfiguration, tempCARRC, tempCARRC.ModuleMaterialCode() = fpispmp.ProductID() and tempCARRC.StockingPointID() = fpispmp.StockingPointID() );
+      info( "鐢熶骇鐨勪骇鍝侊細", fpispmp.ProductID(), "------浜у搧鍦ㄥ簱瀛樼偣-------锛�", fpispmp.StockingPointID() );
+      traverse ( period_MPS, Elements, pmp ) {     
+        // CapacityAllocationResults::IterativeGeneration( globalOTDTable, pisp, 1, null( NewSupply ), -1.0, pmp.StartDate() ); 鑰佺増
+        CapacityAllocationResults::IterativeGeneration2( globalOTDTable, fpispmp, pmp.StartDate(), capacityAllocationResultsRuleConfigurations, 0, null( NewSupply ), 0.0 );
       }
     }
+    
+    traverse ( globalOTDTable, CapacityAllocationResults, car ) {
+      car.VersionNumber( scenario.Name() );
+    }
   *]
 }

--
Gitblit v1.9.3