hongjli
2023-10-02 96eeb9236a5ae72ead45e5aa8e9c57e5000f185b
_Main/BL/Type_GlobalDTOTable/Method_SynchronizationAllMappingBrokerAndAPIByOption.qbl
@@ -1,20 +1,119 @@
Quintiq file version 2.0
#parent: #root
Method SynchronizationAllMappingBrokerAndAPIByOption (
  String executionUser,
  Boolean isCustomOrder,
  Boolean isForeacst
  Boolean isForeacst,
  Boolean isUnitOfMeasure_MP,
  Boolean isSalesSegment_MP,
  Boolean isProduct_MP,
  Boolean isConversionFactor,
  Boolean isOperation,
  Boolean isOperationBOM,
  Boolean isProductInLane,
  Boolean isAIPISPIP,
  Boolean isInventorySupply,
  Boolean isStockingPointCost,
  Boolean isOperationCost,
  Boolean isDOI_DSI,
  Boolean isCustomerGrade,
  Boolean isStockingPoint_MP,
  Boolean isCurrency_MP,
  Boolean isCurrencyRate_MP,
  Boolean isLane,
  Boolean isLaneLeg
)
{
  TextBody:
  [*
    if ( isCustomOrder ) {
      this.Global_MappingCustomOrder( relflush );
      this.GlobalOTDTable_CustomOrder().AsyncExecute();
      Global_MappingCustomOrder::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_CustomOrder" );
    }
    
    if ( isForeacst ) {
      this.Global_MappingForecast( relflush );
      this.GlobalOTDTable_Forecast().AsyncExecute();
      Global_MappingForecast::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_Forecast" );
    }
    if ( isUnitOfMeasure_MP ) {
      Global_MappingUnitOfMeasure_MP::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_UnitOfMeasure_MP" );
    }
    if ( isSalesSegment_MP ) {
      Global_MappingSalesSegment_MP::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_SalesSegment_MP" );
    }
    if ( isProduct_MP ) {
      Global_MappingProduct_MP::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_Product_MP" );
    }
    if ( isConversionFactor ) {
      Global_MappingConversionFactor::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_ConversionFactor" );
    }
    if ( isOperation ) {
      Global_MappingOperation::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_Operation" );
    }
    if ( isOperationBOM ) {
      Global_MappingOperationBOM::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_OperationBOM" );
    }
    if ( isProductInLane ) {
      Global_MappingProductInLane::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_ProductInLane" );
    }
    if ( isAIPISPIP ) {
      Global_MappingActualProductInStockingPointInPeriod::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_AIPISPIP" );
    }
    if ( isInventorySupply ) {
      Global_MappingInventorySupply::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_InventorySupply" );
    }
    if ( isStockingPointCost ) {
      Global_MappingStockingPointCost::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_StockingPointCost" );
    }
    if ( isOperationCost ) {
      Global_MappingOperationCost::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_OperationCost" );
    }
    if ( isDOI_DSI ) {
      Global_MappingDOI_DSI::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_DOI_DSI" );
    }
    if ( isCustomerGrade ) {
      Global_MappingCustomerGrade::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_CustomerGrade" );
    }
    if ( isStockingPoint_MP ) {
      this.Global_MappingStockingPoint_MP( relflush );
      Global_BrokerExecuteLog::CreateInOperation( this, "StockingPoint_MP", executionUser );
      this -> OnException( this -> Global_MappingStockingPoint_MP::CreateByAPI() -> Exception(), this );
    }
    if ( isCurrency_MP ) {
      this.Global_MappingCurrency_MP( relflush );
      Global_BrokerExecuteLog::CreateInOperation( this, "Currency_MP", executionUser );
      this -> OnException( this -> Global_MappingCurrency_MP::CreateByAPI() -> Exception(), this );
    }
    if ( isCurrencyRate_MP ) {
      this.Global_MappingCurrencyRate_MP( relflush );
      Global_BrokerExecuteLog::CreateInOperation( this, "CurrencyRate_MP", executionUser );
      this -> OnException( this -> Global_MappingCurrencyRate_MP::CreateByAPI() -> Exception(), this );
    }
    if ( isLane ) {
      this.Global_MappingLane( relflush );
      Global_BrokerExecuteLog::CreateInOperation( this, "Lane", executionUser );
      this -> OnException( this -> Global_MappingLane::CreateByAPI() -> Exception(), this );
    }
    if ( isLaneLeg ) {
      this.Global_MappingLaneLeg( relflush );
      Global_BrokerExecuteLog::CreateInOperation( this, "LaneLeg", executionUser );
      this -> OnException( this -> Global_MappingLaneLeg::CreateByAPI() -> Exception(), this );
    }
  *]
}