lihongji
2024-11-14 a746b44994e729613737baa922796383027fc54c
_Main/BL/Type_AssemblyOnlinePlanPush/StaticMethod_GenerateData.qbl
@@ -3,6 +3,8 @@
StaticMethod GenerateData (
  InterfaceDataset interfaceDataset,
  const MacroPlan macroplan,
  Boolean iscc,
  Boolean isdl,
  String executor
)
{
@@ -30,18 +32,20 @@
      traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() ){
        traverse( column, Cell, cell ){
          row              := cell.Row();
          cd               :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product            := row.ProductID()
                                                                           , PlanningDate            := column.StartDate()
                                                                           , PlanningQty             := [Number]cell.Quantity()
                                                                           , Sequence                := cell.Order()
                                                                           , VersionName             := macroplan.ScenarioName()
                                                                           , InterfaceTime           := nowdate
                                                                           , FactoryName             := row.Unit()
                                                                          , Fac                     := ifexpr( row.Unit() = FinancialProductionReport::GetDefaultCCUnit(), 'CC', 'DL' )
    //                                                                       , VersionFlag             := versionflag
                                                                           , ProductFourCode         := ifexpr( row.ProductID() = row.Name(), '', row.Name() )
                                                                           );
        loginfo.AssemblyOnlinePlanPPPSPush( relinsert, cd );
          if( ( iscc and row.Unit() = FinancialProductionReport::GetDefaultCCUnit() ) or ( isdl and row.Unit() = FinancialProductionReport::GetDefaultDLUnit() ) ){
            cd               :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product            := row.ProductID()
                                                                             , PlanningDate            := column.StartDate()
                                                                             , PlanningQty             := [Number]cell.Quantity()
                                                                             , Sequence                := cell.Order()
                                                                             , VersionName             := macroplan.ScenarioName()
                                                                             , InterfaceTime           := nowdate
                                                                             , FactoryName             := row.Unit()
                                                                            , Fac                     := ifexpr( row.Unit() = FinancialProductionReport::GetDefaultCCUnit(), 'CC', 'DL' )
      //                                                                       , VersionFlag             := versionflag
                                                                             , ProductFourCode         := ifexpr( row.ProductID() = row.Name(), '', row.Name() )
                                                                             );
            loginfo.AssemblyOnlinePlanPPPSPush( relinsert, cd );
          }
        }
      }
    }