yanweiyuan3
2023-10-17 face55e7f35130d29d7f395a4b4501d57b97ef81
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod IterativeGeneration (
  GlobalOTDTable globalOTDTable,
  GlobalOTDSOP globalOTDSOP,
  ProductInStockingPoint_MP pisp,
  Number numberOfLayers,
  NewSupply finaleNewSupply,
@@ -27,7 +27,7 @@
            oi := dd.ProcessInput().astype( OperationInput );
            finaleDependentDemand := finaleDependentDemand * oo.Quantity() * oi.Quantity();
    //        info( "依赖需求产品ID:", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(), "    依赖数量:", dd.Quantity(), "    当前周期任务Key:", dd.PeriodTask_MP().astype( PeriodTaskOperation ).Key() );
            CapacityAllocationResults::IterativeGeneration( globalOTDTable, dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(), numberOfLayers, finaleNewSupply, finaleDependentDemand, targetDate );
            CapacityAllocationResults::IterativeGeneration( globalOTDSOP, dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(), numberOfLayers, finaleNewSupply, finaleDependentDemand, targetDate );
          }
    //      info( "----------------------------------------------------" );
        } else {
@@ -35,17 +35,17 @@
    //      info( "======" );
          pispPanel := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP();
          pispModule := finaleNewSupply.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP();
          globalOTDTable.CapacityAllocationResults( relnew,
                                                    PanelBase             := pispPanel.StockingPointID(),
                                                    PanelMaterialCode     := pispPanel.ProductID(),
                                                    NumberOfPanels        := finaleDependentDemand,
                                                    PanelMeasurementUnit  := pispPanel.UnitOfMeasure_MP().Name(),
                                                    ModuleMaterialCode    := pispModule.ProductID(),
                                                    NumberOfModules       := finaleNewSupply.Quantity(),
                                                    ModuleMeasurementUnit := pispModule.UnitOfMeasure_MP().Name(),
                                                    ModuleBase            := pispModule.StockingPointID(),
                                                    RequirementDate       := finaleNewSupply.Start().Date()
                                                   );
          globalOTDSOP.CapacityAllocationResults( relnew,
                                                  PanelBase             := pispPanel.StockingPointID(),
                                                  PanelMaterialCode     := pispPanel.ProductID(),
                                                  NumberOfPanels        := finaleDependentDemand,
                                                  PanelMeasurementUnit  := pispPanel.UnitOfMeasure_MP().Name(),
                                                  ModuleMaterialCode    := pispModule.ProductID(),
                                                  NumberOfModules       := finaleNewSupply.Quantity(),
                                                  ModuleMeasurementUnit := pispModule.UnitOfMeasure_MP().Name(),
                                                  ModuleBase            := pispModule.StockingPointID(),
                                                  RequirementDate       := finaleNewSupply.Start().Date()
                                                 );
        }
        finaleNewSupply := null( NewSupply );
      }