renhao
2023-10-18 ff1d40a1a235da7c3bdfa26070af267f19c7a3d3
_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate1.qbl
@@ -2,7 +2,7 @@
#parent: #root
StaticMethod CreateDate1 (
  MacroPlan macroPlan,
  GlobalOTDTable globalOTDTable,
  GlobalOTDSOP globalOTDSOP,
  DependentDemand dependentDemand,
  NewSupply newSupply,
  Supply_MP firstNewSupply,
@@ -18,25 +18,25 @@
    
    if ( capacityAllocationResultsRuleConfiguration.PanelMaterialCode() = productID ) {
      info( "找到了!!!" );
      globalOTDTable.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()
                                               );
      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()
                                             );
    }
  *]
}