lazhen
2024-11-07 dbcd0cd071f45285dc1fc134477536fd125a4fcf
计划库存存档报表显示bug
已添加5个文件
已修改8个文件
172 ■■■■ 文件已修改
_Main/BL/Type_InventoryPlanArchiveVersion/Method_Clear.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryPlanArchiveVersion/Method_Generate.qbl 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryPlanArchiveVersion/Method_GenerateColumn.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryPlanArchiveVersion/StaticMethod_GenerateData.qbl 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryPlanArchiveVersion/StaticMethod_InitiateSearch.qbl 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_MatrixEditorTable#791.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_PanelHeader#503.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_PanelOperation#414.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_PanelTable#881.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Response_OnCreated.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Response_PanelOperation_414_ButtonSearch_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/_ROOT_Component_FormInventoryPlanArchive.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryPlanArchiveVersion/Method_Clear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
Method Clear (
  Dates periods
)
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    this.Column( relflush );
    this.Row( relflush );
    this.GenerateColumn( periods, true );
  *]
}
_Main/BL/Type_InventoryPlanArchiveVersion/Method_Generate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
Quintiq file version 2.0
#parent: #root
Method Generate (
  InventoryPlanArchiveVersionSearch search
)
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    info( '-----------Search start-------' );
    table                   := selectobject( this,InterfaceDataset.InventoryPlanArchiveVersion, report, not report.IsShow() );
    //清空之前存储的显示数据
    aopcolumns              := selectuniquevalues(  table, Column, aopcolumn, aopcolumn.TimeUnit() = search.TimeUnit() and aopcolumn.StartDate() >= search.StartDate() and aopcolumn.StartDate() <= search.EndDate(), aopcolumn.StartDate() );
    this.Clear( aopcolumns );
    traverse( table, Row, row, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Unit() = search.Unit() )
              and ( search.Product() = FinancialProductionReport::GetDefaultAllUnit() or search.Product() = row.Name() )){
      showrow               := selectobject( this, Row, showrow, showrow.Name() = row.Name() and showrow.Unit() = search.Unit() );
      if( isnull( showrow ) ){
        showrow             := this.Row( relnew, Name := row.Name(), ProductID := row.ProductID(), Unit := search.Unit() );
      }
      traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
        column              := selectobject( this, Column, column, column.Name() = cell.Column().Name() );
        if( not isnull( column ) ){
          showcell          := selectobject( showrow, Cell, showcell, showcell.Column() = column );
          if( isnull( showcell ) ){
            showcell        := showrow.Cell( relnew, PlanQuantity := 0, ActualQuantity := 0 );
            column.Cell( relinsert, showcell );
          }
          showcell.PlanQuantity( cell.PlanQuantity() + showcell.PlanQuantity() );
          showcell.ActualQuantity( cell.ActualQuantity() + showcell.ActualQuantity() );
        }
      }
    }
    info( '-----------Search end-------' );
  *]
}
_Main/BL/Type_InventoryPlanArchiveVersion/Method_GenerateColumn.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
Method GenerateColumn (
  Dates periods
  Dates periods,
  Boolean isshow
)
{
  Description: '生成日期列'
_Main/BL/Type_InventoryPlanArchiveVersion/StaticMethod_GenerateData.qbl
@@ -12,18 +12,18 @@
    info( '-------------------------Start---------------------');
    allunit                := AssemblyOnlinePlanVersion::GetDefaultAllUnit();
    name                   := InventoryPlanArchiveVersion::GetDefaultName();
    interfaceDataset.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
    search                 := interfaceDataset.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
    table                  := selectobject( interfaceDataset, InventoryPlanArchiveVersion, version, not version.IsShow() );
    if( isnull( table ) ){
      table                := interfaceDataset.InventoryPlanArchiveVersion( relnew, ID := name, Name := name );
    }
    //showtable              := selectobject( interfaceDataset, InventoryPlanArchiveVersion, version, version.IsShow() );
    //if( isnull( table ) ){
    //  showtable               := interfaceDataset.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true );
    //}
    showtable              := selectobject( interfaceDataset, InventoryPlanArchiveVersion, version, version.IsShow() );
    if( isnull( table ) ){
      showtable               := interfaceDataset.InventoryPlanArchiveVersion( relnew, ID := name, Name := name, IsShow := true );
    }
    periods                := selectuniquevalues(  macroPlan, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day()
                                                   and not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = period.StartDate() ), period.StartDate() );
    table.GenerateColumn( periods );
    table.GenerateColumn( periods, false );
    actinventorytree       := NamedValueTree::Create();
    inventoryqrys          := construct( Reals );
    inventoryindex         := 0;
