lazhen
2024-08-30 ffaf414878991048ab4bc55d9bab172a9eb853ae
前端界面调用生成库存报表接口数据
已修改5个文件
已添加1个文件
71 ■■■■ 文件已修改
_Main/BL/Type_InterfaceInventoryReport/StaticMethod_GenerateData.qbl 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnCl.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceInventoryReport/StaticMethod_GenerateData.qbl
@@ -9,36 +9,49 @@
  TextBody:
  [*
    // ç”„兰鸽 Aug-30-2024 (created)
    loginfo                := maxobject(  interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name(), loginfo.InterfaceDateTime() );
    loginfo                := maxobject(  interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_InventoryReport_Name(), loginfo.InterfaceDateTime() );
    if( not isnull( loginfo ) ){
      if( not loginfo.IsShow() ){
        loginfo.Delete();
      }else{
        loginfo.Last( false );
      }
      interfaceDataset.CustomerDemandPPAIDS( relflush );
      interfaceDataset.InventoryReport( relflush );
    }
    nowdate                := DateTime::ActualTime();
    loginfo                := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser         := executor
                                                                 , Name                      := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name()
                                                                 , Name                      := Translations::InterfaceDataset_InventoryReport_Name()
                                                                 , InterfaceDateTime         := nowdate
                                                                 , Message                   := '客户需求(PPA+IDS)数据推送'
                                                                 , Message                   := '库存报表- æ•°æ®ä¸­å°'
                                                                 , Last                      := true
                                                                 , IsShow                    := false
                                                                 , ReturnSuccess             := true
                                                                 , ReturnMsg                 := 'Success'
                                                                 , Success                   := true
                                                                  );
    traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){
      cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := forecast.ProductID()
                                                                   , DemandDate              := forecast.StartDate()
                                                                   , DemandQty               := [Number]forecast.Quantity()
    traverse( macroplan, InventorySummarySource.InventorySummaryReport, report, not report.IsShow() ){
      traverse( report,InventroySummaryRow, row ){
        product           := selectobject( macroplan, Product_MP, product, product.ID() = row.Name() );
        traverse( row, InventorySummaryCell, cell ){
          column          := cell.InventorySummaryColumn();
          inventory       :=interfaceDataset.InventoryReport( relnew, Category          := column.TimeUnit()
                                                              , Generation              := product.Generation()
                                                              , MLBMQB                  := product.MQBMLB()
                                                              , Power                   := product.Power()
                                                              , Product                 := product.ID()
                                                              , InventoryDate           := column.Period()
                                                              , InventoryEndQty         := cell.EndingInventory()
                                                              , InventoryMinQty         := cell.MinimumInventory()
                                                              , InventoryMaxQty         := cell.MaximumInventory()
                                                              , InventoryAveQty         := cell.AverageInventory()
                                                              , FactoryName             := row.Unit()
                                                                   , VersionName             := macroplan.ScenarioName()
                                                                   , InterfaceTime           := nowdate
                                                                   , VersionFlag             := versionflag
                                                                   );
      loginfo.CustomerDemandPPAIDS( relinsert, cd );
          loginfo.InventoryReport( relinsert, inventory );
    }
    loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
      }
    }
    loginfo.TotalRow( loginfo.InventoryReport( relsize ) );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -113,6 +113,17 @@
        Title: '装配上线计划+机加下线计划-MS64'
      ]
    }
    Component MenuInterfaceInventoryReport
    {
      #keys: '[415136.0.1097611829]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'WAREHOUSE'
        Taborder: 10
        Title: 'Inventory report'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnCl.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ContextMenuInterface/MenuInterfaceInventoryReport
Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnClick
{
  #keys: '[415136.0.1097612114]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMenu_OnClick'
  QuillAction
  {
    Body:
    [*
      currentuser     := QuintiqUser::CurrentUser().DisplayName();
      InterfaceInventoryReport::GenerateData( MacroPlan, InterfaceDataset, currentuser );
      WebMessageBox::Success( "推送成功!" );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
@@ -17,7 +17,7 @@
      AssemblyOnlinePlanPPPSPush::GenerateData( MacroPlan, InterfaceDataset, currentuser, isactive );
    }
    
    WebMessageBox::Success( "推送成功!" );
    Form.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def
@@ -18,7 +18,7 @@
    currentuser     := QuintiqUser::CurrentUser().DisplayName();
    
    AOnlineAndMOfflinePlanMS64::GenerateData( InterfaceDataset, ddslFactory.Text(), dsStartDate.Date(), dsEndDate.Date(), efVersionFrom.Text(), efVersionTo.Text(), cbActiveVersion.Checked(), dhProducts.Data(), currentuser );
    WebMessageBox::Success( "推送成功!" );
    Form.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
@@ -11,7 +11,7 @@
    handle          := mdsinstance.GetMDSHandle()
    macroplan       := handle.AsMacroPlan();
    AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), macroplan, dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() );
    WebMessageBox::Success( "推送成功!" );
    Form.Close();
  *]
}