Kevin Kok Khah Whey
2023-10-18 d5e46a7a9f2cb9123b9aafb39a20e14059faa2e4
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
Quintiq file version 2.0
#parent: #root
StaticMethod TestData (
  GlobalOTDSOP parent
)
{
  Description: '生成测试数据'
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
    
    info( "生成年度产销预算报表测试数据" )
    
    parent.CapacityAndSaleBudgeChartElement( relflush );
    for( sc := 0; sc < 4; sc := sc + 1 ) {
      scenarioName := "SC" + [String]sc;
      for( i := 0; i < 4; i := i + 1 ) {
        businessTypeString := "BT" + [String]i;
        for( j := 1; j <= 12; j := j + 1 ) {
          monthString := "MONTH" + ifexpr( j < 10, "0" + [String]j, [String]j );
          parent.CapacityAndSaleBudgeChartElement( relnew, 
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessTypeString, 
                                                   TimeStringAndScenarioName := monthString + " - " + scenarioName, 
                                                   Quantity := Real::Random( 20.0, 30.0 ) );
        }
      }
    }
  *]
}