@@ -68,5 +68,6 @@
    }
    
    info( '-------------------------End---------------------');
    showtable.Generate( search );
  *]
}
_Main/BL/Type_InventoryPlanArchiveVersion/StaticMethod_InitiateSearch.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
Quintiq file version 2.0
#parent: #root
StaticMethod InitiateSearch (
  InterfaceDataset owner
) as InventoryPlanArchiveVersion
{
  TextBody:
  [*
    // ç”„兰鸽 Sep-29-2024 (created)
    allunit                   := FinancialProductionReport::GetDefaultAllUnit();
    search                    := owner.InventoryPlanArchiveVersionSearch();
    if( isnull( owner.InventoryPlanArchiveVersionSearch() ) ){
      search                  := owner.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
    }else{
      search                  := owner.InventoryPlanArchiveVersionSearch();
      search.Product( allunit );
      search.TimeUnit(  Translations::MP_GlobalParameters_Day() );
      search.Unit( allunit );
      search.StartDate( Date::MinDate() );
      search.EndDate( Date::MaxDate() );
    }
    table                     := selectobject( owner, InventoryPlanArchiveVersion, table, table.IsShow() );
    if( not isnull( table ) ){
      table.Generate( search);
    }
    return table;
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
@@ -14,7 +14,7 @@
      CustomerDemandPPAIDS::GenerateData( InterfaceDataset, MacroPlan, currentuser );
    }
    if( efInterfacename.Text() = Translations::InterfaceDataset_AssemblyOnlinePlanPPPSPush_Name()){//装配上线
      AssemblyOnlinePlanPPPSPush::GenerateData( MacroPlan, InterfaceDataset, currentuser, isactive );
      AssemblyOnlinePlanPPPSPush::GenerateData( InterfaceDataset, MacroPlan, currentuser );
    }
    
    WebMessageBox::Success( "推送成功!" );
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_MatrixEditorTable#791.def
@@ -17,12 +17,10 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'InterfaceDataset'
            FilterArguments: 'search:QMacroPlanner::FormAssemblyOnlinePlanVersion.dhSearch'
            FixedFilter: 'object.Column().TimeUnit() = search.TimeUnit() and object.Column().StartDate() >= search.StartDate() and object.Column().StartDate() <= search.EndDate()'
            Source: 'InterfaceDataset'
            DataType: 'InventoryPlanArchiveVersion'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'InventoryPlanArchiveVersion.Row.Cell'
            Transformation: 'Row.Cell'
          ]
        }
      ]
@@ -46,10 +44,10 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'InterfaceDataset'
            Source: 'InterfaceDataset'
            DataType: 'InventoryPlanArchiveVersion'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'InventoryPlanArchiveVersion.Row'
            Transformation: 'Row'
          ]
        }
      ]
@@ -72,12 +70,10 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'InterfaceDataset'
            FilterArguments: 'search:QMacroPlanner::FormAssemblyOnlinePlanVersion.dhSearch'
            FixedFilter: 'object.TimeUnit() = search.TimeUnit() and  ( search.StartDate().IsMinInfinity() or object.StartDate() >= search.StartDate() )  and ( search.EndDate().IsMaxInfinity() or object.StartDate() <= search.EndDate() )'
            Source: 'InterfaceDataset'
            DataType: 'InventoryPlanArchiveVersion'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'InventoryPlanArchiveVersion.Column'
            Transformation: 'Column'
          ]
        }
      ]
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_PanelHeader#503.def
@@ -15,6 +15,6 @@
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 1
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_PanelOperation#414.def
@@ -19,6 +19,5 @@
  Properties:
  [
    Taborder: 4
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Component_PanelTable#881.def
@@ -9,6 +9,6 @@
  ]
  Properties:
  [
    Taborder: 2
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Response_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_FormInventoryPlanArchive_OnCreated
{
  #keys: '[415136.0.1285201938]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      table := InventoryPlanArchiveVersion::InitiateSearch( InterfaceDataset );
      DataHolderTable.Data( table );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/Response_PanelOperation_414_ButtonSearch_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: PanelOperation_414/ButtonSearch
Response OnClick () id:Response_PanelOperation_414_ButtonSearch_OnClick
{
  #keys: '[415136.0.1285202243]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      if( not isnull( DataHolderTable.Data() ) ){
        DataHolderTable.Data().Generate( dhSearch.Data() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormInventoryPlanArchive/_ROOT_Component_FormInventoryPlanArchive.def
@@ -29,11 +29,21 @@
      ]
      Properties:
      [
        Taborder: 0
        Taborder: 1
      ]
    }
    #child: PanelHeader_503
    #child: PanelTable_881
    Component DataHolderTable
    {
      #keys: '[415136.0.1285202011]'
      BaseType: 'WebDataHolder'
      Databinding: 'InventoryPlanArchiveVersion'
      Properties:
      [
        Taborder: 0
      ]
    }
  ]
  Properties:
  [