lazhen
2024-10-23 4bb71bc32df6a2ce847b5dc1853dea732e2d0253
财务产量报表/销量报表导入bug
已添加14个文件
已修改28个文件
619 ■■■■ 文件已修改
_Main/BL/Relations/Relation_CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCos.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCos.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_Name.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_Name.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostExcel/_ROOT_Type_CCEngineLogisticsCostExcel.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_Name.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_Name.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DLEngineLogisticsCostExcel/_ROOT_Type_DLEngineLogisticsCostExcel.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick#130.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick#57.def 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCos.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCostExcel
{
  #keys: '1[415136.0.1234200117]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide MacroPlan
  {
    #keys: '3[415136.0.1234200119][415136.0.1234200118][415136.0.1234200120]'
    Cardinality: '0to1'
    ObjectDefinition: CCEngineLogisticsCostExcel
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CCEngineLogisticsCostExcel
  {
    #keys: '3[415136.0.1234200122][415136.0.1234200121][415136.0.1234200123]'
    Cardinality: '0to1'
    ObjectDefinition: MacroPlan
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCos.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCostExcel
{
  #keys: '1[415136.0.1234200080]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide MacroPlan
  {
    #keys: '3[415136.0.1234200082][415136.0.1234200081][415136.0.1234200083]'
    Cardinality: '0to1'
    ObjectDefinition: DLEngineLogisticsCostExcel
    OwningSide: 'Reference'
  }
  RelationSide.RightSide DLEngineLogisticsCostExcel
  {
    #keys: '3[415136.0.1234200085][415136.0.1234200084][415136.0.1234200086]'
    Cardinality: '0to1'
    ObjectDefinition: MacroPlan
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute FileBinaryValue
{
  #keys: '3[415136.0.1234200111][415136.0.1234200110][415136.0.1234200112]'
  ValueType: BinaryValue
}
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_Name.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Name
{
  #keys: '3[415136.0.1234200105][415136.0.1234200104][415136.0.1234200106]'
  ValueType: String
}
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute UploadDateTime
{
  #keys: '3[415136.0.1234200108][415136.0.1234200107][415136.0.1234200109]'
  ValueType: String
}
_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_Name.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: Name
}
_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: UploadDateTime
}
_Main/BL/Type_CCEngineLogisticsCostExcel/_ROOT_Type_CCEngineLogisticsCostExcel.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type CCEngineLogisticsCostExcel
{
  #keys: '5[415136.0.1234200102][415136.0.1234200100][0.0.0][415136.0.1234200101][415136.0.1234200103]'
  BaseType: Object
  Description: '长春发动机物流成本报表导入excel'
  StructuredName: 'CCEngineLogisticsCostExcels'
}
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -3,14 +3,13 @@
StaticMethod Import (
  MacroPlan owner,
  RecycleBin recycle,
  BinaryValue binaryValue,
  String filePath
  BinaryValue binaryValue
)
{
  TextBody:
  [*
    // ç”„兰鸽 Sep-20-2024 (created)
    //name                      := CCEngineLogisticsCostReport::GetDefaultName();
    source                    := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
@@ -75,5 +74,6 @@
        }
      }
    }
    owner.DLEngineLogisticsCostExcel( relnew, Name := CCEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) );
  *]
}
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -157,6 +157,6 @@
    //  i := i + 1;
    //}
    //
    showtable.Generate( search, products );
    //showtable.Generate( search, products );
  *]
}
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
@@ -3,14 +3,13 @@
StaticMethod Import (
  MacroPlan owner,
  RecycleBin recycle,
  BinaryValue binaryValue,
  String filePath
  BinaryValue binaryValue
)
{
  TextBody:
  [*
    // ç”„兰鸽 Sep-20-2024 (created)
    //name                      := CCEngineLogisticsCostReport::GetDefaultName();
    source                    := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
@@ -84,5 +83,6 @@
        }
      }
    }
    owner.DLEngineLogisticsCostExcel( relnew, Name := DLEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) );
  *]
}
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -18,8 +18,8 @@
    startofnextyear           := startofplanning.StartOfNextYear();
    
    table                     := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name );
    showtable                 := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
    search                    := owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit );
    owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
    owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit );
    
    products                  := construct( Product_MPs );
    
