hongji.li
2023-11-03 d6bd7a69bc31efa79b21c7be12ba9547a921c251
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Quintiq file version 2.0
#parent: #root
Method CapacityAndSaleBudgeCompare (
  MacroPlans macroPlans,
  owning CapacityAndSaleBudgeFilterItems items,
  owning CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays casbfpopoas,
  owning CapacityAndSaleBudgeFilterBusinessTypes casbfbts,
  owning CapacityAndSaleBudgeFilterYears years,
  owning CapacityAndSaleBudgeFilterMonths months,
  const GlobalOTDTable globalOTDTable
)
{
  Description: 'todo : mappingParent改为mpSync, random删了'
  TextBody:
  [*
    this.CapacityAndSaleBudgeCompareItemRow( relflush );
    this.CapacityAndSaleBudgeCompareItemColumn( relflush );
    
    CapacityAndSaleBudgeCompareItemCell::SetFilterCriteria( this, &items, &casbfpopoas, &casbfbts, &years, &months );
    
    CapacityAndSaleBudgeCompareItemCell::GenerateBasicDataBasedOnFilteringCriteria( this, globalOTDTable, items, casbfpopoas, casbfbts );
    
    CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeData( macroPlans, globalOTDTable, this, items, years, months );
    
    CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocation( macroPlans, globalOTDTable, this, items, years, months );
    
    //if ( CapacityAndSaleBudgeFilterItem::Contains( items, "面板分配量" ) ) {
    //  traverse ( years, Elements, year ) {
    //    CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationBudget( this, months, year, globalOTDTable );
    //    CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationByScenario( macroPlans, this, months, year );
    //  }
    //}
    //
    //if ( CapacityAndSaleBudgeFilterItem::Contains( items, "销售额" ) ) {
    //  traverse ( years, Elements, year ) {
    //    CapacityAndSaleBudgeCompareItemCell::CreateSalesVolume( this, months, year, globalOTDTable );
    //    CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeByScenario( macroPlans, this, months, year );
    //  }
    //}
    
    // 大张盈利额
    //traverse ( years, Elements, year ) {
    //  // 历史数据
    //  columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "大张盈利额-" + [String]year.YearNo() + "年-年度预算" );
    //  traverse ( this, CapacityAndSaleBudgeCompareItemRow, row ) {
    //    cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
    //    cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
    //  }
    //  // S&OP数据
    //  traverse( macroPlans, Elements, macroPlan ) {
    //    columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "大张盈利额-" + [String]year.YearNo() + "年-" + macroPlan.ScenarioName() );
    //    traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
    //      cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
    //      cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
    //    }
    //  }
    //}
    //// 产品盈利额
    //traverse ( years, Elements, year ) {
    //  // 历史数据
    //  columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "产品盈利额-" + [String]year.YearNo() + "年-年度预算" );
    //  traverse ( this, CapacityAndSaleBudgeCompareItemRow, row ) {
    //    cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
    //    cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
    //  }
    //  // S&OP数据
    //  traverse ( macroPlans, Elements, macroPlan ) {
    //    columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "产品盈利额-" + [String]year.YearNo() + "年-" + macroPlan.ScenarioName() );
    //    traverse ( this, CapacityAndSaleBudgeCompareItemRow, row ) {
    //      // todo
    //      cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
    //      cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
    //    }
    //  }
    //}
    
    // 设置rowNo和columnNo
    //rowNo := 1;
    //rowSorted := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, item, item.PlaceOfProductionOfArray() + "_" + item.BusinessType() );
    //traverse( rowSorted, Elements, item ) {
    //  item.RowNo( rowNo );
    //  rowNo := rowNo + 1;
    //}
    //columnNo := 1;
    //traverse( this, CapacityAndSaleBudgeCompareItemColumn, item ) {
    //  item.ColumnNo( columnNo );
    //  columnNo := columnNo + 1;
    //}
  *]
}