lazhen
2024-08-23 c387abc9e569157fdd976b350ec4a3b78a9e87cb
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
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  InterfaceDataset owner,
  String werk,
  const MacroPlan macroplan,
  Date startdate,
  Date enddate
)
{
  TextBody:
  [*
    // 甄兰鸽 Aug-23-2024 (created)
    owner.AOnlineAndMOfflinePlanPIR( relflush );
    pir                    := owner.AOnlineAndMOfflinePlanPIR( relnew, Werk := werk, Version := macroplan.ScenarioName(), StartDate := startdate, EndDate := enddate );
    totalrows              := 0;
    traverse( macroplan, AssemblyOnlinePlanColumn, column ){
      traverse( column, AssemblyOnlinePlanCell, cell, cell.Value() <> '' and cell.AssemblyOnlinePlanRow().RowNr() = '1' ){
        quantityrow        := cell.AssemblyOnlinePlanRow();
    
        pir.PIRData( relnew, Product           := quantityrow.ProductID()
                                           , PlanningDate            := column.ColumnDate()
                                           , PlanningQty             := [Number]cell.Value());
      }
    }
    totalrows              := totalrows + pir.PIRData( relsize );
    
    //traverse( macroplan, OfflinePlanTable
  *]
}