@@ -228,6 +228,6 @@
    //}
    info( '-------------------------------------end----------------------------------' );
    //
    showtable.Generate( search, products );
    //showtable.Generate( search, products );
  *]
}
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute FileBinaryValue
{
  #keys: '3[415136.0.1234200077][415136.0.1234200076][415136.0.1234200078]'
  ValueType: BinaryValue
}
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_Name.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Name
{
  #keys: '3[415136.0.1234200067][415136.0.1234200066][415136.0.1234200068]'
  ValueType: String
}
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute UploadDateTime
{
  #keys: '3[415136.0.1234200073][415136.0.1234200072][415136.0.1234200074]'
  ValueType: String
}
_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_Name.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: Name
}
_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: UploadDateTime
}
_Main/BL/Type_DLEngineLogisticsCostExcel/_ROOT_Type_DLEngineLogisticsCostExcel.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type DLEngineLogisticsCostExcel
{
  #keys: '5[415136.0.1234200060][415136.0.1234200058][0.0.0][415136.0.1234200059][415136.0.1234200061]'
  BaseType: Object
  Description: '大连发动机物流成本报表导入excel'
  StructuredName: 'DLEngineLogisticsCostExcels'
}
_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
@@ -63,7 +63,7 @@
    
      traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
    
        column            := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() );
        column            := selectobject( this, Column, column, column.StartDate() = cell.Column().StartDate() and column.TimeUnit() = search.TimeUnit() );
        
        if( not isnull( column ) ){
          
_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
@@ -32,7 +32,7 @@
        for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
          weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//Name := weekend.Format( "M2/D2/Y" )
          
          this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
          this.Column( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
        }
      }
    }
