lazhen
2024-08-22 8048c493c1d923176351080ee697d5c9d1c640a6
_Main/BL/Type_AssemblyOnlinePlanPush/StaticMethod_GenerateData.qbl
@@ -32,16 +32,24 @@
                                                                 , 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 );
    //}
    traverse( macroplan, AssemblyOnlinePlanColumn, column ){
      traverse( column, AssemblyOnlinePlanCell, cell, cell.Value() <> '' and cell.AssemblyOnlinePlanRow().RowNr() = '1' ){
        quantityrow        := cell.AssemblyOnlinePlanRow();
        ordercell          := selectobject( column, AssemblyOnlinePlanCell, ocell, ocell.AssemblyOnlinePlanRow().ProductID() = quantityrow.ProductID()
                                            and ocell.AssemblyOnlinePlanRow().ProductionLine() = quantityrow.ProductionLine()
                                            and ocell.AssemblyOnlinePlanRow().RowNr() = '2' );
        cd                  :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product           := quantityrow.ProductID()
                                                                           , PlanningDate            := column.ColumnDate()
                                                                           , PlanningQty             := [Number]cell.Value()
                                                                           , Sequence                := ordercell.Value()
                                                                           , VersionName             := macroplan.ScenarioName()
                                                                           , InterfaceTime           := nowdate
                                                                           , VersionFlag             := versionflag
                                                                           );
        loginfo.AssemblyOnlinePlanPPPSPush( relinsert, cd );
      }
    }
    loginfo.TotalRow( loginfo.AssemblyOnlinePlanPPPSPush( relsize ) );
  *]
}