lazhen
2024-10-22 5d16fa127ab2005b56ddb9c8d8c2ff1ff0f5826d
发动机物流成本报表导入报错处理
已修改20个文件
已删除2个文件
410 ■■■■ 文件已修改
_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcAllCost.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcAllCost.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcAllCost.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcAllCost.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
@@ -36,7 +36,7 @@
            sumcell  := sumrow.Initialize( column );
          }
          //显示月单元格
          showcell   := showrow.Cell( relnew, RentInCost := cell.RentInCost(), RentOutOfCost := cell.RentOutOfCost(), WerkToRentTransCost := cell.WerkToRentTransCost(), RentStorCost := cell.RentStorCost(), CoefficientValue := cell.CoefficientValue() );
          showcell   := showrow.Cell( relnew, RentInCost := cell.RentInCost(), RentOutOfCost := cell.RentOutOfCost(), WerkToRentTransCost := cell.WerkToRentTransCost(), RentStorCost := cell.RentStorCost(), CoefficientValue := cell.CoefficientValue(), AllCost := cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
          column.Cell( relinsert, showcell );
          //显示年单元格
          yearcell.RentInCost( cell.RentInCost() + yearcell.RentInCost() );
@@ -54,6 +54,13 @@
          sumcell.WerkToRentTransCost( cell.WerkToRentTransCost() + sumcell.WerkToRentTransCost() );
          sumcell.RentStorCost( cell.RentStorCost() + sumcell.RentStorCost() );
        }
        yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() );
      }
    }
    traverse( sumrow, Cell, cell ){
      cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
      if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){
        cell.IsUpdate( true );
      }
    }
  *]
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -10,13 +10,13 @@
  TextBody:
  [*
    // ç”„兰鸽 Sep-20-2024 (created)
    name                      := CCEngineLogisticsCostReport::GetDefaultName();
    //name                      := CCEngineLogisticsCostReport::GetDefaultName();
    source                    := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
    
    //清空导入之前的表
    owner.CCEngineLogisticsCostReport( relflush );
    //owner.CCEngineLogisticsCostReport( relflush );
    cnv2 := StringToDate::StandardConverter();
    cnv2.SetCustomConversion();
    //cnv2.CustomFormatString( "M2/D2/Y" );
@@ -26,9 +26,7 @@
    productcolumn             := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 );
    attricolumn               := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 );
    //生成新表的日期列
    table                     := owner.CCEngineLogisticsCostReport( relnew, ID := name, Name := name );
    showtable                 := owner.CCEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
    table.GenerateColumn( owner );
    table                     := CCEngineLogisticsCostReport::InitiateSearch( owner );
    traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){
      productcell             := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn );
      //处理未被同步的产品
@@ -77,13 +75,5 @@
        }
      }
    }
    rows := selectsortedset( table, Row, row, row.Name() );
    i    := 0;
    traverse( rows, Elements, e ){
      e.RowNr( i );
      i := i + 1;
    }
    //
    showtable.Generate( owner.CCEngineLogisticsCostSearch(), products );
  *]
}
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -150,12 +150,12 @@
        }
      }
    }
    rows := selectsortedset( table, Row, row, row.Name() );
    i    := 0;
    traverse( rows, Elements, e ){
      e.RowNr( i );
      i := i + 1;
    }
    //rows := selectsortedset( table, Row, row, row.Name() );
    //i    := 0;
    //traverse( rows, Elements, e ){
    //  e.RowNr( i );
    //  i := i + 1;
    //}
    //
    showtable.Generate( search, products );
  *]
_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
@@ -45,7 +45,8 @@
                                      , DLRentOutOfCost              := cell.DLRentOutOfCost()
                                      , WerkToDLRentTransCost        := cell.WerkToDLRentTransCost()
                                      , DLRentStorCost               := cell.DLRentStorCost()
                                      , CoefficientValue             := cell.CoefficientValue() );
                                      , CoefficientValue             := cell.CoefficientValue()
                                      , AllCost                      := cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
          column.Cell( relinsert, showcell );
          //显示年单元格
          yearcell.CCRentInCost( cell.CCRentInCost() + yearcell.CCRentInCost() );
@@ -78,6 +79,14 @@
          sumcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumcell.WerkToDLRentTransCost() );
          sumcell.DLRentStorCost( cell.DLRentStorCost() + sumcell.DLRentStorCost() );
        }
        yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() );
      }
    }
    traverse( sumrow, Cell, cell ){
      cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
      if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){
        cell.IsUpdate( true );
      }
    }
    info( '-------------------------g------------end---------------------------------' );
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
@@ -95,6 +95,10 @@
          product12cellElement := xmlDOM.CreateElement( "cell" );
          product12cellElement.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( product12cellElement );
          product13cellElement := xmlDOM.CreateElement( "cell" );
          product13cellElement.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( product13cellElement );
          //Attribute
          //长春外租库入库费用
          ccrententercostcellElement := xmlDOM.CreateElement( "cell" );
