From e7c56c4676e153f0af05083b1f5ab0ed73d4b2c3 Mon Sep 17 00:00:00 2001
From: Kevin Kok Khah Whey <khahwhey.kok@3ds.com>
Date: 星期四, 12 十月 2023 19:19:53 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_Kevin
---
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl | 122 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 121 insertions(+), 1 deletions(-)
diff --git "a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl" "b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl"
index ff774ec..6d84c07 100644
--- "a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl"
+++ "b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.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 );
+ //}
*]
}
--
Gitblit v1.9.3