Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod CreateDate1 ( 
 | 
  MacroPlan macroPlan, 
 | 
  GlobalOTDSOP globalOTDSOP, 
 | 
  DependentDemand dependentDemand, 
 | 
  NewSupply newSupply, 
 | 
  Supply_MP firstNewSupply, 
 | 
  CapacityAllocationResultsRuleConfiguration capacityAllocationResultsRuleConfiguration, 
 | 
  Real fulfillmentQuantity 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    panelPISP := dependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(); 
 | 
    info( "产品ID:", panelPISP.ProductID(), "    库存点ID:", panelPISP.StockingPointID() ); 
 | 
    productID := dependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(); 
 | 
     
 | 
    if ( capacityAllocationResultsRuleConfiguration.PanelMaterialCode() = productID ) { 
 | 
      info( "找到了!!!" ); 
 | 
      globalOTDSOP.CapacityAllocationResults( relnew, 
 | 
                                              PanelBase             := panelPISP.StockingPointID(), 
 | 
                                              PanelMaterialCode     := panelPISP.ProductID(), 
 | 
                                              NumberOfPanels        := fulfillmentQuantity, 
 | 
                                              PanelMeasurementUnit  := panelPISP.UnitOfMeasure_MP().Name(), 
 | 
                                              ModuleMaterialCode    := firstNewSupply.ProductInStockingPointInPeriodPlanning().ProductInStockingPoint_MP().ProductID(), 
 | 
                                              NumberOfModules       := firstNewSupply.Quantity(), 
 | 
                                              ModuleMeasurementUnit := firstNewSupply.ProductInStockingPointInPeriodPlanning().ProductInStockingPoint_MP().UnitOfMeasureName(), 
 | 
                                              ModuleBase            := firstNewSupply.ProductInStockingPointInPeriodPlanning().ProductInStockingPoint_MP().StockingPointID(), 
 | 
                                              RequirementDate       := dependentDemand.Start().Date(), 
 | 
                                              // 导出外部供应字段 
 | 
                                              Date                  := dependentDemand.Start().Date(), 
 | 
                                              Description           := "", 
 | 
                                              ID                    := OS::GenerateGUIDAsString(), 
 | 
                                              ProductID             := panelPISP.ProductID(), 
 | 
                                              StockingPointID       := panelPISP.StockingPointID(), 
 | 
                                              UserQuantity          := fulfillmentQuantity, 
 | 
                                              ManufacturedDate      := Date::MinDate() 
 | 
                                             ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |