renhao
2023-09-21 d30a8bbf3f46528e1773bce1a2065b2462b84a18
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
Quintiq file version 2.0
#parent: #root
Method InitTestData
{
  TextBody:
  [*
    //this.MatAttrSettingAndPlanStrategy( relflush );
    
    // yypsybs Sep-8-2023 (created)
    info( "CapacityAndSaleBudge::InitTestData" )
    mat1 := MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 1, "手机事业部", "MAT_1", "MAT_1", "TYPE_1", 233.0, "通用", "长周期" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat1, "PROD_1", 666.0, "PROD_1_DESC" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat1, "PROD_2", 777.0, "PROD_2_DESC" );
    mat2 := MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 2, "手机事业部", "MAT_2", "MAT_2", "TYPE_2", 233.0, "专用", "长周期" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat2, "PROD_1", 1666.0, "PROD_1_DESC" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat2, "PROD_2", 1777.0, "PROD_2_DESC" );
    MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 3, "手机事业部", "MAT_3", "MAT_3", "TYPE_1", 233.0, "通用", "短周期" );
    MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 4, "手机事业部", "MAT_4", "MAT_4", "TYPE_2", 233.0, "专用", "短周期" );
    
    
    // yypsybs Sep-15-2023 (created)
    info( "CapacityAndSaleBudge::InitTestData" )
    this.CapacityAndSaleBudge( relflush );
    for( i := 1; i < 100; i := i + 1 ) {
      row := this.CapacityAndSaleBudge( relnew, 
                                        PlaceOfProductionOfArray := "面板基地" + [String]Number::Random( 1, 10 ), 
                                        BusinessType := "事业部" + [String]Number::Random( 1, 10 ), 
                                        CapacityInPCSInMonth1 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth2 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth3 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth4 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth5 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth6 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth7 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth8 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth9 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth10 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth11 := Number::Random( 1, 10000 ),  
                                        CapacityInPCSInMonth12 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth1 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth2 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth3 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth4 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth5 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth6 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth7 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth8 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth9 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth10 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth11 := Number::Random( 1, 10000 ),  
                                        CapacityInSheetInMonth12 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth1 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth2 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth3 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth4 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth5 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth6 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth7 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth8 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth9 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth10 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth11 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth12 := Number::Random( 1, 10000 ) 
                                      );
      row.CapacityInPCSTotal( row.GetCapacityInPCSInYear() );
      row.CapacityInSheetTotal( row.GetCapacityInSheetInYear() );
      row.SaleAmountTotal( row.GetSaleAmountInYear() );
    }
  *]
}