lazhen
2024-06-25 3ad92186b00a2ab5d9f7834c06ed552d8fd23879
财务产量报表(没有合计)
已添加10个文件
已修改16个文件
已删除2个文件
255 ■■■■■ 文件已修改
_Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultAllUnit.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCUnit.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLUnit.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultName.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSearch/Attribute_Generation.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSearch/Attribute_MqbMlb.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSearch/Attribute_Power.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSearch/Attribute_Unit.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSearch/_ROOT_Type_FinancialProductionSearch.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Method_filter.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_dhUnit_OnCreated.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation FinancialProductionSearch_FinancialProductionSource_FinancialProductionSource_FinancialProductionSearch
{
  #keys: '1[415136.0.854770948]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide FinancialProductionSource
  {
    #keys: '3[415136.0.854770950][415136.0.854770949][415136.0.854770951]'
    Cardinality: '0to1'
    ObjectDefinition: FinancialProductionSearch
    OwningSide: 'Reference'
  }
  RelationSide.RightSide FinancialProductionSearch
  {
    #keys: '3[415136.0.854770953][415136.0.854770952][415136.0.854770954]'
    Cardinality: '0to1'
    ObjectDefinition: FinancialProductionSource
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultAllUnit.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetDefaultAllUnit () const declarative as String
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    return '<All>';
  *]
}
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCUnit.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetDefaultCCUnit () const as String
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    return 'Assembly Plant (France)';
  *]
}
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLUnit.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetDefaultDLUnit () const as String
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    return 'Assembly Plant (Spain)';
  *]
}
_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetDefaultName () const as String
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    return 'Financial productions';
  *]
}
_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl
@@ -1,22 +1,22 @@
Quintiq file version 2.0
#parent: #root
Method Filter (
  Product_MPs products,
  String unit,
  String generation,
  String mqbmlb,
  String power
  FinancialProductionSearch search,
  Product_MPs products
) declarative remote as Boolean
{
  Description: '过滤'
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    //productids := selectuniquevalues( products, Elements, product, ( generation = '<All>' or product.Generation() = generation ) and
    //                                  ( mqbmlb = '<All>' or product.MQBMLB() = mqbmlb ) and
    //                                  ( power = '<All>' or product.Power() = power ), product.ID() );
    //productid := construct( Strings );
    //productid.Add( this.Name() );
    //return productids.ContainsAll( productid ) and this.Unit() = unit;
    return this.Name() = '92 kW Stator' and this.Unit() = '<All>';
    allunit    := '<All>';
    productids := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() )
                                      and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() )
                                      and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() );
    productid  := construct( Strings );
    productid.Add( this.Name() );
    return productids.ContainsAll( productid ) and this.Unit() = search.Unit();
  *]
}
_Main/BL/Type_FinancialProductionSearch/Attribute_Generation.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Generation
{
  #keys: '3[415136.0.854770962][415136.0.854770961][415136.0.854770963]'
  ValueType: String
}
_Main/BL/Type_FinancialProductionSearch/Attribute_MqbMlb.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute MqbMlb
{
  #keys: '3[415136.0.854770972][415136.0.854770971][415136.0.854770973]'
  ValueType: String
}
_Main/BL/Type_FinancialProductionSearch/Attribute_Power.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Power
{
  #keys: '3[415136.0.854770982][415136.0.854770981][415136.0.854770983]'
  ValueType: String
}
_Main/BL/Type_FinancialProductionSearch/Attribute_Unit.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Unit
{
  #keys: '3[415136.0.854770939][415136.0.854770938][415136.0.854770940]'
  Description: '产线'
  ValueType: String
}
_Main/BL/Type_FinancialProductionSearch/_ROOT_Type_FinancialProductionSearch.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type FinancialProductionSearch
{
  #keys: '5[415136.0.854770935][415136.0.854770933][0.0.0][415136.0.854770934][415136.0.854770936]'
  BaseType: Object
  Description: '查询类'
  StructuredName: 'FinancialProductionSearchs'
}
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -5,6 +5,7 @@
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    allunit := FinancialProductionReport::GetDefaultAllUnit();
    table := selectobject( this.MacroPlan(), FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
    //info( '--------------------------', table.Name() );
    traverse( this, FinancialProductionReport, report ){
@@ -16,7 +17,7 @@
        unit    := selectobject( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() = unitcolumn );
        
        unitrow := selectobject( table, FinancialProductionRow, unitrow, unitrow.Name() = product.Value() and unitrow.Unit() = unit.Value() );
        allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = '<All>' );
        allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
        
        traverse( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and product.Value() = '120 kW Rotor' and unit.Value() = 'Assembly Plant (Spain)' ){
          column   := cell.FinancialProductionColumn();
_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
@@ -9,6 +9,7 @@
  TextBody:
  [*
    startofplanning := macroPlan.StartOfPlanning().Date();
    allunit         := FinancialProductionReport::GetDefaultAllUnit();
    table := selectobject( macroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
    
    xmlDOMI := XMLDOMImplementation::Create();
@@ -43,7 +44,7 @@
      columnelement.AppendChild( nameelement );
      columnelement.AppendChild( typeelement );
      
      cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().Unit() <> '<All>', cell.FinancialProductionRow().Name() );
      cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().Unit() <> allunit, cell.FinancialProductionRow().Name() );
    
      traverse ( cells, Elements, c ) {
        if( column.Index() = 0 ){
@@ -72,7 +73,7 @@
    
    //info( xmlString );
    
    tableGroupHandle := TableGroupHandle::Create( "Financial productions" );
    tableGroupHandle := TableGroupHandle::Create( FinancialProductionReport::GetDefaultName() );
    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
    tableGroupHandle.Add( tableHandle );
    
_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl
@@ -29,7 +29,7 @@
    
    //info( xmlString );
    
    tableGroupHandle := TableGroupHandle::Create( "Financial productions" );
    tableGroupHandle := TableGroupHandle::Create( FinancialProductionReport::GetDefaultName() );
    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
    tableGroupHandle.Add( tableHandle );
    
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -8,32 +8,31 @@
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    owner.FinancialProductionSource( relflush );
    ccunit                    := 'Assembly Plant (France)';
    dlunit                    := 'Assembly Plant (Spain)';
    source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := 'Financial productions' );
    ccunit                    := FinancialProductionReport::GetDefaultCCUnit();
    dlunit                    := FinancialProductionReport::GetDefaultDLUnit();
    allunit                   := FinancialProductionReport::GetDefaultAllUnit();
    source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() );
    table                     := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
    startofplanning           := owner.StartOfPlanning();
    startofnextmonth          := owner.StartOfPlanning().StartOfNextMonth();
    startofyear               := startofplanning.StartOfYear();
    startofnextyear           := startofplanning.StartOfNextYear();
    info( ccunit, dlunit, source.Name(), table.Name(), startofplanning );
    //unitids := selectuniquevalues( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.StockingPoint_MP().UnitID() );
    //traverse( unitids, Elements, e ){
    //  info( e );
    //}
    source.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
    traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){
      unit := pisp.StockingPoint_MP().UnitID();
      info( unit, pisp.ProductID() );
      ccrow := null( FinancialProductionRow );
      dlrow := null( FinancialProductionRow );
      allrow := selectobject( table, FinancialProductionRow, row, row.Name() = pisp.ProductID() and row.Unit() = '<All>' );
      allrow := selectobject( table, FinancialProductionRow, row, row.Name() = pisp.ProductID() and row.Unit() = allunit );
      if( unit = ccunit ){
        ccrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit );
      }else{
        dlrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit );
      }
      if( isnull( allrow ) ){
        allrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := '<All>' );
        allrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := allunit );
      }
      
      for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
