From ab6a21c73e6507923beb22611af772641321c256 Mon Sep 17 00:00:00 2001
From: yy <yuan.yan@capgemini.com>
Date: 星期一, 25 九月 2023 15:50:54 +0800
Subject: [PATCH] Merge branch 'dev_hrh_global'
---
_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl | 6
_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl | 5
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting#576.qbl | 5
_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl | 17 ++
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl | 7
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 2
_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl | 9
_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl | 2
_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl | 11
_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl | 86 -----------
_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl | 8
_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl | 9
_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl | 6
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl | 11
_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl | 16 +-
_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl | 14 +-
_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl | 9
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl | 63 ++++----
_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl | 13 +
_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl | 9
_Main/BL/Type_MacroPlan/StaticMethod_DoSync#618.qbl | 5
_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl | 9
LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd#969.qbl | 12 +
_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl | 9
_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl | 6
_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl | 5
_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl | 9
_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl | 6
_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl | 9
_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl | 15 +
_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp | 2
_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl | 9
_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl | 9
33 files changed, 195 insertions(+), 218 deletions(-)
diff --git "a/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl" "b/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl"
index d91a09e..b5b095a 100644
--- "a/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl"
+++ "b/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl"
@@ -16,10 +16,14 @@
//get period of start
ddstartperiod := select( gp.MacroPlan(), PlanningPeriod, pp, pp.Start() <= start and pp.End() > start );
- // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start
- periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() );
-
- value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart );
+ // Tianma fix 20230920
+ if( not isnull( ddstartperiod ) )
+ {
+ // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start
+ periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() );
+
+ value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart );
+ }
}
return value;
diff --git a/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl
index 4ecdf63..cd44e09 100644
--- a/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl
+++ b/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl
@@ -19,19 +19,22 @@
result := null(ConversionFactor );
if( isnull( source ) or isnull( target ) ) {
- error( "can't find source or target unit of measure" )
+ info( "can't find source or target unit of measure" )
}
- if( productId <> "" ) {
+
+ if( not isnull( source) and not isnull( target)){
+ if( productId <> "" ) {
product := Product_MP::FindById( macroPlan, productId );
- }else{
- result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable )
+ }else{
+ result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable )
}
- if( isnull( product ) ) {
- info( "invalid product id" )
+ if( isnull( product ) ) {
+ info( "鍗曚綅杞崲鍑虹幇鏃犳晥id锛�"+productId )
}else{
result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable );
}
+ }
return result;
*]
diff --git a/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl b/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl
index 0ee5894..915e3c2 100644
--- a/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl
@@ -1,16 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod DoSync (
- MacroPlan macroPlan
+ MacroPlan macroPlan,
+ GlobalOTDTable globalOTDTable
)
{
Description: '鍗曟鍚屾'
TextBody:
[*
// yypsybs Aug-17-2023 (created)
- info( "Product Finished, Start BaseConversionFactor Data Broker" )
- macroPlan.Broker_OTD_BaseConversionFactor().Execute();
+ //info( "Product Finished, Start BaseConversionFactor Data Broker" )
+ //macroPlan.Broker_OTD_BaseConversionFactor().Execute();
info( "BaseConversionFactor Data Broker Finished, Start BaseConversionFactor Mapping" )
- macroPlan.MappingBaseConversionFactorData();
+ macroPlan.MappingBaseConversionFactorData(globalOTDTable);
*]
}
diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl
index 3ec5f41..e428bb7 100644
--- a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl
+++ b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl
@@ -38,23 +38,23 @@
}
// 妫�鏌ヤ緷璧栭」
if( isnull( product) ) {
- info( "product not found" );
+ info( "product not found" + productId);
}
if( isnull( salesSegment) ) {
- info( "sales segment not found" );
+ info( "sales segment not found" + salesSegmentName);
}
if( isnull( stockingPoint) ) {
- info( "stock point not found" );
+ info( "stock point not found" + stockingPointId);
}
//if( isnull( currency) ) {
// error( "currency not found" );
//}
if( unitOfMeasureName <> "" and isnull( unitOfMeasure) ) {
- info( "unit of measure not found" );
+ info( "unit of measure not found" + unitOfMeasureName);
}
- if( priorityName <> "" and isnull( stockingPoint) ) {
- info( "priority not found" );
- }
+ //if( priorityName <> "" and isnull( stockingPoint) ) {
+ // info( "priority not found" );
+ //}
// 鏂板/鏇存柊
result := CustomerOrder::FindById( macroPlan, id );
if( isnull( result ) ) {
diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl
index ece7264..170d328 100644
--- a/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl
@@ -2,15 +2,16 @@
#parent: #root
StaticMethod DoSync (
MacroPlan macroPlan,
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
[*
// yypsybs Aug-17-2023 (created)
- info( "Forecast Finished, Start CustomerOrder Data Broker" );
- macroPlan.Broker_OTD_CustomerOrder().Execute();
+ //info( "Forecast Finished, Start CustomerOrder Data Broker" );
+ //macroPlan.Broker_OTD_CustomerOrder().Execute();
info( "CustomerOrder Data Broker Finished, Start CustomerOrder Mapping" );
- macroPlan.MappingCustomerOrderData( businessTypes );
+ macroPlan.MappingCustomerOrderData( businessTypes,globalOTDTable );
*]
}
diff --git a/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl
index a5c8eb8..ac5c1bb 100644
--- a/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl
+++ b/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl
@@ -33,23 +33,23 @@
}
// 妫�鏌ヤ緷璧栭」
if( isnull( product ) ) {
- error( "product not found" );
+ info( "product not found" + productId);
}
if( isnull( salesSegment ) ) {
- error( "sales segment not found" );
+ info( "sales segment not found" + salesSegmentName);
}
if( isnull( stockingPoint ) ) {
- error( "stock point not found" );
+ info( "stock point not found" + stockingPointId);
}
if( isnull( currency ) ) {
- error( "currency not found" );
+ info( "currency not found" + currencyId);
}
if( unitOfMeasureName <> "" and isnull( unitOfMeasure) ) {
- error( "unit of measure not found" );
+ info( "unit of measure not found" + unitOfMeasureName );
}
- if( priorityName <> "" and isnull( stockingPoint) ) {
- error( "priority not found" );
- }
+ //if( priorityName <> "" and isnull( stockingPoint) ) {
+ // info( "priority not found" );
+ //}
// 鏂板/鏇存柊
result := Forecast::FindById( macroPlan, id );
if( isnull( result) ) {
diff --git a/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl b/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl
index 401e158..1fdba27 100644
--- a/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl
@@ -2,15 +2,16 @@
#parent: #root
StaticMethod DoSync (
MacroPlan macroPlan,
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
[*
// yypsybs Aug-17-2023 (created)
- info( "OperationCost Finished, Start Forecast Data Broker" );
- macroPlan.Broker_OTD_Forecast().Execute();
+ //info( "OperationCost Finished, Start Forecast Data Broker" );
+ //macroPlan.Broker_OTD_Forecast().Execute();
info( "Forecast Data Broker Finished, Start Forecast Mapping" );
- macroPlan.MappingForecastData( businessTypes );
+ macroPlan.MappingForecastData( businessTypes,globalOTDTable );
*]
}
diff --git a/_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl b/_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl
new file mode 100644
index 0000000..0a72c14
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod FindMinSeq (
+ GlobalOTDTable globalOTDTable,
+ String orgCode,
+ String productId,
+ String processSection
+) as Number
+{
+ TextBody:
+ [*
+ // renhao Sep-20-2023 (created)
+ return guard (min( globalOTDTable, Global_MappingOperation, item,
+ item.OrganCode() = orgCode and item.ProductID() = productId and item.ProcessSection() = processSection,
+ item.SequenceNumber() ), Number::MinNumber() );
+ *]
+}
diff --git a/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl b/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl
index 574ecd5..e210049 100644
--- a/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl
@@ -1,15 +1,16 @@
Quintiq file version 2.0
#parent: #root
StaticMethod DoSync (
- MacroPlan macroPlan
+ MacroPlan macroPlan,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
[*
// yypsybs Aug-17-2023 (created)
- info( "ActualPISPIP Finished, Start InventoryCost Data Broker" );
- macroPlan.Broker_OTD_InventoryCost().Execute();
+ //info( "ActualPISPIP Finished, Start InventoryCost Data Broker" );
+ //macroPlan.Broker_OTD_InventoryCost().Execute();
info( "InventoryCost Data Broker Finished, Start InventoryCost Mapping" );
- macroPlan.MappingInventoryValueAndCostData();
+ macroPlan.MappingInventoryValueAndCostData(globalOTDTable);
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl b/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl
index c71e147..ee48ee3 100644
--- a/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl
@@ -7,88 +7,12 @@
// Administrator Sep-1-2023 (created)
//Set the Default values
- unitofmeasurename := "PCS";
- currencyid := "CNY";
- startdate := Date::Date( 1900, 1, 1 );
- enddate := Date::Date( 9999, 12, 31 );
- capacitytype := "Transport quantity";
+ //unitofMeasureName := "PCS";
+ //currencyid := "CNY";
+ //startdate := Date::Date( 1900, 1, 1 );
+ //enddate := Date::Date( 9999, 12, 31 );
+ //capacitytype := "Transport quantity";
- if( isnull( Unit::FindById( this, "绌鸿繍" ) ) ){
- this.Unit( relnew,
- ID := "绌鸿繍",
- Name := "绌鸿繍",
- UnitOfMeasureName := unitofmeasurename,
- CurrencyID := currencyid,
- StartDate := startdate,
- EndDate := enddate,
- CapacityType := capacitytype );
- }
-
- if( isnull( Unit::FindById( this, "搴撳瓨浜嬪姟澶勭悊" ) ) ){
- this.Unit( relnew,
- ID := "搴撳瓨浜嬪姟澶勭悊",
- Name := "搴撳瓨浜嬪姟澶勭悊",
- UnitOfMeasureName := unitofmeasurename,
- CurrencyID := currencyid,
- StartDate := startdate,
- EndDate := enddate,
- CapacityType := capacitytype );
- }
-
- unitofmeasurename := "PCS";
- name := "鎵嬪姩鍒涘缓搴撳瓨鐐�";
- currencyname := "CNY";
- isplannedinfinite := false;
- datestart := Date::Construct(1900, 1, 1) ;
- dateend := Date::Construct(9999, 12, 31);
- groupname := " ";
- description := " ";
- isfromdb := true;
-
- if( isnull( StockingPoint_MP::FindById( this, "F13_FG_STOCK" ) ) ){
- StockingPoint_MP::Create( this,
- "F13_FG_STOCK",
- "F13",
- name,
- unitofmeasurename,
- currencyname,
- isplannedinfinite,
- datestart,
- dateend,
- groupname,
- description,
- isfromdb );
- }
-
- if( isnull( StockingPoint_MP::FindById( this, "H10_SA_STOCK" ) ) ){
- StockingPoint_MP::Create( this,
- "H10_SA_STOCK",
- "H10",
- name,
- unitofmeasurename,
- currencyname,
- isplannedinfinite,
- datestart,
- dateend,
- groupname,
- description,
- isfromdb );
- }
-
- if( isnull( StockingPoint_MP::FindById( this, "Q10_FG_STOCK" ) ) ){
- StockingPoint_MP::Create( this,
- "Q10_FG_STOCK",
- "Q10",
- name,
- unitofmeasurename,
- currencyname,
- isplannedinfinite,
- datestart,
- dateend,
- groupname,
- description,
- isfromdb );
- }
existcurrency := Currency_MP::FindById( this, "CNY" );
if( isnull( existcurrency ) ){
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
index f9cd042..c6520fb 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
@@ -2,21 +2,21 @@
#parent: #root
Method MappingActualPISPIPData (
Strings businessTypes,
+ GlobalOTDTable globalOTDTable,
Boolean nuclear
)
{
TextBody:
[*
// renhao Aug-14-2023 (created)
- date := Date :: Today();
- listtodeal := selectset( this,MappingActualPISPIP,actual,true );
+ listtodeal := selectset( globalOTDTable,Global_MappingActualProductInStockingPointInPeriod,actual,actual.ActualInventoryLevelEnd() > 0 );
totalcount := listtodeal.Size();
info( "ActualPISPIP has " + totalcount.AsQUILL() + " rows in total" );
count := 0;
traverse( listtodeal,Elements,actual){
count := count + 1;
- if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
+ if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){
info( "Now is dealing with the " + count.AsQUILL() + "ActualPISPIP " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
}
product := select( this,MappingProduct,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true);
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl
index f0a87c2..e0357c1 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl
@@ -1,19 +1,21 @@
Quintiq file version 2.0
#parent: #root
-Method MappingBaseConversionFactorData
+Method MappingBaseConversionFactorData (
+ GlobalOTDTable globalOTDTable
+)
{
Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�'
TextBody:
[*
// yypsybs Aug-15-2023 (created)
- traverse( this, MappingBaseConversionFactor, item ) {
+ traverse( globalOTDTable, Global_MappingConversionFactor, item ) {
//濡傛灉ProductID涓嶄负绌猴紝涓斿尮閰嶄笉鍒癙roduct锛屽垯涓嶅垱寤猴紝杩斿洖涓虹┖
// info( item.ProductId().AsQUILL() );
BaseConversionFactor::CreateOrUpdate( this,
item.SourceUnitOfMeasureName(),
item.TargetUnitOfMeasureName(),
item.IsEnabled(),
- item.ProductId(),
+ item.ProductID(),
item.Factor() );
}
*]
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
index 7ec0576..bee6304 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
Method MappingCustomerOrderData (
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
Description: 'ETL璁㈠崟棰勬祴'
@@ -9,15 +10,15 @@
[*
// yypsybs Aug-15-2023 (created)
// 寰呭鐞嗘暟鎹�
- listToDeal := construct( structured[MappingCustomerOrder] );
+ listToDeal := construct( Global_MappingCustomOrders );
if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
- listToDeal := selectset( this, MappingCustomerOrder, item, true );
+ listToDeal := selectset( globalOTDTable, Global_MappingCustomOrder, item, true );
} else {
- listToDeal := selectset( this, MappingCustomerOrder, item, businessTypes.Find( item.BusinessType() ) <> -1 );
+ listToDeal := selectset( globalOTDTable, Global_MappingCustomOrder, item, businessTypes.Find( item.BusinessType() ) <> -1 );
}
queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
- listToDeal := selectset( listToDeal, Elements, item, item.OrderDate() >= queryStartDate /*and item.OrderDate() <= queryEndDate*/, not isnull( Product_MP::FindById( this, item.ProductID() ) ) and not isnull( StockingPoint_MP::FindById( this, item.StockPointID() ) ) and not isnull( SalesSegment_MP::FindByName( this, item.SalesSegmentName() ) ) );
+ listToDeal := selectset( listToDeal, Elements, item, item.OrderDate() >= queryStartDate /*and item.OrderDate() <= queryEndDate*/, not isnull( Product_MP::FindById( this, item.ProductID() ) ) and not isnull( StockingPoint_MP::FindById( this, item.StockingPointID() ) ) and not isnull( SalesSegment_MP::FindByName( this, item.SalesSegmentName() ) ) );
totalcount := listToDeal.Size();
info( "CustomerOrder has " + totalcount.AsQUILL() + " rows in total" );
@@ -35,7 +36,7 @@
CustomerOrder::CreateOrUpdate( this, item.CurrencyID(), item.Customer(), item.CustomerID(), item.ID(),
item.OrderDate(), item.OrderID(), item.OrderLineID(), item.Price(),
priorityName, item.ProductID(),
- item.StockPointID(),
+ item.StockingPointID(),
item.SalesSegmentName(),
item.Quantity(), item.UnitOfMeasureName(), item.OrderType(), item.IsAvailable());
// }else{
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
index ead549d..c6a2bcf 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
@@ -2,7 +2,8 @@
#parent: #root
Method MappingExternalSupplyData (
Strings businessTypes,
- Boolean nuclear
+ Boolean nuclear,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
@@ -10,7 +11,7 @@
// renhao Aug-14-2023 (created)
queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
- listtodeal := selectset( this,MappingExternalSupply,externalSupply, externalSupply.UserQuantity()>0 and externalSupply.Date() >= queryStartDate /*and externalSupply.Date() <= queryEndDate*/);
+ listtodeal := selectset( globalOTDTable,Global_MappingInventorySupply,externalSupply, externalSupply.UserQuantity()>0 and externalSupply.Date() >= queryStartDate /*and externalSupply.Date() <= queryEndDate*/);
totalcount := listtodeal.Size();
description := "鍦ㄩ�斿湪鍒�";
info( "ExternalSupply has " + totalcount.AsQUILL() + " rows in total" );
@@ -21,7 +22,7 @@
if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){
info( "Now is dealing with the " + count.AsQUILL() + "ExternalSupply " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
}
- product := select( this,MappingProduct,product,product.ID() = externalSupply.ProductID(),true);
+ product := select( globalOTDTable,Global_MappingProduct_MP,product,product.ID() = externalSupply.ProductID(),true);
if( not isnull( product)){
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
index 47e8597..21b752b 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
Method MappingForecastData (
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
Description: 'ETL璁㈠崟棰勬祴'
@@ -9,11 +10,11 @@
[*
// yypsybs Aug-15-2023 (created)
// 寰呭鐞嗘暟鎹�
- listToDeal := construct( structured[MappingForecast] );
+ listToDeal := construct( Global_MappingForecasts );
if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
- listToDeal := selectset( this, MappingForecast, item, item.Quantity() > 0 );
+ listToDeal := selectset( globalOTDTable, Global_MappingForecast, item, item.Quantity() > 0 );
} else {
- listToDeal := selectset( this, MappingForecast, item, businessTypes.Find( item.BusinessType() ) <> -1 and item.Quantity()>0 );
+ listToDeal := selectset( globalOTDTable, Global_MappingForecast, item, businessTypes.Find( item.BusinessType() ) <> -1 and item.Quantity()>0 );
}
queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
index 0789263..833d887 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
@@ -1,11 +1,13 @@
Quintiq file version 2.0
#parent: #root
-Method MappingInventoryValueAndCostData
+Method MappingInventoryValueAndCostData (
+ GlobalOTDTable globalOTDTable
+)
{
TextBody:
[*
// yypsybs Aug-15-2023 (created)
- listtodeal := selectset( this,MappingInventoryValueAndCost,item,true );
+ listtodeal := selectset( globalOTDTable,Global_MappingStockingPointCost,item,true );
totalcount := listtodeal.Size();
info( "InventoryCost has " + totalcount.AsQUILL() + " rows in total" );
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
index b807827..ca35281 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
@@ -3,7 +3,8 @@
Method MappingOperationBOMData (
Strings businessTypes,
Boolean isKeyProduct,
- Boolean createPurchaseSupplyMaterial
+ Boolean createPurchaseSupplyMaterial,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
@@ -12,9 +13,9 @@
keyProductList := construct( Strings );
if( isKeyProduct ) {
- keyProductList := selectuniquevalues( this, MappingProduct, item, item.ProductMajorType()="鎴愬搧" or item.ProductMajorType()="鍗婃垚鍝�", item.ID() );
+ keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="鎴愬搧" or item.ProductMajorType()="鍗婃垚鍝�", item.ID() );
}
- bomList := selectsortedset( this, MappingBOM, item,
+ bomList := selectsortedset( globalOTDTable, Global_MappingOperationBOM, item,
ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0,
true,
// businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 )
@@ -61,9 +62,9 @@
if( not isnull( stockingPoint)){
if( isKeyProduct){
keyRows := selectset( routingRows,Elements,routingrow,keyProductList.Find( routingrow.ComponentCode())>=0);
- this.MappingOperationBOMDataRouting( routing,keyRows);
+ this.MappingOperationBOMDataRouting( routing,globalOTDTable,keyRows);
}else{
- this.MappingOperationBOMDataRouting( routing,routingRows);
+ this.MappingOperationBOMDataRouting( routing,globalOTDTable,routingRows);
}
}
diff --git "a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl" "b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl"
index e661d1f..c661b69 100644
--- "a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl"
+++ "b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl"
@@ -2,7 +2,8 @@
#parent: #root
Method MappingOperationBOMDataRouting (
Routing routing,
- MappingBOMs routingRows
+ GlobalOTDTable globalOTDTable,
+ Global_MappingOperationBOMs routingRows
)
{
TextBody:
@@ -15,7 +16,7 @@
rows := selectset( routingRows, Elements, row, row.ProcessSection() = processSection );
firstRow := rows.Element( 0 );
// 鎵緊rgCode/productId/processSection鍖归厤涓攕equence鏈�灏忕殑涓�缁勬暟鎹�
- minSeq := MappingOperation::FindMinSeq( this, firstRow.OrganCode(), firstRow.ProductCode(), processSection );
+ minSeq := Global_MappingOperation::FindMinSeq( globalOTDTable, firstRow.OrganCode(), firstRow.ProductCode(), processSection );
routingStepId := processSection + "_" + [String]minSeq;
// 鎵惧搴攔outingStep
routingStep := RoutingStep::FindByName( routing, routingStepId );
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
index 07e9838..397d6d4 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
@@ -1,21 +1,22 @@
Quintiq file version 2.0
#parent: #root
Method MappingOperationData (
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
[*
// yypsybs Aug-18-2023 (created)
// 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍
- toDealList := construct( MappingOperations );
+ toDealList := construct( Global_MappingOperations ) ;
if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
- toDealList := selectsortedset( this, MappingOperation, item,
+ toDealList := selectsortedset( globalOTDTable, Global_MappingOperation, item,
businessTypes.Find( item.BusinessType() ) >= 0,
// businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0,
item.SequenceNumber() );
} else {
- toDealList := selectsortedset( this, MappingOperation, item,
+ toDealList := selectsortedset( globalOTDTable, Global_MappingOperation, item,
true,
item.SequenceNumber() );
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
index 9a854ef..ab7398e 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
@@ -2,6 +2,7 @@
#parent: #root
Method MappingProductData (
Strings businesstypes,
+ GlobalOTDTable globalOTDTable,
Boolean iskeyproduct
)
{
@@ -11,21 +12,21 @@
// Administrator Aug-16-2023 (created)
// list to deal
info( "Get list to deal of product" );
- listToDeal := construct( structured[MappingProduct] );
+ listToDeal := construct( Global_MappingProduct_MPs );
if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
if( iskeyproduct = true ){
- listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true );
+ listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.KeyProduct() = true );
}
else{
- listToDeal := selectset( this, MappingProduct, item, true );
+ listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, true );
}
} else {
if( iskeyproduct = true ){
- listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true and businesstypes.Find( item.BusinessType()) >= 0 );
+ listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.KeyProduct() = true and businesstypes.Find( item.BusinessType()) >= 0 );
}
else{
- listToDeal := selectset( this, MappingProduct, item, businesstypes.Find( item.BusinessType()) >= 0 );
+ listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, businesstypes.Find( item.BusinessType()) >= 0 );
}
}
totalcount := listToDeal.Size();
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
index 2d63310..5052dc6 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
@@ -1,13 +1,15 @@
Quintiq file version 2.0
#parent: #root
-Method MappingProductInLaneData
+Method MappingProductInLaneData (
+ GlobalOTDTable globalOTDTable
+)
{
Description: 'Get Product In Line data'
TextBody:
[*
// Administrator Aug-17-2023 (created)
// list to deal
- listtodeal := selectset( this, MappingProductInLane, item ,true );
+ listtodeal := selectset( globalOTDTable, Global_MappingProductInLane, item ,true );
totalcount := listtodeal.Size();
info( "ProductInLane has " + totalcount.AsQUILL() + " rows in total" );
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl
index 5f5e1aa..cf459b5 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
Method MappingSalesSegmentData (
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
Description: 'ETL閿�鍞儴闂�'
@@ -9,11 +10,11 @@
[*
// yypsybs Aug-15-2023 (created)
// 寰呭鐞嗘暟鎹�
- listToDeal := construct( structured[MappingSalesSegment] );
+ listToDeal := construct( Global_MappingSalesSegment_MPs );
if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
- listToDeal := selectset( this, MappingSalesSegment, item, true );
+ listToDeal := selectset( globalOTDTable, Global_MappingSalesSegment_MP, item, true );
} else {
- listToDeal := selectset( this, MappingSalesSegment, item, businessTypes.Find( item.BusinessType() ) <> -1 );
+ listToDeal := selectset( globalOTDTable, Global_MappingSalesSegment_MP, item, businessTypes.Find( item.BusinessType() ) <> -1 );
}
//nameList := construct( structured[String] );
//nameList := selectvalues( listToDeal, Elements, item, true, item.Name() );
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
index 7c856ff..eeb6a49 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
Method MappingUnitData (
- Strings businesstypes
+ Strings businesstypes,
+ GlobalOTDTable globalOTDTable
)
{
Description: 'Get unit data from operation mapping'
@@ -9,12 +10,12 @@
[*
// Administrator Aug-21-2023 (created)
// list to deal
- listtodeal := construct( structured[MappingOperation] );
+ listtodeal := construct( Global_MappingOperations);
if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
- listtodeal := selectset( this, MappingOperation, item, true );
+ listtodeal := selectset( globalOTDTable, Global_MappingOperation, item, true );
} else {
- listtodeal := selectset( this, MappingOperation, item,
+ listtodeal := selectset( globalOTDTable, Global_MappingOperation, item,
// businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
businesstypes.Find( item.BusinessType() ) >= 0
);
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
index 2c4ce55..f3118cb 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
@@ -1,6 +1,8 @@
Quintiq file version 2.0
#parent: #root
-Method MappingUnitOfMeasureData
+Method MappingUnitOfMeasureData (
+ GlobalOTDTable globalotdtable
+)
{
Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�'
TextBody:
@@ -16,7 +18,7 @@
//error( "multi default unit of measure" )
}
- traverse( this, MappingUnitOfMeasure, item ) {
+ traverse( globalotdtable, Global_MappingUnitOfMeasure_MP, item ) {
UnitOfMeasure_MP::CreateOrUpdate( this, item.Name(), item.IsDefault() );
}
*]
diff --git "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl"
index c3d0398..9d29f63 100644
--- "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl"
+++ "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl"
@@ -4,7 +4,8 @@
MacroPlan macroPlan,
String businessTypeStr,
Boolean isKeyProduct,
- Boolean createPurchaseSupplyMaterial
+ Boolean createPurchaseSupplyMaterial,
+ GlobalOTDTable globalOTDTable
)
{
Description: '鍗曟鍚屾'
@@ -15,6 +16,6 @@
if( businessTypeStr.Length() > 0 ) {
businessTypes := businessTypeStr.Tokenize( ',' );
}
- MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+ MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable);
*]
}
diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl
index 4609620..49fac75 100644
--- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl
@@ -3,7 +3,8 @@
StaticMethod DoSync (
MacroPlan macroPlan,
Boolean isKeyProduct,
- Boolean createPurchaseSupplyMaterial
+ Boolean createPurchaseSupplyMaterial,
+ GlobalOTDTable globalOTDTable
)
{
Description: '鍗曟鍚屾'
@@ -11,6 +12,6 @@
[*
// yypsybs Aug-17-2023 (created)
businessTypes := construct( Strings );
- MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+ MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable);
*]
}
diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
index 1375c53..45c9fec 100644
--- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
+++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
@@ -4,7 +4,8 @@
MacroPlan macroPlan,
Strings businessTypes,
Boolean isKeyProduct,
- Boolean createPurchaseSupplyMaterial
+ Boolean createPurchaseSupplyMaterial,
+ GlobalOTDTable globalOTDTable
)
{
Description: '鍗曟鍚屾'
@@ -27,10 +28,17 @@
macroPlan.InitialUnitAndStockingPoint();
// 鍗曚綅-1
- UnitOfMeasure_MP::DoSync( macroPlan );
+ UnitOfMeasure_MP::DoSync( globalOTDTable,macroPlan );
// 閿�鍞儴闂�-2
- SalesSegment_MP::DoSync( macroPlan, businessTypes );
+ SalesSegment_MP::DoSync( macroPlan, businessTypes,globalOTDTable );
+
+ // Unit-9
+ // 涓嶰peration涓�鍚屽鐞�
+ //info( "BaseConversionFactor Finished, Start Operation Data Broker" );
+ //macroPlan.Broker_OTD_Operation().Execute();
+ info( "Operation Data Broker Finished, Start Unit Mapping" );
+ macroPlan.MappingUnitData( businessTypes ,globalOTDTable);
// 搴撳瓨鐐�-3
info( "Sales Segment Finished, Start Get StockingPoint From Api" )
@@ -63,29 +71,22 @@
macroPlan.ApiCurencyRatesData( data );
// 浜у搧鐗╂枡-6
- info( "Get CurrencyRates From Api Finished, Start Product Data Broker" )
- macroPlan.Broker_OTD_Product().Execute();
+ //info( "Get CurrencyRates From Api Finished, Start Product Data Broker" )
+ //macroPlan.Broker_OTD_Product().Execute();
info( "Product Data Broker Finished, Start Product Mapping" );
//testproduct := construct( Strings );
- macroPlan.MappingProductData( businessTypes, isKeyProduct );
+ macroPlan.MappingProductData( businessTypes, globalOTDTable,isKeyProduct );
//鍗曚綅杞崲-7
- BaseConversionFactor::DoSync( macroPlan );
-
- // Unit-9
- // 涓嶰peration涓�鍚屽鐞�
- info( "BaseConversionFactor Finished, Start Operation Data Broker" );
- macroPlan.Broker_OTD_Operation().Execute();
- info( "Operation Data Broker Finished, Start Unit Mapping" );
- macroPlan.MappingUnitData( businessTypes );
+ BaseConversionFactor::DoSync( macroPlan ,globalOTDTable);
// 宸ヨ壓璺嚎 + BOM-9
info( "Unit Finished, Start Operation Mapping" );
- macroPlan.MappingOperationData( businessTypes );
- info( "Operation Finished, Start BOM Data Broker" );
- macroPlan.Broker_OTD_BOM().Execute();
+ macroPlan.MappingOperationData( businessTypes ,globalOTDTable);
+ //info( "Operation Finished, Start BOM Data Broker" );
+ //macroPlan.Broker_OTD_BOM().Execute();
info( "BOM Data Broker Finished, Start BOM Mapping" );
- macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+ macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial,globalOTDTable );
//杞﹂亾淇℃伅-10
info( "BOM Finished, Start Get Lanes From Api" );
@@ -108,37 +109,35 @@
macroPlan.ApiLaneLegsData( data );
// 渚涘簲缃戠粶锛堣溅閬擄級-12
- info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" );
- macroPlan.Broker_OTD_ProductInLane().Execute();
+ //info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" );
+ //macroPlan.Broker_OTD_ProductInLane().Execute();
info( "ProductInLane Data Broker Finished, Start ProductInLane Mapping" );
- macroPlan.MappingProductInLaneData();
+ macroPlan.MappingProductInLaneData(globalOTDTable);
// 鍦ㄥ簱搴撳瓨鏁版嵁-13
- info( "ProductInLane Finished, Start ActualPISPIP Data Broker" );
- macroPlan.Broker_OTD_ActualPISPIP().Execute();
+ //info( "ProductInLane Finished, Start ActualPISPIP Data Broker" );
+ //macroPlan.Broker_OTD_ActualPISPIP().Execute();
info( "ActualPISPIP Data Broker Finished, Start ActualPISPIP Mapping" );
- //macroPlan.MappingActualPISPIPData( businessTypes, true );
- macroPlan.MappingActualPISPIPData( businessTypes, isKeyProduct );
+ macroPlan.MappingActualPISPIPData( businessTypes, globalOTDTable,isKeyProduct );
// 鍦ㄩ�斿簱瀛�-14
- info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" );
- macroPlan.Broker_OTD_ExternalSupply().Execute();
- //macroPlan.MappingExternalSupplyData( businessTypes, true );
+ //info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" );
+ //macroPlan.Broker_OTD_ExternalSupply().Execute();
info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" );
- macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct );
+ macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct ,globalOTDTable);
// 搴撳瓨鎴愭湰-15
- InventoryValueAndCost::DoSync( macroPlan );
+ InventoryValueAndCost::DoSync( macroPlan,globalOTDTable );
// todo 鍒堕�犳垚鏈�-16
info( "InventoryCost Finished, Start OperationCost Mapping" );
//macroPlan.MappingOperationCostData( businessTypes );
// 璁㈠崟棰勬祴-17
- Forecast::DoSync( macroPlan, businessTypes );
+ Forecast::DoSync( macroPlan, businessTypes ,globalOTDTable);
// 璁㈠崟闇�姹�-18
- CustomerOrder::DoSync( macroPlan, businessTypes );
+ CustomerOrder::DoSync( macroPlan, businessTypes,globalOTDTable);
//鍒犻櫎澶氫綑鎶ラ敊鏁版嵁-19
macroPlan.DeleteSnaityCheck();
diff --git a/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl b/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl
index ef1ffae..cd9e1c1 100644
--- a/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl
@@ -2,15 +2,16 @@
#parent: #root
StaticMethod DoSync (
MacroPlan macroPlan,
- Strings businessTypes
+ Strings businessTypes,
+ GlobalOTDTable globalOTDTable
)
{
TextBody:
[*
// yypsybs Aug-17-2023 (created)
- info( "UnitOfMeasure_MP Finished, Start Sales Segment Data Broker" )
- macroPlan.Broker_OTD_SalesSegment().Execute();
+ //info( "UnitOfMeasure_MP Finished, Start Sales Segment Data Broker" )
+ //macroPlan.Broker_OTD_SalesSegment().Execute();
info( "Sales Segment Data Broker Finished, Start Sales Segment Mapping" )
- macroPlan.MappingSalesSegmentData( businessTypes );
+ macroPlan.MappingSalesSegmentData( businessTypes,globalOTDTable );
*]
}
diff --git a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl
index aff8971..857199b 100644
--- a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl
+++ b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl
@@ -33,7 +33,7 @@
// Update
result.Update( unitid, id, name, unitofmeasurename, currencyname, isplannedinfinite, datestart, dateend, groupname, description, isfromdb );
};
-
+ result.IsPlannedInfinite(true);
return result;
*]
}
diff --git a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl
index e4dae0e..9fdcd8b 100644
--- a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl
+++ b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl
@@ -13,6 +13,11 @@
unitid := datarow.Get( "unitid" ).GetString();
name := datarow.Get( "name" ).GetString();
+ unit := Unit::FindUnitTypeIndex( unitid);
+ if( isnull( unit)){
+ unitid := "鐢熶骇";
+ }
+
result := StockingPoint_MP::CreateStockingpoint( mp, id, unitid, name );
return result;
diff --git a/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl b/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl
index f5ea0a0..7393582 100644
--- a/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl
+++ b/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl
@@ -1,16 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod DoSync (
- MacroPlan macroPlan
+ GlobalOTDTable globalotdtable,
+ MacroPlan macroplan
)
{
Description: '鍗曟鍚屾'
TextBody:
[*
// yypsybs Aug-17-2023 (created)
- info( "Inital Finished, Start UnitOfMeasure_MP Data Broker" )
- macroPlan.Broker_OTD_UnitOfMeasure().Execute();
+ //info( "Inital Finished, Start UnitOfMeasure_MP Data Broker" )
+ //macroPlan.Broker_OTD_UnitOfMeasure().Execute();
info( "UnitOfMeasure_MP Data Broker Finished, Start UnitOfMeasure_MP Mapping" )
- macroPlan.MappingUnitOfMeasureData();
+ macroplan.MappingUnitOfMeasureData(globalotdtable);
*]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
index 5d283ea..b8022af 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -108,7 +108,7 @@
// sync data
if( data.EnableSync() ) {
MacroPlan::DoSync( macroPlanNew,
- data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() );
+ data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable);
}
this.Close();
diff --git a/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp b/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
index cb94597..b4cfb85 100644
--- a/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
+++ b/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
@@ -5,7 +5,7 @@
ProjectProperties
{
ApplicationComponentName: 'ApplicationMacroPlanner'
- BuildVersion: '2022.3.0.32'
+ BuildVersion: '2022.3.0.34'
Description: 'Quintiq Macro Planner'
ProjectKind: 'WebClient'
}
--
Gitblit v1.9.3