From e8be76a40ae0b3cb1d37a6e91e25c1284a50347f Mon Sep 17 00:00:00 2001
From: Administrator <renhui.hao@capgemini.com>
Date: 星期四, 21 九月 2023 20:59:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev'
---
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl | 73 +++++++++++++++++-------------------
1 files changed, 35 insertions(+), 38 deletions(-)
diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
index 6688d88..a441cd3 100644
--- a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
+++ b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
@@ -52,7 +52,7 @@
// 璁板綍姣忚鍖呭惈鍝簺product
CapacityAndSaleBudgeCompareItemRowProduct::CreateIfNotExist( row, productCode );
} else {
- // info( "111111" );
+ info( "no boms for product : " + productCode );
}
}
info( "CapacityAndSaleBudgeCompareItemRow : " + [String]selectset( this, CapacityAndSaleBudgeCompareItemRow, item, true ).Size() );
@@ -71,32 +71,29 @@
// 鏍煎紡锛� 闈㈡澘鍒嗛厤閲� - 骞� - 鏈堬紙1-12 & total锛� - 骞村害棰勭畻/scenarioName
info( "dealing 闈㈡澘鍒嗛厤閲�" )
if( CapacityAndSaleBudgeFilterItem::Contains( items, "闈㈡澘鍒嗛厤閲�" ) ) {
- // 鍘嗗彶鏁版嵁
- traverse( months, Elements, month ) {
- columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "闈㈡澘鍒嗛厤閲�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" );
+ traverse( years, Elements, year ) {
+ // 鍘嗗彶鏁版嵁
+ traverse( months, Elements, month ) {
+ columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "闈㈡澘鍒嗛厤閲�-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" );
+ traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
+ cellReal := MappingCapacityAndSaleBudge::GetSheetByMonth( row.GetProductCodes(), mpSync, DateTime::Now().Year(), month.MonthNo() );
+ cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
+ cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
+ }
+ }
+ columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "闈㈡澘鍒嗛厤閲�-" + [String]year.YearNo() + "骞�-total-骞村害棰勭畻" );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- cellReal := MappingCapacityAndSaleBudge::GetSheetByMonth( row.GetProductCodes(), mpSync, DateTime::Now().Year(), month.MonthNo() );
- // cellReal := Real::Random( 1.0, 999.0 );
- cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
+ cellReal := MappingCapacityAndSaleBudge::GetSheetByYear( row.GetProductCodes(), mpSync, year.YearNo() );
+ cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
- }
- columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "闈㈡澘鍒嗛厤閲�-total-骞村害棰勭畻" );
- traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- cellReal := MappingCapacityAndSaleBudge::GetSheetByYear( row.GetProductCodes(), mpSync, DateTime::Now().Year() );
- // cellReal := Real::Random( 1.0, 999.0 );
- cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
- cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
- }
- // S&OP鏁版嵁
- traverse( years, Elements, year ) {
+ // S&OP鏁版嵁
traverse( macroPlans, Elements, macroPlan ) {
traverse( months, Elements, month ) {
columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this,
"闈㈡澘鍒嗛厤閲�-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-" + macroPlan.ScenarioName() );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
cellReal := Product_MP::GetNewSupplyByMonth( row.GetProductCodes(), macroPlan, year.YearNo(), month.MonthNo() );
- // cellReal := Real::Random( 1.0, 999.0 );
cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
@@ -105,7 +102,6 @@
"闈㈡澘鍒嗛厤閲�-" + [String]year.YearNo() + "骞�-total-" + macroPlan.ScenarioName() );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
cellReal := Product_MP::GetNewSupplyByYear( row.GetProductCodes(), macroPlan, year.YearNo() );
- // cellReal := Real::Random( 1.0, 999.0 );
cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
@@ -115,37 +111,36 @@
// 骞村害閿�鍞
info( "dealing 閿�鍞" )
if( CapacityAndSaleBudgeFilterItem::Contains( items, "閿�鍞" ) ) {
- // 鍘嗗彶鏁版嵁
- traverse( months, Elements, month ) {
- columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + "-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" );
+ traverse( years, Elements, year ) {
+ // 鍘嗗彶鏁版嵁
+ traverse( months, Elements, month ) {
+ columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" );
+ traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
+ cellReal := MappingCapacityAndSaleBudge::GetSaleByMonth( row.GetProductCodes(), mpSync, year.YearNo(), month.MonthNo() );
+ cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
+ cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
+ }
+ }
+ columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + [String]year.YearNo() + "骞�-骞村害棰勭畻" );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- cellReal := MappingCapacityAndSaleBudge::GetSaleByMonth( row.GetProductCodes(), mpSync, DateTime::Now().Year(), month.MonthNo() );
- // cellReal := Real::Random( 1.0, 999.0 );
- cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
+ cellReal := MappingCapacityAndSaleBudge::GetSaleByYear( row.GetProductCodes(), mpSync, year.YearNo() );
+ cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
- }
- columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-total-骞村害棰勭畻" );
- traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- cellReal := MappingCapacityAndSaleBudge::GetSaleByYear( row.GetProductCodes(), mpSync, DateTime::Now().Year() );
- // cellReal := Real::Random( 1.0, 999.0 );
- cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
- cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
- }
- // S&OP鏁版嵁
- traverse( years, Elements, year ) {
+ // S&OP鏁版嵁
traverse( macroPlans, Elements, macroPlan ) {
traverse( months, Elements, month ) {
columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-" + macroPlan.ScenarioName() );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- cellReal := MappingForecast::GetBalanceByMonth( row.GetProductCodes(), mappingParent, year.YearNo(), month.MonthNo() );
+ cellReal := MappingAnnualBudget::GetSaleByMonth( row.GetProductCodes(), mpSync, year.YearNo(), month.MonthNo() );
cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
}
columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + [String]year.YearNo() + "骞�-total-" + macroPlan.ScenarioName() );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- cellReal := MappingForecast::GetBalanceByYear( row.GetProductCodes(), mappingParent, year.YearNo() );
+ // QID 23
+ cellReal := MappingAnnualBudget::GetSaleByYear( row.GetProductCodes(), mpSync, year.YearNo() );
cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
@@ -158,7 +153,8 @@
// 鍘嗗彶鏁版嵁
columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-骞村害棰勭畻" );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
- // todo
+ // todo
+ // QID 23
cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
@@ -178,6 +174,7 @@
columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-骞村害棰勭畻" );
traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
// todo
+ // QID 23
cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
}
--
Gitblit v1.9.3