_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl
@@ -12,8 +12,10 @@
    table                   := selectobject( this, FinancialProductionSource.FinancialProductionReport, report, not report.IsShow() );
    //清空之前存储的显示数据
    this.Clear();
    //年汇总
    yearcolumn                := this.FinancialProductionColumn( relnew, Name := '汇总', Period := this.FinancialProductionSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
    traverse( factorys, Elements, factory ){
      this.GenerateShow( table, productids, factory.ID() );
      this.GenerateShow( table, yearcolumn, productids, factory.ID() );
    }
    rows                    := selectsortedset( this, FinancialProductionRow, row, row.Name() );
    i                       := 0;
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -2,6 +2,7 @@
#parent: #root
Method GenerateShow (
  FinancialProductionReport table,
  FinancialProductionColumn yearcolumn,
  Strings productids,
  String factory
)
@@ -9,22 +10,32 @@
  TextBody:
  [*
    // ç”„兰鸽 Oct-12-2024 (created)
    //年汇总
    yearcolumn                := this.FinancialProductionColumn( relnew, Name := '汇总', Period := this.FinancialProductionSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
    allunit := FinancialProductionReport::GetDefaultAllUnit();
    sumrow                    := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory );
    sumyearcell               := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 );
    sumrow.FinancialProductionCell( relinsert, sumyearcell );
    traverse( table, FinancialProductionRow, row, row.Unit() = factory ){
    traverse( table, FinancialProductionRow, row, factory = allunit or row.Unit() = factory ){
      productid               := construct( Strings );
      productid.Add( row.Name() );
        
      if( productids.ContainsAll( productid ) ){
        showrow               := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory );
        isupdate        := false;
        showrow               := selectobject( this, FinancialProductionRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory );
        if( isnull( showrow ) ){
          showrow             := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory );
        row.Product_MP().FinancialProductionRow( relinsert, showrow );
        }
        yearcell              := selectobject( yearcolumn, FinancialProductionCell, fpcell, fpcell.FinancialProductionRow() = showrow );
        if( isnull( yearcell ) ){
        yearcell              := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 );
        showrow.FinancialProductionCell( relinsert, yearcell );
        }
        traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){
          column              := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() );
          if( isnull( column ) ){
            column            := this.FinancialProductionColumn( relnew, Name := cell.FinancialProductionColumn().Name(), Period := cell.FinancialProductionColumn().Period() );
          }
          
          sumcell             := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow );
          if( isnull( sumcell ) ){
@@ -32,16 +43,27 @@
            sumrow.FinancialProductionCell( relinsert, sumcell );
          }
          
          showcell            := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate()  );
          showcell            := selectobject( showrow, FinancialProductionCell, fpcell, fpcell.FinancialProductionColumn() = column );
          if( isnull( showcell ) ){
            showcell          := column.FinancialProductionCell( relnew, Quantity := 0, IsUpdate := cell.IsUpdate()  );
          showrow.FinancialProductionCell( relinsert, showcell );
          }
          if( cell.IsUpdate() ){
            isupdate          := true;
            showcell.IsUpdate( cell.IsUpdate() );
          }
          showcell.Quantity( showcell.Quantity() + cell.Quantity() );
          yearcell.Quantity( yearcell.Quantity() + cell.Quantity() );
          sumyearcell.Quantity( sumyearcell.Quantity() + cell.Quantity() );
          sumcell.Quantity( sumcell.Quantity() + cell.Quantity() );
        }
        if( isupdate ){
          yearcell.IsUpdate( isupdate );
        }
      }
    }
    traverse( this, FinancialProductionColumn, column ){
      if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() ) ){
      if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() and cell.FinancialProductionRow().Factory() = factory  ) ){
        sumcell               := selectobject( sumrow, FinancialProductionCell, sumcell, sumcell.FinancialProductionColumn() = column );
        sumcell.IsUpdate( true );
      }
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -5,7 +5,7 @@
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    allunit := FinancialProductionReport::GetDefaultAllUnit();
    //allunit := FinancialProductionReport::GetDefaultAllUnit();
    //查询需要导入的报表
    table                   := selectobject( this.MacroPlan(), FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and not table.IsShow() );
    yearday                 := this.MacroPlan().StartOfPlanning().StartOfYear();