@@ -131,6 +135,10 @@
          //大连外租库仓储费用
          dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
          dlrentstoragecostcellElement.SetAttribute( "value", '大连外租库仓储费用' );//DLRentStorageCost
          attricolumnelement.AppendChild( dlrentstoragecostcellElement );
          //大连外租库其他费用
          dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
          dlrentstoragecostcellElement.SetAttribute( "value", '大连外租库其他费用' );//DLRentStorageCost
          attricolumnelement.AppendChild( dlrentstoragecostcellElement );
          //预计总费用
          estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
@@ -181,6 +189,10 @@
        dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
        dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentStorCost().Format( 'N(Dec)' ) );
        columnelement.AppendChild( dlrentstoragecostcellElement );
        //大连外租库其他费用
        dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
        dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentOtherCost().Format( 'N(Dec)' ) );
        columnelement.AppendChild( dlrentstoragecostcellElement );
        //预计总费用
        estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
        estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) );
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl
@@ -5,6 +5,6 @@
  TextBody:
  [*
    // ç”„兰鸽 Jun-25-2024 (created)
    return 'CC engine logistics cost reports';
    return 'DL engine logistics cost reports';
  *]
}
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
@@ -10,13 +10,12 @@
  TextBody:
  [*
    // ç”„兰鸽 Sep-20-2024 (created)
    name                      := CCEngineLogisticsCostReport::GetDefaultName();
    //name                      := CCEngineLogisticsCostReport::GetDefaultName();
    source                    := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
    
    //清空导入之前的表
    owner.DLEngineLogisticsCostReport( relflush );
    cnv2 := StringToDate::StandardConverter();
    cnv2.SetCustomConversion();
    //cnv2.CustomFormatString( "M2/D2/Y" );
@@ -26,9 +25,7 @@
    productcolumn             := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 );
    attricolumn               := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 );
    //生成新表的日期列
    table                     := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name );
    showtable                 := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
    table.GenerateColumn( owner );
    table                     := DLEngineLogisticsCostReport::InitiateSearch( owner );
    traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){
      productcell             := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn );
      //处理未被同步的产品
@@ -87,13 +84,5 @@
        }
      }
    }
    rows := selectsortedset( table, Row, row, row.Name() );
    i    := 0;
    traverse( rows, Elements, e ){
      e.RowNr( i );
      i := i + 1;
    }
    //
    showtable.Generate( owner.DLEngineLogisticsCostSearch(), products );
  *]
}
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -220,12 +220,12 @@
      }
    }
    
    rows := selectsortedset( table, Row, row, row.Name() );
    i    := 0;
    traverse( rows, Elements, e ){
      e.RowNr( i );
      i := i + 1;
    }
    //rows := selectsortedset( table, Row, row, row.Name() );
    //i    := 0;
    //traverse( rows, Elements, e ){
    //  e.RowNr( i );
    //  i := i + 1;
    //}
    info( '-------------------------------------end----------------------------------' );
    //
    showtable.Generate( search, products );
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -24,15 +24,15 @@
        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() );
          column              := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() );
          
          sumcell  := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow );
          sumcell             := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow );
          if( isnull( sumcell ) ){
            sumcell := column.FinancialProductionCell( relnew, Quantity := 0);
            sumcell           := column.FinancialProductionCell( relnew, Quantity := 0);
            sumrow.FinancialProductionCell( relinsert, sumcell );
          }
          
          showcell := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate()  );
          showcell            := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate()  );
          showrow.FinancialProductionCell( relinsert, showcell );
          yearcell.Quantity( yearcell.Quantity() + cell.Quantity() );
          sumyearcell.Quantity( sumyearcell.Quantity() + cell.Quantity() );
@@ -40,5 +40,11 @@
        }
      }
    }
    traverse( this, FinancialProductionColumn, column ){
      if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() ) ){
        sumcell               := selectobject( sumrow, FinancialProductionCell, sumcell, sumcell.FinancialProductionColumn() = column );
        sumcell.IsUpdate( true );
      }
    }
  *]
}
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -7,19 +7,21 @@
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    owner.FinancialProductionSource( relflush );
    traverse( owner, FinancialProductionSource, source, not source.IsImport() ){
      source.Delete();
    }
    owner.FPImportData( 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 );
    showtable                 := source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
    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 );
    //search                    := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
    
    productids                := construct( Strings );
    table.GenerateColumn( owner );
@@ -52,7 +54,11 @@
        }
      }
    }
    factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
    showtable.Generate( search, factorys, productids );
    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_GenerateShow.qbl
