lazhen
2024-08-21 94a0c562d8feff3c5c2e53ab722a86d21efe9d6e
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
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  const MacroPlan macroplan,
  InterfaceDataset interfaceDataset,
  String executor,
  Boolean versionflag
)
{
  Description: '生成可以下发的客户需求(PPA+IDS)数据'
  TextBody:
  [*
    // 甄兰鸽 Aug-20-2024 (created)
    cdlast                 := maxobject( interfaceDataset, AssemblyOnlinePlanPPPSPush, cd, cd.InterfaceTime(), cd.PlanningDate(), cd.Product() );
    if( not isnull( cdlast ) ){
      loginfo              := cdlast.InterfaceLoginfo();
      if( not loginfo.IsShow() ){
        loginfo.Delete();
      }else{
        loginfo.Last( false );
      }
      interfaceDataset.AssemblyOnlinePlanPPPSPush( relflush );
    }
    nowdate                := DateTime::ActualTime();
    loginfo                := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor
                                                                 , Name := Translations::InterfaceDataset_AssemblyOnlinePlanPPPSPush_Name()
                                                                 , InterfaceDateTime := nowdate
                                                                 , Message := '装配上线计划-PPPS传输至数据中台(包含排序)/SAP(不包含排序)'
                                                                 , IsShow := false
                                                                 , Last := true
                                                                 , ReturnSuccess := true
                                                                 , ReturnMsg := 'Success'
                                                                 , Success := true
                                                                  );
    //traverse( macroplan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, cell ){
    //  cd                  :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product           := forecast.ProductID()
    //                                                                     , PlanningDate            := forecast.StartDate()
    //                                                                     , DemandQty               := [Number]forecast.Quantity()
    //                                                                     , VersionName             := macroplan.ScenarioName()
    //                                                                     , InterfaceTime           := nowdate
    //                                                                     , VersionFlag             := versionflag
    //                                                                     );
    //  loginfo.CustomerDemandPPAIDS( relinsert, cd );
    //}
    loginfo.TotalRow( loginfo.AssemblyOnlinePlanPPPSPush( relsize ) );
  *]
}