@@ -29,15 +29,22 @@
        if( isnull( unitrow ) ){
          unitrow           := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := unit.Value() );
        }
        allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
        if( isnull( unitrow ) ){
          allrow            := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit );
        }
    //    allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
    //    if( isnull( unitrow ) ){
    //      allrow            := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit );
    //    }
        
        //读取每一行的单元格
        traverse( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){
        traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){
          period            := cnv2.Convert( cell.FinancialProductionColumn().Name() )
          periodname      := yearday.Format( "M2/D2/Y" );
          periodname        := period.Format( "M2/D2/Y" );
          quantity          := [Real]cell.Value();
          previouscolumn    := cell.FinancialProductionColumn().PreviousColumn();
          if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
            previouscell    := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
            quantity        := [Real]cell.Value() + [Real]previouscell.Value();
          }
    //      info( '-----------------', period );
          //获取被导入报表的日期列
          tablecolumn     := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname );
          if( isnull( tablecolumn ) ){
@@ -45,35 +52,26 @@
          }
          //获取被导入报表的单元格
          unitcell          := selectobject( unitrow, FinancialProductionCell, unitcell, unitcell.FinancialProductionColumn() = tablecolumn );
    //      allcell           := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn );
    //      if( isnull( allcell ) ){
    //        allcell         := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
    //        allrow.FinancialProductionCell( relinsert, allcell );
    //      }else{
    //        if( allcell.Quantity() <> quantity ){
    //          allcell.Quantity( quantity );
    //          allcell.IsUpdate( true );
    //        }
    //      }
          if( isnull( unitcell ) ){
            unitcell        := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
            unitrow.FinancialProductionCell( relinsert, unitcell );
          }else{
            previouscolumn  := cell.FinancialProductionColumn().PreviousColumn();
            if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
              previouscell  := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
              quantity      := [Real]cell.Value() + [Real]previouscell.Value();
              if( unitcell.Quantity() <> quantity ){
                unitcell.Quantity( quantity );
                unitcell.IsUpdate( true );
              }
            }
          }
          allcell           := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn );
          if( isnull( unitcell ) ){
            allcell         := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
            allrow.FinancialProductionCell( relinsert, allcell );
          }else{
            previouscolumn  := cell.FinancialProductionColumn().PreviousColumn();
            if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
              previouscell  := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
              quantity      := [Real]cell.Value() + [Real]previouscell.Value();
              if( unitcell.Quantity() <> quantity ){
                allcell.Quantity( [Real]cell.Value() );
                allcell.IsUpdate( true );
              }
            }
          }
        }
      }
    }
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -13,15 +13,12 @@
    owner.FPImportData( relflush );
    ccunit                    := FinancialProductionReport::GetDefaultCCUnit();
    dlunit                    := FinancialProductionReport::GetDefaultDLUnit();
    allunit                   := FinancialProductionReport::GetDefaultAllUnit();
    //allunit                   := FinancialProductionReport::GetDefaultAllUnit();
    source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() );
    table                     := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
    source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
    startofplanning           := owner.StartOfPlanning().Date();
    //startofyear               := startofplanning.StartOfYear();
    startofnextyear           := startofplanning.StartOfNextYear();
    //search                    := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
    
    productids                := construct( Strings );
    table.GenerateColumn( owner );
@@ -36,7 +33,7 @@
          //获取工厂行
          factoryrow          := table.GetRowByUnit( pisp.Product_MP(), ifexpr( iscc, ccunit, dlunit ) );
          //获取合计行
          allrow              := table.GetRowByUnit( pisp.Product_MP(), allunit );
    //      allrow              := table.GetRowByUnit( pisp.Product_MP(), allunit );
          productids.Add( pisp.ProductID() );
          //当product planning的日期区间在需要的日期区间内 
          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){
@@ -49,15 +46,12 @@
            column            := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
            factoryrow.Initialize( daycolumn, pispip.NewSupplyQuantity() );
            factoryrow.Initialize( column, pispip.NewSupplyQuantity() );
            allrow.Initialize( column, pispip.NewSupplyQuantity() );
    //        allrow.Initialize( column, pispip.NewSupplyQuantity() );
          }    
        }
      }
    }
    excelsource               := selectobject( owner, FinancialProductionSource, excelsource, excelsource.IsImport() );
    if( not isnull( excelsource ) ){
      excelsource.AfterImport();
    }
    //factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
    //showtable.Generate( search, factorys, productids );
  *]
