From 1b0f461e0db93c3f504b8be975a5b7ffddbcc584 Mon Sep 17 00:00:00 2001
From: Tianma21 <Administrator@TOTDQAE01.tianmame.cn>
Date: 星期日, 08 十月 2023 13:47:22 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev

---
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
index 3f70ca5..b327f63 100644
--- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
@@ -13,7 +13,7 @@
   TextBody:
   [*
     numberOfLayers++;
-    info( "鐩爣鏃堕棿锛�", targetDate.Format( "Y-M2-D2" ) );
+    //info( "鐩爣鏃堕棿锛�", targetDate.Format( "Y-M2-D2" ) );
     info( pisp.Name() );
     traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, pispippl.Start().Date() = targetDate ) {
       traverse ( pispippl, NewSupply, ns, ns.Quantity() > 0 ) {
@@ -23,14 +23,17 @@
         
         ontype( ns.PeriodTask_MP() ) {
           PeriodTaskOperation as pto : {
-            info( "Operation鍛ㄦ湡浠诲姟..." );     
+    //        info( "Operation鍛ㄦ湡浠诲姟..." );     
             traverse ( ns, PeriodTask_MP.astype( PeriodTaskOperation ).DependentDemand, dd ) {
+              if ( numberOfLayers = 1 ) {
+                currentLayerDependentDemandQuantity := ns.Quantity();
+              }
               currentLayerDependentDemandQuantity := currentLayerDependentDemandQuantity                     * 
                                                      ns.ProcessOutput().astype( OperationOutput ).Quantity() *
                                                      dd.ProcessInput().astype( OperationInput ).Quantity();
-              info( "灞傛暟锛�", numberOfLayers, "    褰撳墠渚涘簲鐨刾isp锛�", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    鎬讳緵搴斿�硷細", ns.Quantity(), "    闇�瑕佷緵搴斿�硷細", currentLayerDependentDemandQuantity,
-                    "    褰撳墠闇�姹俻isp锛�", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    闇�姹傚�硷細", currentLayerDependentDemandQuantity );
-              info( "-----------------------------------------------------------------------------------------------------------------" );
+    //          info( "灞傛暟锛�", numberOfLayers, "    褰撳墠渚涘簲鐨刾isp锛�", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    鎬讳緵搴斿�硷細", ns.Quantity(), "    闇�瑕佷緵搴斿�硷細", currentLayerDependentDemandQuantity,
+    //                "    褰撳墠闇�姹俻isp锛�", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    闇�姹傚�硷細", currentLayerDependentDemandQuantity );
+    //          info( "-----------------------------------------------------------------------------------------------------------------" );
               CapacityAllocationResults::IterativeGeneration2( globalOTDTable,
                                                                dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(),
                                                                targetDate,
@@ -42,7 +45,7 @@
             }
             carrc := select( carrcs, Elements, carrc, carrc.PanelMaterialCode() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() );
             if ( not isnull( carrc ) ) {
-              info( "鎵惧埌闈㈡澘鐗╂枡..." );
+    //          info( "鎵惧埌闈㈡澘鐗╂枡..." );
               globalOTDTable.CapacityAllocationResults( relnew,
                                                         PanelBase             := pto.Operation().UnitID(),
                                                         PanelMaterialCode     := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
@@ -58,7 +61,7 @@
                                                         Description           := "",
                                                         ID                    := OS::GenerateGUIDAsString(),
                                                         ProductID             := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
-                                                        StockingPointID       := "",
+                                                        StockingPointID       := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().StockingPointID(),
                                                         UserQuantity          := currentLayerDependentDemandQuantity,
                                                         ManufacturedDate      := Date::MinDate()
                                                        );
@@ -70,9 +73,9 @@
           PeriodTaskLaneLeg as ptll : {
             targetDependentDemand := select( ptll, DependentDemand, dd, dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() );
             currentLayerDependentDemandQuantity := ifexpr( numberOfLayers = 1, targetDependentDemand.Quantity(), currentLayerDependentDemandQuantity );
-            info( "灞傛暟锛�", numberOfLayers,"    褰撳墠渚涘簲鐨刾isp锛�", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    鎬讳緵搴斿�硷細", ns.Quantity(), "    闇�瑕佷緵搴斿�硷細", currentLayerDependentDemandQuantity,
-                  "    褰撳墠闇�姹俻isp锛�", targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    闇�姹傚�硷細", currentLayerDependentDemandQuantity );
-            info( "LaneLeg鍛ㄦ湡浠诲姟..." );
+    //        info( "灞傛暟锛�", numberOfLayers,"    褰撳墠渚涘簲鐨刾isp锛�", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    鎬讳緵搴斿�硷細", ns.Quantity(), "    闇�瑕佷緵搴斿�硷細", currentLayerDependentDemandQuantity,
+    //              "    褰撳墠闇�姹俻isp锛�", targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    闇�姹傚�硷細", currentLayerDependentDemandQuantity );
+    //        info( "LaneLeg鍛ㄦ湡浠诲姟..." );
             info( "-----------------------------------------------------------------------------------------------------------------" );
             CapacityAllocationResults::IterativeGeneration2( globalOTDTable,
                                                              targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(),

--
Gitblit v1.9.3