admin
2024-10-23 f0b5a93331432794466e54d10d77f837a61d37fa
大连料架报表优化
已修改4个文件
51 ■■■■ 文件已修改
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -130,6 +130,16 @@
                                  tempPISPIP.PlannedInventoryLevelEnd() );
        cell.DLRentalWarehouseStorageFees( [Number] ( guard( ( cell.TotalQuantityOfMaterialRacks() - plannedInventory1 ) / lce.PackagingCapacity(), 0 ) * guard( lcmr.StoragePrice(), 1 ) ) );
        
        // CC外租库清洗费用:发动机入库量 / 包装容量 * 料架清洗单价。发动机入库量取发动机销量,包装容量取自发动机成本表。料架清洗单价取料架成本表。
        clearnQuantity := sum( macroPlan, SalesDemand.astype( Forecast ), tempF,
                               tempF.Product_MP().Generation()         =  dlerr.Generation()       and
                               tempF.Product_MP().MQBMLB()             =  dlerr.MLB_MQB()          and
                               tempF.StockingPointID()                 =  "大连发动机的长春外租库" and
                               ( tempF.StartDate() - 2 ).Year()        = dlerc.StartDate().Year()  and
                               ( tempF.StartDate() - 2 ).Month()       = dlerc.StartDate().Month(),
                               tempF.FulfilledQuantity() );
        cell.CleaningCost( [Number] ( guard( clearnQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) );
        // DL外租库清洗费用:发动机入库量 / 包装容量 * 料架清洗单价。发动机入库量取发动机销量,包装容量取自发动机成本表。料架清洗单价取料架成本表。
        cell.CleaningCost( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) );
        
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
@@ -25,7 +25,7 @@
      firstCell.SetAttribute( "value", dlerr.Name() );
      firstColumn.AppendChild( firstCell );
      
      for ( i := 0; i < 14; i++ ) {
      for ( i := 0; i < 17; i++ ) {
        firstCell := xmlDOM.CreateElement( "cell" );
        firstCell.SetAttribute( "value", "" );
        firstColumn.AppendChild( firstCell );
@@ -36,8 +36,9 @@
    
    // 第二列
    attrs        := construct( Strings ); attrs.Add( "料架总数量" ); attrs.Add( "空料架数量" ); attrs.Add( "CC外租库入库费用" ); attrs.Add( "CC外租库出库费用" ); attrs.Add( "CC外租库仓储费用" );
                                          attrs.Add( "CC长途运输费用" ); attrs.Add( "CC短途运输费用" ); attrs.Add( "DL外租库入库费用" ); attrs.Add( "DL外租库出库费用" ); attrs.Add( "DL外租库运输费用" );
                                          attrs.Add( "外租库仓储费用" ); attrs.Add( "清洗费用" ); attrs.Add( "预计总费用" ); attrs.Add( "系数" ); attrs.Add( "总费用" );
                                          attrs.Add( "CC短途运输费用" ); attrs.Add( "CC外租库清洗费用" ); attrs.Add( "DL外租库入库费用" ); attrs.Add( "DL外租库出库费用" ); attrs.Add( "DL外租库运输费用" );
                                          attrs.Add( "DL外租库仓储费用" ); attrs.Add( "DL外租库清洗费用" ); attrs.Add( "DL外租库料架费用" ); attrs.Add( "CC外租库DL料架费用" );
                                          attrs.Add( "两厂间料架运输费用" ); attrs.Add( "预计总费用" ); attrs.Add( "系数" ); attrs.Add( "总费用" );
    secondColumn := xmlDOM.CreateElement( "column" );
    secondName   := xmlDOM.CreateElement( "name" );
    secondType   := xmlDOM.CreateElement( "type" );
@@ -87,11 +88,11 @@
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // CC长途运输费用
        cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC短途运输费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC短途运输费用
        cell.SetAttribute( "value", [String]c.CCCleaningCost().Round( 0 ) ); // CC外租库清洗费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
@@ -107,11 +108,23 @@
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // 外租库仓储费用
        cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // DL外租库仓储费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // 清洗费用
        cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // DL外租库清洗费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.DLRentalWarehouseMaterialRackCost().Round( 0 ) ); // DL外租库料架费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCExternalRentalWarehouseDLMaterialRackCost().Round( 0 ) ); // CC外租库DL料架费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // 两厂间料架运输费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
@@ -78,12 +78,12 @@
              cell.IsDLExternalRentalWarehouseTransportationCosts( true );
            }
            cell.DLExternalRentalWarehouseTransportationCosts( [Real]cellValue );
          } else if ( attributeUpdateFlag = "外租库仓储费用"         and not isnull( cell ) ) {
          } else if ( attributeUpdateFlag = "DL外租库仓储费用"         and not isnull( cell ) ) {
            if ( not cell.IsDLRentalWarehouseStorageFees() and cell.DLRentalWarehouseStorageFees() <> [Real]cellValue ) {
              cell.IsDLRentalWarehouseStorageFees( true );
            }
            cell.DLRentalWarehouseStorageFees( [Real]cellValue );
          } else if ( attributeUpdateFlag = "清洗费用"         and not isnull( cell ) ) {
          } else if ( attributeUpdateFlag = "DL外租库清洗费用"         and not isnull( cell ) ) {
            if ( not cell.IsCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
              cell.IsCleaningCost( true );
            }
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
@@ -2,6 +2,11 @@
#parent: #root
TypeRepresentation DL_EngineRackCell
{
  AttributeRepresentation CCCleaningCost
  {
    AttributeKey: '[415754.0.513823109]'
    Synonym: 'CC外租库清洗费用'
  }
  AttributeRepresentation CCExternalRentalWarehouseDLMaterialRackCost
  {
    AttributeKey: '[415754.0.481133918]'
@@ -230,11 +235,6 @@
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation IsCleaningCost
  {
    AttributeKey: '[415754.0.459256980]'
    Synonym: 'CC外租库清洗费用'
  }
  AttributeRepresentation NumberOfEmptyShelves
  {