_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl
@@ -12,8 +12,10 @@
    table                   := selectobject( this, FinancialSalesSource.FinancialSalesReport, report, not report.IsShow() );
    //清空之前存储的显示数据
    this.Clear();
    //年汇总
    yearcolumn                := this.FinancialSalesColumn( relnew, Name := '汇总', Period := search.MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
    traverse( factorys, Elements, factory ){
      this.GenerateShow( table, productids, factory.ID() );
      this.GenerateShow( table, yearcolumn, productids, factory.ID() );
    }
    rows                    := selectsortedset( this, FinancialSalesRow, row, row.Name() );
    i                       := 0;
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
@@ -2,6 +2,7 @@
#parent: #root
Method GenerateShow (
  FinancialSalesReport table,
  FinancialSalesColumn yearcolumn,
  Strings productids,
  String factory
)
@@ -9,41 +10,62 @@
  TextBody:
  [*
    // ç”„兰鸽 Oct-12-2024 (created)
    //年汇总
    yearcolumn          := this.FinancialSalesColumn( relnew, Name := '汇总', Period := this.FinancialSalesSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
    allunit := FinancialProductionReport::GetDefaultAllUnit();
    sumrow              := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory );
    sumyearcell         := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
    sumrow.FinancialSalesCell( relinsert, sumyearcell );
    traverse( table, FinancialSalesRow, row, row.Unit() = factory ){
    //error( '-----------------', productids.Size(), selectset( table, FinancialSalesRow, row, factory = allunit or row.Unit() = factory ).Size() );
    traverse( table, FinancialSalesRow, row, factory = allunit or row.Unit() = factory ){
      productid         := construct( Strings );
      productid.Add( row.Name() );
      
      if( productids.ContainsAll( productid ) ){
        showrow         := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory );
        isupdate              := false;
        showrow               := selectobject( this, FinancialSalesRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory );
        if( isnull( showrow ) ){
          showrow             := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory );
        row.Product_MP().FinancialSalesRow( relinsert, showrow );
        }
        yearcell              := selectobject( yearcolumn, FinancialSalesCell, fpcell, fpcell.FinancialSalesRow() = showrow );
        if( isnull( yearcell ) ){
        yearcell        := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
        showrow.FinancialSalesCell( relinsert, yearcell );
        }
        
        traverse( row, FinancialSalesCell, cell, not cell.FinancialSalesColumn().IsDay() ){
          column        := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() and not column.IsDay());
          if( isnull( column ) ){
            column            := this.FinancialSalesColumn( relnew, Name := cell.FinancialSalesColumn().Name(), Period := cell.FinancialSalesColumn().Period() );
          }
          sumcell       := selectobject( column, FinancialSalesCell, c, c.FinancialSalesRow() = sumrow );
          if( isnull( sumcell ) ){
            sumcell     := column.FinancialSalesCell( relnew, Value := '0' );
            sumrow.FinancialSalesCell( relinsert, sumcell );
          }
          
          showcell      := column.FinancialSalesCell( relnew, Value := cell.Value(), IsUpdate := cell.IsUpdate()  );
          showcell            := selectobject( showrow, FinancialSalesCell, fpcell, fpcell.FinancialSalesColumn() = column );
          if( isnull( showcell ) ){
            showcell          := column.FinancialSalesCell( relnew, Value := '0', IsUpdate := cell.IsUpdate()  );
          showrow.FinancialSalesCell( relinsert, showcell );
          }
          if( cell.IsUpdate() ){
            isupdate          := true;
            showcell.IsUpdate( cell.IsUpdate() );
          }
          showcell.Value( [String]( [Real]showcell.Value() + [Real]cell.Value() ) );
          yearcell.Value( [String]( [Real]yearcell.Value() + [Real]cell.Value() ) );
          sumyearcell.Value( [String]( [Real]sumyearcell.Value() + [Real]cell.Value() ) );
          value         := [Real]cell.Value() + [Real]sumcell.Value();
          sumcell.Value( [String]value );
        }
        if( isupdate ){
          yearcell.IsUpdate( isupdate );
        }
      }
    }
    traverse( this, FinancialSalesColumn, column ){
      if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() ) ){
      if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() and cell.FinancialSalesRow().Factory() = factory ) ){
        sumcell         := selectobject( sumrow, FinancialSalesCell, sumcell, sumcell.FinancialSalesColumn() = column );
        sumcell.IsUpdate( true );
      }
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -5,7 +5,7 @@
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    allunit                 := FinancialProductionReport::GetDefaultAllUnit();
    //allunit                 := FinancialProductionReport::GetDefaultAllUnit();
    table                   := selectobject( this.MacroPlan(), FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and not table.IsShow() );
    yearday                 := this.MacroPlan().StartOfPlanning().StartOfYear();
    beforeyearday           := ( yearday - Duration::Days( 1 ) ).Date();
