hongji.li
2023-10-12 e69982ae2fc1b245151f70ecaff0d78720762e0d
Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj
已修改5个文件
已添加15个文件
536 ■■■■■ 文件已修改
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingActualProductInStockingPointInPeriod/StaticMethod_SynchronizeMacroPlanData.qbl 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingConversionFactor/StaticMethod_SynchronizeMacroPlanData.qbl 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingForecast/StaticMethod_SynchronizeMacroPlanData.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingInventorySupply/StaticMethod_SynchronizeMacroPlanData.qbl 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingOperation/StaticMethod_SynchronizeMacroPlanData.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingOperationBOM/StaticMethod_SynchronizeMacroPlanData.qbl 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingProductInLane/StaticMethod_SynchronizeMacroPlanData.qbl 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingProduct_MP/StaticMethod_SynchronizeMacroPlanData.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingSalesSegment_MP/StaticMethod_SynchronizeMacroPlanData.qbl 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingStockingPointCost/StaticMethod_SynchronizeMacroPlanData.qbl 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingUnitCost/StaticMethod_SynchronizeMacroPlanData.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_BusinessType.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_CreatePurchaseSupplyMaterial.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_IsKeyProduct.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/DefaultValue_BusinessType.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderLock_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderUnlock_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl
@@ -4,11 +4,49 @@
  MacroPlan macroPlan,
  String executionUser,
  Boolean isUnitOfMeasure_MP,
  Boolean isCustomOrder
  Boolean isCustomOrder,
  Boolean isForeacst,
  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:
  [*
    organcodelist := selectvalues( this, Global_MappingOperationBOM, bom,true, bom.OrganCode() );
    businessTypes := macroPlan.BusinessType().Tokenize( "," );
    if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
        traverse( businessTypes, Elements, item ) {
            info( "Business type : " + item )
        }
        organcodelist := selectvalues( this, BusinessType.OrganCode, organ, businessTypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() );
    }
    else{
      if( businessTypes.Size() = 0 ){
        if( not isnull( selectset( this, BusinessType, b, b.BusinessTypeName() = "" ) ) ){
          organcodelist := selectvalues( this, BusinessType.OrganCode, organ, organ.BusinessType().BusinessTypeName() = "", organ.OrganCodeName() );
          }
        }
      }
    if( organcodelist.Size() = 0 ){
      organcodelist := selectvalues( this, Global_MappingOperationBOM, bom,true, bom.OrganCode() );
      }
    if ( isUnitOfMeasure_MP ) {
      Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan );
    }
