Kevin Kok Khah Whey
2023-10-18 d5e46a7a9f2cb9123b9aafb39a20e14059faa2e4
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration3.qbl
@@ -1,9 +1,13 @@
Quintiq file version 2.0
#parent: #root
StaticMethod IterativeGeneration3 (
  MacroPlan macroPlan,
  GlobalOTDSOP globalOTDSOP,
  Supply_MP smp,
  Supply_MP firstSMP,
  Number numberOfPlies,
  Real fulfillmentQuantity
  Real fulfillmentQuantity,
  CapacityAllocationResultsRuleConfiguration capacityAllocationResultsRuleConfiguration
)
{
  TextBody:
@@ -20,10 +24,12 @@
              traverse ( dd, Fulfillment, f ) {
                smp1 := f.Supply_MP();
                numberOfPlies++;
                fulfillmentQuantity := ( dd.Quantity() / ns.Quantity() ) * fulfillmentQuantity;
                info( "--------------------------------------------------------------" );
                fulfillmentQuantity := fulfillmentQuantity * ns.ProcessOutput().astype( OperationOutput ).Quantity() *
                                                             dd.ProcessInput().astype( OperationInput ).Quantity();
                CapacityAllocationResults::IterativeGeneration3( smp1, numberOfPlies, fulfillmentQuantity );
                if ( not isnull( capacityAllocationResultsRuleConfiguration ) ) {
                  CapacityAllocationResults::CreateDate1( macroPlan, globalOTDSOP, dd, ns, firstSMP, capacityAllocationResultsRuleConfiguration, fulfillmentQuantity );
                }
                CapacityAllocationResults::IterativeGeneration3( macroPlan, globalOTDSOP, smp1, firstSMP, numberOfPlies, fulfillmentQuantity, capacityAllocationResultsRuleConfiguration );
                numberOfPlies--;
              }
            }
@@ -33,14 +39,17 @@
            targetDependentDemand := select( ptll, DependentDemand, dd, dd.ProcessInput().ProductInStockingPoint_MP().ProductID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() and
                                             dd.Quantity() = ns.Quantity() );
            info( "车道周期任务    ", "供应时间:", ns.Start().Format( "Y-M2-D2" ), "    周期任务KEY:", ptll.Key(), "    ", 
                  targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name() );
                  ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name() );
            traverse ( targetDependentDemand, Fulfillment, f ) {
              smp1 := f.Supply_MP();
              numberOfPlies++;
              info( "--------------------------------------------------------------" );
              CapacityAllocationResults::IterativeGeneration3( smp1, numberOfPlies, f.Quantity() );
              if ( not isnull( capacityAllocationResultsRuleConfiguration ) ) {
                CapacityAllocationResults::CreateDate1( macroPlan, globalOTDSOP, targetDependentDemand, ns, firstSMP, capacityAllocationResultsRuleConfiguration, f.Quantity() );
              }
              CapacityAllocationResults::IterativeGeneration3( macroPlan, globalOTDSOP, smp1, firstSMP, numberOfPlies, f.Quantity(), capacityAllocationResultsRuleConfiguration );
              numberOfPlies--;
            }
            }
          }
        }
      }