@@ -25,16 +25,21 @@
        if( isnull( unitrow ) ){
          unitrow           := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := unit.Value() );
        }
        allrow              := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
        if( isnull( unitrow ) ){
          allrow            := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit );
        }
    //    allrow              := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
    //    if( isnull( unitrow ) ){
    //      allrow            := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit );
    //    }
        
        traverse( row, FinancialSalesCell, cell, cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday  ){
        traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday  ){
          column            := cell.FinancialSalesColumn();
          period            := cnv2.Convert( column.Name() )
          periodname        := period.Format( "M2/D2/Y" )
          periodname        := period.Format( "M2/D2/Y" );
          quantity          := [Real]cell.Value()
          previouscolumn    := cell.FinancialSalesColumn().PreviousColumn();
          if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
            previouscell    := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
            quantity        := [Real]cell.Value() + [Real]previouscell.Value();
          }
          tablecolumn       := construct( FinancialSalesColumn );
          //获取被导入报表的日期列
          tablecolumn     := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname );
@@ -46,31 +51,21 @@
            unitcell        := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
            unitrow.FinancialSalesCell( relinsert, unitcell );
          }else{
            previouscolumn  := cell.FinancialSalesColumn().PreviousColumn();
            if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
              previouscell  := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
              quantity      := [Real]cell.Value() + [Real]previouscell.Value();
              if( [Real]unitcell.Value() <> quantity ){
                unitcell.Value( [String]( [Number]quantity ) );
                unitcell.IsUpdate( true );
              }
            }
          }
          allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn  );
          if( isnull( unitcell ) ){
            allcell         := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
            allrow.FinancialSalesCell( relinsert, allcell );
          }else{
            previouscolumn  := cell.FinancialSalesColumn().PreviousColumn();
            if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
              previouscell  := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
              quantity      := [Real]cell.Value() + [Real]previouscell.Value();
              if( [Real]allcell.Value() <> quantity ){
                allcell.Value( [String]( [Number]quantity ) );
                allcell.IsUpdate( true );
              }
            }
          }
    //      allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn  );
    //      if( isnull( allcell ) ){
    //        allcell         := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
    //        allrow.FinancialSalesCell( relinsert, allcell );
    //      }else{
    //        if( [Real]allcell.Value() <> quantity ){
    //          allcell.Value( [String]( [Number]quantity ) );
    //          allcell.IsUpdate( true );
    //        }
    //      }
        }
      }
    }
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -13,7 +13,7 @@
    }
    owner.FSImportData( relflush );
    productids                := construct( Strings );
    allunit                   := FinancialSalesReport::GetDefaultAllUnit();
    //allunit                   := FinancialSalesReport::GetDefaultAllUnit();
    ccunit                    := FinancialSalesReport::GetDefaultCCUnit();
    dlunit                    := FinancialSalesReport::GetDefaultDLUnit();
    ccsalessegment            := FinancialSalesReport::GetSalesSegmentCC();
@@ -49,7 +49,7 @@
      if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) or isdl ){
        
        //获取合计行
        allrow               := table.GetRow( allunit, product );
    //    allrow               := table.GetRow( allunit, product );
        //获取工厂行
        factoryrow           := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product );
      
@@ -67,7 +67,7 @@
          
          factoryrow.Initialize( column, quantity );
          factoryrow.Initialize( daycolumn, quantity );
          allrow.Initialize( column, quantity );
    //      allrow.Initialize( column, quantity );
        }
      }
    }
@@ -77,7 +77,7 @@
                  and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear 
                              and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//产品为MQB
          product           := pisp.Product_MP();
          allrow            := table.GetRow( allunit, product );
    //      allrow            := table.GetRow( allunit, product );
          factoryrow        := table.GetRow( dlunit, product );
          productids.Add( pisp.ProductID() );
          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
@@ -93,7 +93,7 @@
            
            factoryrow.Initialize( column, quantity );//取Total Demand字段按月汇总需求数量
            factoryrow.Initialize( daycolumn, quantity );
            allrow.Initialize( column, quantity );
    //        allrow.Initialize( column, quantity );
          }
        }
    //  }