@@ -19,7 +19,7 @@
      productid.Add( row.Name() );
      
      if( productids.ContainsAll( productid ) ){
        showrow         := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit() );
        showrow         := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory );
        row.Product_MP().FinancialSalesRow( relinsert, showrow );
        yearcell        := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
        showrow.FinancialSalesCell( relinsert, yearcell );
@@ -42,5 +42,11 @@
        }
      }
    }
    traverse( this, FinancialSalesColumn, column ){
      if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() ) ){
        sumcell         := selectobject( sumrow, FinancialSalesCell, sumcell, sumcell.FinancialSalesColumn() = column );
        sumcell.IsUpdate( true );
      }
    }
  *]
}
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -25,7 +25,7 @@
        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 );
        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 );
        }
@@ -41,7 +41,7 @@
          if( isnull( tablecolumn ) ){
            tablecolumn   := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() );
          }
          unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn().Name() = column.Name() );
          unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn() = tablecolumn );
          if( isnull( unitcell ) ){
            unitcell        := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
            unitrow.FinancialSalesCell( relinsert, unitcell );
@@ -51,12 +51,12 @@
              previouscell  := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
              quantity      := [Real]cell.Value() + [Real]previouscell.Value();
              if( [Real]unitcell.Value() <> quantity ){
                unitcell.Value( [String]( [Number]cell.Value() ) );
                unitcell.Value( [String]( [Number]quantity ) );
                unitcell.IsUpdate( true );
              }
            }
          }
          allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn().Name() = column.Name() );
          allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn  );
          if( isnull( unitcell ) ){
            allcell         := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
            allrow.FinancialSalesCell( relinsert, allcell );
@@ -66,7 +66,7 @@
              previouscell  := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
              quantity      := [Real]cell.Value() + [Real]previouscell.Value();
              if( [Real]allcell.Value() <> quantity ){
                allcell.Value( [String]( [Number]cell.Value() ) );
                allcell.Value( [String]( [Number]quantity ) );
                allcell.IsUpdate( true );
              }
            }
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -8,7 +8,9 @@
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    owner.FinancialSalesSource( relflush );
    traverse( owner, FinancialSalesSource, source, not source.IsImport() ){
      source.Delete();
    }
    owner.FSImportData( relflush );
    productids                := construct( Strings );
    allunit                   := FinancialSalesReport::GetDefaultAllUnit();
@@ -20,12 +22,12 @@
    
    source                    := owner.FinancialSalesSource( relnew, IsImport := false, Name := FinancialSalesReport::GetDefaultName() );
    table                     := source.FinancialSalesReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
    showtable                 := source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
    source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
    startofplanning           := owner.StartOfPlanning().Date();
    //startofyear               := startofplanning.StartOfYear();
    startofnextyear           := startofplanning.StartOfNextYear();
    
    search                    := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
    //search                    := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
    
    table.GenerateColumn( owner );
    
@@ -131,7 +133,11 @@
    //    }
    //  }
    //}
    factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
    showtable.Generate( search, factorys, productids );
    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/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
@@ -6,36 +6,113 @@
  {
    AttributeKey: '[415136.0.1160240044]'
    Synonym: '总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CoefficientValue
  {
    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
@@ -6,66 +6,209 @@
  {
    AttributeKey: '[415136.0.1160164830]'
    Synonym: '总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF6666'
        ConditionBody: 'object.IsUpdate()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCLongTransCost
  {
    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_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def
@@ -15,7 +15,7 @@
    [*
      FinancialProductionSource::Initialize( MacroPlan );
      
      table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and table.IsShow() );
      table := FinancialProductionSource::InitiateSearch( MacroPlan );
      
      DataHolderTable.Data( table );
      
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
@@ -29,8 +29,9 @@
          
          if( not source.IsExistFutureMonthData() or 
              ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
             FinancialSalesSource::InitializeNew( MacroPlan );
             source.AfterImport();
             FinancialProductionSource::InitiateSearch( MacroPlan );
             DataHolderTable.Data( FinancialProductionSource::InitiateSearch( MacroPlan ) );
          }
          
          WebMessageBox::Success( Translations::A_VWED_Success() );
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def
@@ -10,6 +10,7 @@
  ]
  Properties:
  [
    Orientation: 'horizontal'
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
@@ -15,7 +15,7 @@
    [*
      FinancialSalesSource::InitializeNew( MacroPlan );
      
      table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() );
      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
@@ -29,8 +29,9 @@
          //如果存在计划开始后的日期数据需要点击确认
          if( not source.IsExistFutureMonthData() or 
              ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
             FinancialSalesSource::InitializeNew( MacroPlan );
             source.AfterImport();
             FinancialSalesSource::InitiateSearch( MacroPlan );
             DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) );
          }
          
          WebMessageBox::Success( Translations::A_VWED_Success() );