From 287c978dc2cf991b4ea77947aee1df6598880477 Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期日, 24 九月 2023 18:45:43 +0800
Subject: [PATCH] 产能分配结果-规则配置

---
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
index ef9782f..9bea872 100644
--- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
@@ -9,19 +9,19 @@
   [*
     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 ) {
+      capacityAllocationResultsRuleConfiguration := select( 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( fpispmp, pmp.StartDate(), capacityAllocationResultsRuleConfiguration, 0, 0.0 );
       }
     }
   *]

--
Gitblit v1.9.3