rislai
2024-06-25 13c4f4920ece7b0060ec51e2510acf98f28abe90
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已添加28个文件
已修改11个文件
已删除1个文件
647 ■■■■■ 文件已修改
_Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/Attribute_IsImport.qbl 2 ●●● 补丁 | 查看 | 原始文档 | 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/Attribute_Unit.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionRow/Method_Initialize#110.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionRow/Method_Initialize.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | 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/Attribute_IsImport.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/Method_Filter.qbl 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/Method_ReadStructure.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Upload.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelFinancialProductionReportHeader.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelFinancialProductionReportTable.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelTable.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_matrixEditorActionBarPageTable.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_matrixeditorContextMenuTable.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_ButtonExport_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelFinancialProductionReportOperation_ButtonProductionExport_OnCl.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelFinancialProductionReportOperation_ButtonProductionImport_OnCl.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnCreated.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def 22 ●●●●● 补丁 | 查看 | 原始文档 | 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/Attribute_IsImport.qbl
@@ -2,6 +2,6 @@
#parent: #root
Attribute IsImport
{
  #keys: '3[415136.0.834715063][415136.0.834715062][415136.0.834715064]'
  #keys: '3[415136.0.842718583][415136.0.842718582][415136.0.842718584]'
  ValueType: Boolean
}
_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/Attribute_Unit.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Unit
{
  #keys: '3[415136.0.842400951][415136.0.842400950][415136.0.842400952]'
  Description: '产线'
  ValueType: String
}
_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
Method Filter (
  FinancialProductionSearch search,
  Product_MPs products
) declarative remote as Boolean
{
  Description: '过滤'
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    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_FinancialProductionRow/Method_Initialize#110.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
Method Initialize (
  FinancialProductionColumn column,
  String unit
)
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    cell := column.FinancialProductionCell( relnew, Value := '' );
    this.FinancialProductionCell( relinsert, cell );
  *]
}
_Main/BL/Type_FinancialProductionRow/Method_Initialize.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: #root
Method Initialize (
  FinancialProductionColumn column,
  Real quantity
)
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    cell := selectobject( this, FinancialProductionCell, cell, cell.FinancialProductionColumn() = column );
    value := [Real]cell.Value() + quantity;
    cell.Value( [String]value );
  *]
}
_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/Attribute_IsImport.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute IsImport
{
  #keys: '3[415136.0.842718587][415136.0.842718586][415136.0.842718588]'
  ValueType: Boolean
}
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
Quintiq file version 2.0
#parent: #root
Method AfterImport
{
  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 ){
      productcolumn := selectobject( report, FinancialProductionColumn, column, column.Name() = 'Product' );
      unitcolumn    := selectobject( report, FinancialProductionColumn, column, column.Name() = 'Unit' );
      traverse( report, FinancialProductionRow, row ){
        product := selectobject( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() = productcolumn );
        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() = 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();
          unitcell := selectobject( unitrow, FinancialProductionCell, unitcell, unitcell.FinancialProductionColumn().Name() = column.Name() );
          allcell  := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn().Name() = column.Name() );
          info( isnull( unitcell ), isnull( allcell ), cell.Value(), unitcell.Value(), allcell.Value() );
          if( not isnull( unitcell ) ){
            unitcell.Value( cell.Value() );
          }
          if( not isnull( allcell ) ){
            value := [Real]cell.Value() + [Real]allcell.Value();
            allcell.Value( [String]value );
          }
        }
      }
    }
  *]
}
_Main/BL/Type_FinancialProductionSource/Method_Filter.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: #root
Method Filter (
  String productids,
  String unit
) declarative remote
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    info( '------------1-----------', unit, '-', productids );
    traverse( this, FinancialProductionReport.FinancialProductionRow, row, row.Name() = '92 kW Stator' ){
      productid := construct( Strings );
      productid.Add( row.Name() );
      info( '-----------------------', row.Name(), row.Unit(), productids.FindString( row.Name(), 0 ), row.Unit() = unit );
    }
  *]
}
_Main/BL/Type_FinancialProductionSource/Method_ReadStructure.qbl
@@ -20,7 +20,12 @@
      xlstable.SyncRows();
      
      xlstable.Name( sheetName );
      xlstable.IsImport( true );
      this.FinancialProductionReport( relinsert, &xlstable ); 
      Transaction::Transaction().Propagate( attribute( FinancialProductionColumn, Index ) );
    }
    //导入后处理数据
    this.AfterImport();
  *]
}
_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
@@ -1,19 +1,41 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Download (
  MacroPlan macroPlan
  MacroPlan macroPlan,
  Boolean istemplate
) as BinaryValue
{
  Description: '下载财务报表数据'
  TextBody:
  [*
    startofplanning := macroPlan.StartOfPlanning().Date();
    allunit         := FinancialProductionReport::GetDefaultAllUnit();
    table := selectobject( macroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
    
    xmlDOMI := XMLDOMImplementation::Create();
    xmlDOM  := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
    
    tableElement := xmlDOM.GetElementByTagName( "table", 0 );
    //Product
    productcolumnelement := xmlDOM.CreateElement( "column" );
    productnameelement   := xmlDOM.CreateElement( "name" );
    producttypeelement   := xmlDOM.CreateElement( "type" );
    productnameelement.TextContent( 'Product' );
    producttypeelement.TextContent( "String" );
    productcolumnelement.AppendChild( productnameelement );
    productcolumnelement.AppendChild( producttypeelement );
    //Unit
    unitcolumnelement := xmlDOM.CreateElement( "column" );
    unitnameelement   := xmlDOM.CreateElement( "name" );
    unittypeelement   := xmlDOM.CreateElement( "type" );
    unitnameelement.TextContent( 'Unit' );
    unittypeelement.TextContent( "String" );
    unitcolumnelement.AppendChild( unitnameelement );
    unitcolumnelement.AppendChild( unittypeelement );
    
    traverse ( table, FinancialProductionColumn, column ) {
    tableElement.AppendChild( productcolumnelement );
    tableElement.AppendChild( unitcolumnelement );
    traverse ( table, FinancialProductionColumn, column, not istemplate or column.Period() < startofplanning ) {
      columnelement := xmlDOM.CreateElement( "column" );
      nameelement   := xmlDOM.CreateElement( "name" );
      typeelement   := xmlDOM.CreateElement( "type" );
@@ -22,13 +44,28 @@
      columnelement.AppendChild( nameelement );
      columnelement.AppendChild( typeelement );
      
      cells := selectsortedset( column, FinancialProductionCell, cell, true, cell.FinancialProductionRow().RowNr() );
      cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().Unit() <> allunit, cell.FinancialProductionRow().Name() );
      traverse ( cells, Elements, c ) {
        if( column.Index() = 0 ){
          row := c.FinancialProductionRow();
          //Product
          productcellElement := xmlDOM.CreateElement( "cell" );
          productcellElement.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement );
          //Unit
          unitcellElement := xmlDOM.CreateElement( "cell" );
          unitcellElement.SetAttribute( "value", row.Unit() );
          unitcolumnelement.AppendChild( unitcellElement );
        }
        cellElement := xmlDOM.CreateElement( "cell" );
        if( istemplate ){
          cellElement.SetAttribute( "value", '' );
        }else{
        cellElement.SetAttribute( "value", c.Value() );
        }
        columnelement.AppendChild( cellElement );
      }
      tableElement.AppendChild( columnelement );  
    }
    
@@ -36,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
@@ -12,9 +12,9 @@
    tableElement              := xmlDOM.GetElementByTagName( "table", 0 );
    
    startofyear               := macroPlan.StartOfPlanning().StartOfYear();
    startofnextyear           := macroPlan.StartOfPlanning().StartOfNextYear();
    startofplanning           := macroPlan.StartOfPlanning();
    
    for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
    for( start := startofyear; start < startofplanning; start := start.StartOfNextMonth() ){
      columnElement := xmlDOM.CreateElement( "column" );
      nameElement   := xmlDOM.CreateElement( "name" );
      typeElement   := xmlDOM.CreateElement( "type" );
@@ -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
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Initialize (
  MacroPlan owner
)
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    owner.FinancialProductionSource( relflush );
    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();
    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() = 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 := allunit );
      }
      for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
        periodtime := start.Date();
        periodname := periodtime.Format( "M2/D2/Y" );
        column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime );
        if( isnull( column ) ){
          column := table.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime );
        }
        if( not isnull( ccrow ) ){
          ccrow.Initialize( column, ccunit );
        }
        if( not isnull( dlrow ) ){
          dlrow.Initialize( column, dlunit );
        }
        if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){
          allrow.Initialize( column, allunit );
        }
      }
      traverse( pisp, ProductInStockingPointInPeriod, pispip, pispip.Start() >= startofplanning
                and ( ( pispip.Start() < startofnextmonth and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() )
                      or ( pispip.Start() < startofnextyear and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Month() ) ) ){
        periodtime := pispip.Start().StartOfMonth().Date();
        periodname := periodtime.Format( "M2/D2/Y" );
        column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime );
        if( not isnull( ccrow ) ){
          ccrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
        }
        if( not isnull( dlrow ) ){
          dlrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
        }
        allrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
      }
    }
  *]
}
_Main/BL/Type_FinancialProductionSource/StaticMethod_Upload.qbl
@@ -13,6 +13,7 @@
    source := owner.FinancialProductionSource( relnew, FileBinaryValue := binaryValue,
                                               Name                    := fileName,
                                               IsXLSX                  := fileName.EndsWith( "xlsx" ),
                                               IsImport                := true,
                                               UploadDateTime          := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ),
                                               UploadUser              := guard( QuintiqUser::CurrentUser().Username(), "" ) );
    
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
Quintiq file version 2.0
Component MatrixEditorTable
{
  #keys: '[415136.0.844701426]'
  BaseType: 'WebMatrixEditor'
  Children:
  [
    Component MatrixEditorCellTable
    {
      #keys: '[415136.0.844701427]'
      BaseType: 'WebMatrixEditorCell'
      Children:
      [
        Component DataExtractorCell
        {
          #keys: '[415136.0.844701428]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'FinancialProductionReport'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'FinancialProductionColumn.FinancialProductionCell'
          ]
        }
      ]
      Properties:
      [
        Attributes: 'Value'
        Column: 'FinancialProductionColumn'
        Row: 'FinancialProductionRow'
        Taborder: 0
      ]
    }
    Component MatrixEditorRowsTable
    {
      #keys: '[415136.0.844701431]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractorRow
        {
          #keys: '[415136.0.844701432]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'FinancialProductionReport'
            FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderProduct;search:QMacroPlanner::FormFinancialProductionReport.dhSearch'
            FixedFilter: 'object.Filter( search, products )'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'FinancialProductionRow'
          ]
        }
      ]
      Properties:
      [
        Legend: 'Name'
        SortCriteria: 'Name'
        Taborder: 1
      ]
    }
    Component MatrixEditorColumnsTable
    {
      #keys: '[415136.0.844701435]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractorColumn
        {
          #keys: '[415136.0.844701436]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'FinancialProductionReport'
            Source: 'DataHolderTable'
            Taborder: 0
            Transformation: 'FinancialProductionColumn'
          ]
        }
      ]
      Properties:
      [
        Legend: 'Name'
        SortCriteria: 'Index'
        Taborder: 2
      ]
    }
    #child: matrixEditorActionBarPageTable
    #child: matrixeditorContextMenuTable
  ]
  Properties:
  [
    Columns: 'MatrixEditorColumnsTable'
    ContextMenu: 'matrixeditorContextMenuTable'
    Rows: 'MatrixEditorRowsTable'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelFinancialProductionReportHeader.def
@@ -10,6 +10,7 @@
  ]
  Properties:
  [
    Taborder: 0
    FixedSize: true
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelFinancialProductionReportTable.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
Component PanelTable
{
  #keys: '[415136.0.834352365]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: MatrixEditorTable
  ]
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def
@@ -12,7 +12,6 @@
      Properties:
      [
        Label: 'Unit'
        Strings: '<All>;长春;大连'
        Taborder: 0
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_matrixEditorActionBarPageTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixEditorActionBarPageTable
{
  #keys: '[415136.0.844701439]'
  BaseType: 'matrixEditorActionBarPage'
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_matrixeditorContextMenuTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixeditorContextMenuTable
{
  #keys: '[415136.0.844701442]'
  BaseType: 'matrixeditorContextMenu'
  Properties:
  [
    Taborder: 4
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_FormFinancialProductionReport_OnCreated
{
  #keys: '[415136.0.842812649]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      //初始化
      //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_PanelExport_ButtonExport_OnClick.def
@@ -13,7 +13,7 @@
  {
    Body:
    [*
      binaryValue := FinancialProductionSource::Download( MacroPlan );
      binaryValue := FinancialProductionSource::Download( MacroPlan, false );
      
      Application.Download( "Financial productions.xlsx", binaryValue.AsBinaryData() );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelFinancialProductionReportOperation_ButtonProductionExport_OnCl.def
@@ -13,7 +13,7 @@
  {
    Body:
    [*
      binaryValue := FinancialProductionSource::DownloadTemplate( MacroPlan );
      binaryValue := FinancialProductionSource::Download( MacroPlan, true );
      
      Application.Download( "Financial productions.xlsx", binaryValue.AsBinaryData() );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelFinancialProductionReportOperation_ButtonProductionImport_OnCl.def
@@ -28,6 +28,9 @@
          source.ReadStructure();
          
          WebMessageBox::Success( Translations::A_VWED_Success() );
          traverse( MacroPlan, FinancialProductionSource, psource, psource.IsImport() and psource <> source ){
            psource.Delete();
          }
        }
      } onerror {
        WebMessageBox::Error( e.GeneralInformation() );
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelGeneration/ddslGeneration
Response OnSelectionChanged () id:Response_PanelGeneration_ddslGeneration_OnSelectionChanged
{
  #keys: '[415136.0.840791771]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      dhSearch.Data().Generation( selection );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelMQBMLB/ddslMQBMLB
Response OnSelectionChanged () id:Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged
{
  #keys: '[415136.0.842090372]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      dhSearch.Data().MqbMlb( selection );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelPower/ddslPower
Response OnSelectionChanged () id:Response_PanelPower_ddslPower_OnSelectionChanged
{
  #keys: '[415136.0.842090478]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      dhSearch.Data().Power( selection );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: PanelUnit/ddslUnit
Response OnCreated () id:Response_PanelUnit_ddslUnit_OnCreated
{
  #keys: '[415136.0.848320822]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      valueString := "<All>;Spider Assy Line 1;Body in White Line 3";
      this.Strings( valueString );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelUnit/ddslUnit
Response OnSelectionChanged () id:Response_PanelUnit_ddslUnit_OnSelectionChanged
{
  #keys: '[415136.0.840791631]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      dhSearch.Data().Unit( selection );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def
@@ -8,7 +8,27 @@
  Children:
  [
    #child: PanelFinancialProductionReportHeader
    #child: PanelFinancialProductionReportTable
    #child: PanelTable
    Component DataHolderTable
    {
      #keys: '[415136.0.840720309]'
      BaseType: 'WebDataHolder'
      Databinding: 'FinancialProductionReport'
      Properties:
      [
        Taborder: 0
      ]
    }
    Component dhSearch
    {
      #keys: '[415136.0.849431513]'
      BaseType: 'WebDataHolder'
      Databinding: 'FinancialProductionSearch'
      Properties:
      [
        Taborder: 1
      ]
    }
  ]
  Properties:
  [