@@ -133,10 +133,7 @@
    //    }
    //  }
    //}
    excelsource               := selectobject( owner, FinancialSalesSource, excelsource, excelsource.IsImport() );
    if( not isnull( excelsource ) ){
      excelsource.AfterImport();
    }
    //factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
    //showtable.Generate( search, factorys, productids );
  *]
_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
@@ -32,7 +32,7 @@
        for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){
          weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) )
          
          this.InventorySummaryColumn( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
          this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
        }
      }else if( timeunit = Translations::MP_GlobalParameters_Month() ){
        for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){
_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl
@@ -18,7 +18,7 @@
      showrow := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() );
      
      traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
        column   := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() );
        column   := selectobject( this, Column, column, column.StartDate() = cell.Column().StartDate() and column.TimeUnit() = search.TimeUnit() );
        
        if( not isnull( column ) ){
          sumcell  := selectobject( column, Cell, c, c.Row() = sumrow );
_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
@@ -33,7 +33,7 @@
        for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
          weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();// weekend.Format( "M2/D2/Y" )
          
          this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
          this.Column( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
        }
      }
    }
_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
@@ -22,97 +22,31 @@
  {
    AttributeKey: '[415136.0.1188511346]'
    Synonym: '系数'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation EstimateTotalCost
  {
    AttributeKey: '[415136.0.1160240036]'
    Synonym: '预计总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation RentInCost
  {
    AttributeKey: '[415136.0.1160164662]'
    Synonym: '外租库入库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation RentOutOfCost
  {
    AttributeKey: '[415136.0.1160164672]'
    Synonym: '外租库出库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation RentStorCost
  {
    AttributeKey: '[415136.0.1160164707]'
    Synonym: '外租库仓储费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation WerkToRentTransCost
  {
    AttributeKey: '[415136.0.1160240024]'
    Synonym: '厂内到外租库运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  RelationRepresentation Column { RelationKey: '[415136.0.986881392]' Visibility: 'Normal' }
}
_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
@@ -22,193 +22,61 @@
  {
    AttributeKey: '[415136.0.1160164734]'
    Synonym: '长春长途运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCRentInCost
  {
    AttributeKey: '[415136.0.1160164742]'
    Synonym: '长春外租库入库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCRentOutOfCost
  {
    AttributeKey: '[415136.0.1160164750]'
    Synonym: '长春外租库出库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCRentStorCost
  {
    AttributeKey: '[415136.0.1160164771]'
    Synonym: '长春外租库仓储费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCShorTransCost
  {
    AttributeKey: '[415136.0.1160164779]'
    Synonym: '长春短途运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CoefficientValue
  {
    AttributeKey: '[415136.0.1188511355]'
    Synonym: '系数'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLRentInCost
  {
    AttributeKey: '[415136.0.1160164787]'
    Synonym: '大连外租库入库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLRentOtherCost
  {
    AttributeKey: '[415136.0.1184074681]'
    Synonym: '大连外租库其他费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLRentOutOfCost
  {
    AttributeKey: '[415136.0.1160164795]'
    Synonym: '大连外租库出库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLRentStorCost
  {
    AttributeKey: '[415136.0.1160164806]'
    Synonym: '大连外租库仓储费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation EstimateTotalCost
  {
    AttributeKey: '[415136.0.1160164814]'
    Synonym: '预计总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation WerkToDLRentTransCost
  {
    AttributeKey: '[415136.0.1160164822]'
    Synonym: '厂内到外租库运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  RelationRepresentation Column { RelationKey: '[415136.0.992900194]' Visibility: 'Normal' }
}
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def
@@ -19,12 +19,12 @@
          uploadJson := JSON::Parse( uploadJsonString );
          Archive::VerifyTheFileName( uploadJson );
                
          fileName := uploadJson.Get( "name" ).GetString();
      //    fileName := uploadJson.Get( "name" ).GetString();
          base64String := uploadJson.Get( "data" ).GetString();
              
          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
          
          CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData, fileName );
          CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData );
          
          WebMessageBox::Success( Translations::A_VWED_Success() );
        }
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def
@@ -15,6 +15,12 @@
    [*
      CCEngineLogisticsCostReport::Initialize( MacroPlan );
      
      if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){
        CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.CCEngineLogisticsCostExcel().FileBinaryValue() );
      }else{
        CCEngineLogisticsCostReport::InitiateSearch( MacroPlan );
      }
      table := selectobject( MacroPlan, CCEngineLogisticsCostReport, table, table.IsShow() );
      
      DataHolderTable.Data( table );
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick#130.def
@@ -19,12 +19,12 @@
          uploadJson := JSON::Parse( uploadJsonString );
          Archive::VerifyTheFileName( uploadJson );
                
          fileName := uploadJson.Get( "name" ).GetString();
      //    fileName := uploadJson.Get( "name" ).GetString();
          base64String := uploadJson.Get( "data" ).GetString();
              
          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
          
          DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData, fileName );
          DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData );
          
          WebMessageBox::Success( Translations::A_VWED_Success() );
        }
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick#57.def
@@ -15,6 +15,11 @@
    [*
      DLEngineLogisticsCostReport::InitializeNew( MacroPlan );
      
      if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){
        DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.DLEngineLogisticsCostExcel().FileBinaryValue() );
      }else{
        DLEngineLogisticsCostReport::InitiateSearch( MacroPlan );
      }
      table := selectobject( MacroPlan, DLEngineLogisticsCostReport, table, table.IsShow() );
      
      DataHolderTable.Data( table );
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def
@@ -14,7 +14,10 @@
    Body:
    [*
      FinancialProductionSource::Initialize( MacroPlan );
      excelsource               := selectobject( MacroPlan, FinancialProductionSource, excelsource, excelsource.IsImport() );
      if( not isnull( excelsource ) ){
        excelsource.AfterImport();
      }
      table := FinancialProductionSource::InitiateSearch( MacroPlan );
      
      DataHolderTable.Data( table );
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
@@ -29,9 +29,15 @@
          
          if( not source.IsExistFutureMonthData() or 
              ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
             FinancialSalesSource::InitializeNew( MacroPlan );
             FinancialProductionSource::Initialize( MacroPlan );
             source.AfterImport();
             DataHolderTable.Data( FinancialProductionSource::InitiateSearch( MacroPlan ) );
             productids              := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() )
                                                       and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() )
                                                       and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() );
             table                   := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, table.IsShow() );
             table.Generate( dhSearch.Data(), dhFactorys.Data(), productids );
             DataHolderTable.Data( table );
          }
          
          WebMessageBox::Success( Translations::A_VWED_Success() );
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def
@@ -13,6 +13,7 @@
  Properties:
  [
    FixedSize: true
    MinimumColumns: 20
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
@@ -14,7 +14,10 @@
    Body:
    [*
      FinancialSalesSource::InitializeNew( MacroPlan );
      excelsource               := selectobject( MacroPlan, FinancialSalesSource, excelsource, excelsource.IsImport() );
      if( not isnull( excelsource ) ){
        excelsource.AfterImport();
      }
      table := FinancialSalesSource::InitiateSearch( MacroPlan );//selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() );
      
      DataHolderTable.Data( table );
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def
@@ -31,7 +31,14 @@
              ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
             FinancialSalesSource::InitializeNew( MacroPlan );
             source.AfterImport();
             DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) );
             productids              := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() )
                                                       and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() )
                                                       and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() );
             table                   := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, table.IsShow() );
             table.Generate( dhSearch.Data(), dhFactorys.Data(), productids );
             DataHolderTable.Data( table );
      //       DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) );
          }
          
          WebMessageBox::Success( Translations::A_VWED_Success() );