@@ -52,7 +51,7 @@
          dlrow.Initialize( column, dlunit );
        }
        if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){
          allrow.Initialize( column, '<All>' );
          allrow.Initialize( column, allunit );
        }
      }
      
@@ -70,9 +69,7 @@
        if( not isnull( dlrow ) ){
          dlrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
        }
        if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){
          allrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
        }
      }
    }
  *]
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def
@@ -45,8 +45,8 @@
          Properties:
          [
            DataType: 'FinancialProductionReport'
            Description: 'productids.FindString( object.Name(), 0 ) >= 0 and object.Unit() = unit'
            FilterArguments: 'unit:QMacroPlanner::FormFinancialProductionReport.dhUnit;productids:QMacroPlanner::FormFinancialProductionReport.dhProductIDs'
            FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderProduct;search:QMacroPlanner::FormFinancialProductionReport.dhSearch'
            FixedFilter: 'object.Filter( search, products )'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'FinancialProductionRow'
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def
@@ -15,16 +15,6 @@
        Taborder: 0
      ]
    }
    Component dhGeneration
    {
      #keys: '[415136.0.840791740]'
      BaseType: 'WebDataHolder'
      Databinding: 'String'
      Properties:
      [
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def
@@ -15,16 +15,6 @@
        Taborder: 0
      ]
    }
    Component dhMQBMLB
    {
      #keys: '[415136.0.842090347]'
      BaseType: 'WebDataHolder'
      Databinding: 'String'
      Properties:
      [
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def
@@ -15,16 +15,6 @@
        Taborder: 0
      ]
    }
    Component dhPower
    {
      #keys: '[415136.0.842090452]'
      BaseType: 'WebDataHolder'
      Databinding: 'String'
      Properties:
      [
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def
@@ -15,16 +15,6 @@
        Taborder: 0
      ]
    }
    Component dhUnit
    {
      #keys: '[415136.0.840791605]'
      BaseType: 'WebDataHolder'
      Databinding: 'String'
      Properties:
      [
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Method_filter.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
@@ -10,13 +10,15 @@
    Body:
    [*
      //初始化
      if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){
      //if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){
        FinancialProductionSource::Initialize( MacroPlan );
      }
      //}
      //info( '------------------1----------------' );
      table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
      //info( '------------------2----------------' );
      DataHolderTable.Data( table );
      dhSearch.Data( table.FinancialProductionSource().FinancialProductionSearch() );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      Form.filter();
      dhSearch.Data().Generation( selection );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      Form.filter();
      dhSearch.Data().MqbMlb( selection );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      Form.filter();
      dhSearch.Data().Power( selection );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      dhUnit.Data( selection );
      dhSearch.Data().Unit( selection );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_dhUnit_OnCreated.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def
@@ -19,11 +19,11 @@
        Taborder: 0
      ]
    }
    Component dhProductIDs
    Component dhSearch
    {
      #keys: '[415136.0.849431513]'
      BaseType: 'WebDataHolder'
      Databinding: 'String'
      Databinding: 'FinancialProductionSearch'
      Properties:
      [
        Taborder: 1