yanweiyuan3
2023-10-27 d1d15b61dfcf7fd0f800b32359f082cf580ed556
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
Quintiq file version 2.0
#parent: #root
Method ExportTo3DDriveOrExcel () id:Method_DialogExport_ExportTo3DDriveOrExcel
{
  #keys: '[136682.0.2054585580]'
  Body:
  [*
    binaryvalues := construct( BinaryValues);
    brokernames := construct( Strings );
    smbinaryvalues := construct( BinaryValues );
    smbrokernames := construct( Strings );
    userimportprofilevalues := construct( BinaryValues );
    userimportprofilebrokers := construct( Strings );
    filepath := EditFieldExcelPath.Text();
    
    isbinaryexport := true ;
    is3DDrive := RadioButtonGroupSource.BoundValue() = MPSyncUtility::ID_Source_3DDrive();
    
    MacroPlan.Export( Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_SupplyChainParameters() ),   // general
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_GlobalParameters() ),        // globalparameters
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Periods() ),                 // periods
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_InventorySpecifications() ), // inventoryspecifications
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_InventorySupplies() ),       // inventorysupplies
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Products() ),                // products
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Recipes() ),                 // recipes
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Forecast() ),             // salesdemands
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_ServiceLevels() ),           // servicelevels
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Campaigns() ),               // campaigns and transitions
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Entities() ),                // entities
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Costs() ),                   // entitiescosts
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Lanes() ),                   // lanes
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Routings() ),                // routings
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Capacities() ),              // stockingpointcapacities and unitcapacities
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_SupplySpecifications() ),    // supplyspecifications
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Actuals() ),                 // actuals pispip and actual unit periods
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Feedback() ),                // feedbacks
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_OptimizerPuzzle() ),         // optimizer puzzles
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_PostponementSpecAndFulfillmentRestriction() ), // Postponement spec and fulfillment restriction
                       Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_CustomerOrder() ), // Customer order
                       isbinaryexport, //isbinaryexport
                       is3DDrive,
                       DataHolderDirectoryFileItem.Data(),
                       binaryvalues,
                       brokernames );  
       
    ScenarioManager.Export( Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Strategies() ), 
                                Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Accounts() ), 
                                Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_Bookmarks() ), 
                                Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_KPISetting() ),  
                                isbinaryexport, is3DDrive, DataHolderDirectoryFileItem.Data(), 
                                smbinaryvalues, smbrokernames );
    
     MPSync.Export( Form.GetIsIncluded( MPSyncUtility::ID_ObjectGroup_ImportProfiles() ),
                                        is3DDrive, DataHolderDirectoryFileItem.Data(),
                                        userimportprofilevalues, userimportprofilebrokers );
    
    if ( not ( is3DDrive ) )
    {
      Form.ExportExcel( brokernames, binaryvalues , filepath ); //MacroPlan
      Form.ExportExcel( smbrokernames, smbinaryvalues , filepath ); //Scenario manager
      Form.ExportExcel( userimportprofilebrokers, userimportprofilevalues , filepath ); //MPSync
      
    }
  *]
}