From 48ce218f5329dd9a3e2ba8851b101a5b85f8aab4 Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期一, 25 九月 2023 15:54:18 +0800
Subject: [PATCH] 产能分配结果优化

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

diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
index 9bea872..119198c 100644
--- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
@@ -2,7 +2,8 @@
 #parent: #root
 StaticMethod CreateDate (
   GlobalOTDTable globalOTDTable,
-  MacroPlan macroPlan
+  MacroPlan macroPlan,
+  Scenario scenario
 )
 {
   TextBody:
@@ -17,12 +18,16 @@
     }
     
     traverse ( finaleProductInStockingPoint_MPs, Elements, fpispmp ) {
-      capacityAllocationResultsRuleConfiguration := select( globalOTDTable, CapacityAllocationResultsRuleConfiguration, tempCARRC, tempCARRC.ModuleMaterialCode() = fpispmp.ProductID() and tempCARRC.StockingPointID() = fpispmp.StockingPointID() );
+      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( fpispmp, pmp.StartDate(), capacityAllocationResultsRuleConfiguration, 0, 0.0 );
+        CapacityAllocationResults::IterativeGeneration2( globalOTDTable, fpispmp, pmp.StartDate(), capacityAllocationResultsRuleConfigurations, 0, null( NewSupply ), 0.0 );
       }
     }
+    
+    traverse ( globalOTDTable, CapacityAllocationResults, car ) {
+      car.VersionNumber( scenario.Name() );
+    }
   *]
 }

--
Gitblit v1.9.3