@@ -16,5 +54,87 @@
    if ( isCustomOrder ) {
      Global_MappingCustomOrder::SynchronizeMacroPlanData( this, macroPlan, executionUser );
    }
    if ( isForeacst ) {
      Global_MappingForecast::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist );
    }
    if ( isSalesSegment_MP ) {
      Global_MappingSalesSegment_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes );
    }
    if ( isProduct_MP ) {
      Global_MappingProduct_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, macroPlan.IsKeyProduct() );
    }
    if ( isConversionFactor ) {
      Global_MappingConversionFactor::SynchronizeMacroPlanData( this, macroPlan, executionUser );
    }
    if ( isOperation ) {
      Global_MappingOperation::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist );
    }
    if ( isOperationBOM ) {
      Global_MappingOperationBOM::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct(), macroPlan.CreatePurchaseSupplyMaterial() );
    }
    if ( isProductInLane ) {
      Global_MappingProductInLane::SynchronizeMacroPlanData( this, macroPlan, executionUser );
    }
    if ( isAIPISPIP ) {
      Global_MappingActualProductInStockingPointInPeriod::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct() );
    }
    if ( isInventorySupply ) {
      Global_MappingInventorySupply::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct() );
    }
    if ( isStockingPointCost ) {
      Global_MappingStockingPointCost::SynchronizeMacroPlanData( this, macroPlan, executionUser );
    }
    if ( isOperationCost ) {
      Global_MappingOperationCost::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist );
    }
    //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 -> Global_MappingStockingPoint_MP::CreateByAPI() -> Exception() -> Global_MappingStockingPoint_MP::OnException( this );
    //}
    //
    //if ( isCurrency_MP ) {
    //  this.Global_MappingCurrency_MP( relflush );
    //  Global_BrokerExecuteLog::CreateInOperation( this, "Currency_MP", executionUser );
    ////  this -> Global_MappingCurrency_MP::CreateByAPI() -> Exception() -> Global_MappingCurrency_MP::OnException( this );
    //}
    //
    //if ( isCurrencyRate_MP ) {
    //  this.Global_MappingCurrencyRate_MP( relflush );
    //  Global_BrokerExecuteLog::CreateInOperation( this, "CurrencyRate_MP", executionUser );
    ////  this -> Global_MappingCurrencyRate_MP::CreateByAPI() -> Exception() -> Global_MappingCurrencyRate_MP::OnException( this );
    //}
    //
    //if ( isLane ) {
    //  this.Global_MappingLane( relflush );
    //  Global_BrokerExecuteLog::CreateInOperation( this, "Lane", executionUser );
    ////  this -> Global_MappingLane::CreateByAPI() -> Exception() -> Global_MappingLane::OnException( this );
    //}
    //
    //if ( isLaneLeg ) {
    //  this.Global_MappingLaneLeg( relflush );
    //  Global_BrokerExecuteLog::CreateInOperation( this, "LaneLeg", executionUser );
    ////  this -> Global_MappingLaneLeg::CreateByAPI() -> Exception() -> Global_MappingLaneLeg::OnException( this );
    //}
  *]
}
_Main/BL/Type_Global_MappingActualProductInStockingPointInPeriod/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Strings organcodelist,
  Boolean isKeyProduct
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步实际库存数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingActualPISPIPData( businessTypes, globalOTDTable, isKeyProduct, organcodelist );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingConversionFactor/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步单位转换数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingBaseConversionFactorData(globalOTDTable);
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingForecast/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Strings organcodelist
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步预测数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingForecastData( businessTypes, globalOTDTable, organcodelist );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingInventorySupply/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Strings organcodelist,
  Boolean isKeyProduct
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步在途库存数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct ,globalOTDTable, organcodelist );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingOperation/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Strings organcodelist
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步工艺路线数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingOperationData( businessTypes ,globalOTDTable, organcodelist );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingOperationBOM/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Strings organcodelist,
  Boolean isKeyProduct,
  Boolean createPurchaseSupplyMaterial
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步BOM数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial, globalOTDTable, organcodelist );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingProductInLane/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步运输路线产品数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingProductInLaneData(globalOTDTable);
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingProduct_MP/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Boolean isKeyProduct
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步产品数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingProductData( businessTypes, globalOTDTable,isKeyProduct );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingSalesSegment_MP/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步销售部门数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingSalesSegmentData( businessTypes, globalOTDTable );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingStockingPointCost/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步库存成本数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingInventoryValueAndCostData(globalOTDTable);
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_Global_MappingUnitCost/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser,
  Strings businessTypes,
  Strings organcodelist
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步制造成本数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
    try {
      macroPlan.MappingOperationCostData( globalOTDTable, businessTypes, organcodelist );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/BL/Type_MacroPlan/Attribute_BusinessType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute BusinessType
{
  #keys: '3[412960.0.300140034][412960.0.300140033][412960.0.300140035]'
  ValueType: String
}
_Main/BL/Type_MacroPlan/Attribute_CreatePurchaseSupplyMaterial.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute CreatePurchaseSupplyMaterial
{
  #keys: '3[412960.0.300140031][412960.0.300140030][412960.0.300140032]'
  ValueType: Boolean
}
_Main/BL/Type_MacroPlan/Attribute_IsKeyProduct.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute IsKeyProduct
{
  #keys: '3[412960.0.300140028][412960.0.300140027][412960.0.300140029]'
  ValueType: Boolean
}
_Main/BL/Type_MacroPlan/DefaultValue_BusinessType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: BusinessType
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -117,6 +117,9 @@
        MacroPlan::DoSync( macroPlanNew, 
                           data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable);
    }
    macroPlanNew.BusinessType( businesstype );
    macroPlanNew.IsKeyProduct( data.IsKeyProduct() );
    macroPlanNew.CreatePurchaseSupplyMaterial( data.CreatePurchaseSupplyMaterial() );
    
    this.Close();
  *]
_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def
@@ -16,7 +16,25 @@
      GlobalOTDTable.SynchronizeDataToMacroPlan( MacroPlan, 
                                                 ApplicationMacroPlanner.GetUserName(),
                                                 CheckboxUnitOfMeasure_MP.Checked(),
                                                 CheckboxCustomOrder.Checked()
                                                 CheckboxCustomOrder.Checked(),
                                                 CheckboxForecast.Checked(),
                                                 CheckboxSalesSegment_MP.Checked(),
                                                 CheckboxProduct_MP.Checked(),
                                                 CheckboxConversionFactor.Checked(),
                                                 CheckboxOperation.Checked(),
                                                 CheckboxOperationBOM.Checked(),
                                                 CheckboxProductInLane.Checked(),
                                                 CheckboxAIPISPIP.Checked(),
                                                 CheckboxInventorySupply.Checked(),
                                                 CheckboxStockingPointCost.Checked(),
                                                 CheckboxOperationCost.Checked(),
                                                 CheckboxDOI_DSI.Checked(),
                                                 CheckboxCustomerGrade.Checked(),
                                                 CheckboxStockingPoint_MP.Checked(),
                                                 CheckboxCurrency_MP.Checked(),
                                                 CheckboxCurrencyRate_MP.Checked(),
                                                 CheckboxLane.Checked(),
                                                 CheckboxLaneLeg.Checked()
                                                );
      
      WebMessageBox::Success( "同步成功!", true );
_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderLock_OnClick.def
@@ -22,7 +22,7 @@
      pispips := construct( ProductInStockingPointInPeriods );
      macroplan := MacroPlan;
      traverse( checkorders, Elements, order ){
        pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) );
        pispips := pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, pispip.SupplyQuantity() > 0 ) );
        }
      
      pispipLeafs := selectset( pispips, 
_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderUnlock_OnClick.def
@@ -23,7 +23,7 @@
      pispips := construct( ProductInStockingPointInPeriods );
      macroplan := MacroPlan;
      traverse( checkorders, Elements, order ){
        pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) );
        pispips := pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, pispip.SupplyQuantity() > 0 ) );
        }
      
      pispipLeafs := selectset( pispips,