admin
2024-10-19 9e75417aab6ab66f28a2e1bc93c7e4b412b40990
长春&大连料架报表优化
已添加39个文件
已修改13个文件
已删除1个文件
1344 ■■■■■ 文件已修改
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/CC_EngineRackCell.qrp 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick#844.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick#593.def 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateCleaningCost
{
  #keys: '3[415754.0.459255955][415754.0.459255954][415754.0.459255956]'
  Description: '清洗费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateCoefficient
{
  #keys: '3[415754.0.459231854][415754.0.459231853][415754.0.459231855]'
  Description: '系数更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateEstimatedTotalCost
{
  #keys: '3[415754.0.459255992][415754.0.459255991][415754.0.459255993]'
  Description: '预计总费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateExternalRentalWarehouseTransportationCosts
{
  #keys: '3[415754.0.459255918][415754.0.459255917][415754.0.459255919]'
  Description: '外租库运输费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateNumberOfEmptyShelves
{
  #keys: '3[415754.0.459255802][415754.0.459255801][415754.0.459255803]'
  Description: '空料架数量跟新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateOutboundExpensesForRentedWarehouses
{
  #keys: '3[415754.0.459255881][415754.0.459255880][415754.0.459255882]'
  Description: '外租库出库费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateRentalWarehouseStorageFees
{
  #keys: '3[415754.0.459215185][415754.0.459215184][415754.0.459215186]'
  Description: '外租库仓储费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateStorageFeesForRentedWarehouses
{
  #keys: '3[415754.0.459255844][415754.0.459255843][415754.0.459255845]'
  Description: '外租库入库费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateTotalCost
{
  #keys: '3[415754.0.459256029][415754.0.459256028][415754.0.459256030]'
  Description: '总费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsUpdateTotalQuantityOfMaterialRacks
{
  #keys: '3[415754.0.459231812][415754.0.459231811][415754.0.459231813]'
  Description: '料架总数量更新值'
  ValueType: Boolean
}
_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
@@ -9,6 +9,17 @@
  [*
    this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
    
    this.NumberOfEmptyShelves( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() );
    // ç©ºæ–™æž¶æ•°é‡è”动
    this.NumberOfEmptyShelves( [Number] ( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() ) );
    // SUM行联动
    cell := select( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() = "SUM" );
    cell.TotalQuantityOfMaterialRacks( sum( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.TotalQuantityOfMaterialRacks() ) );
    cell.NumberOfEmptyShelves( sum( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.NumberOfEmptyShelves() ) );
    // SUM列联动
    cell := select( this, CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackColumn().DisplayName() = "SUM" );
    cell.TotalQuantityOfMaterialRacks( sum( this,CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.TotalQuantityOfMaterialRacks() ) );
    cell.NumberOfEmptyShelves( sum( this,CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.NumberOfEmptyShelves() ) );
  *]
}
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -9,15 +9,6 @@
    macroPlan.CC_EngineRackRow( relflush );
    macroPlan.CC_EngineRackColumn( relflush );
    
    sumNumberOfEmptyShelves                       := 0.0;
    sumStorageFeesForRentedWarehouses             := 0.0;
    sumOutboundExpensesForRentedWarehouses        := 0.0;
    sumExternalRentalWarehouseTransportationCosts := 0.0;
    sumRentalWarehouseStorageFees                 := 0.0;
    sumCleaningCost                               := 0.0;
    sumEstimatedTotalCost                         := 0.0;
    sumTotalCost                                  := 0.0;
    // åˆ›å»ºè¡Œ
    genrations := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() );
    mqbmlbs    := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() );
@@ -67,7 +58,6 @@
        cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) );
        cell.PlannedInventory( plannedInventory );
        cell.NumberOfEmptyShelves( guard( [Number] ( cell.TotalQuantityOfMaterialRacks() - ( plannedInventory / lce.PackagingCapacity() ) ), 0 ) );
        sumNumberOfEmptyShelves := sumNumberOfEmptyShelves + cell.NumberOfEmptyShelves();
        
        // å¤–租库入库费用(发动机销量 / åŒ…装容量[向上取整] * æ–™æž¶å…¥åº“单价)
        engineSales := sum( macroPlan, FSImportData, tempFSID, 
@@ -78,7 +68,6 @@
                            tempFSID.StartDate().Month() = ccerc.StartDate().Month(),
                            tempFSID.Quantity() );
        cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) );
        sumStorageFeesForRentedWarehouses := sumStorageFeesForRentedWarehouses + cell.StorageFeesForRentedWarehouses();
             
        // å¤–租库出库费用(发动机产量 / åŒ…装容量[向上取整] * æ–™æž¶å‡ºåº“单价)
        engineProductions := sum( macroPlan, FPImportData, tempFPID, 
@@ -88,8 +77,7 @@
                                  tempFPID.StartDate().Year()  = ccerc.StartDate().Year()                      and
                                  tempFPID.StartDate().Month() = ccerc.StartDate().Month(),
                                  tempFPID.Quantity() );
        cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) ) * guard( lcmr.OutboundPrice(), 1 ) );
        sumOutboundExpensesForRentedWarehouses := sumOutboundExpensesForRentedWarehouses + cell.OutboundExpensesForRentedWarehouses();
        cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.OutboundPrice(), 1 ) ) );
        
        // å¤–租库运输费用:发动机运输量 / åŒ…装容量 / è£…载容量(向上取整) * æ–™æž¶è¿è¾“单价
        transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT, 
@@ -103,16 +91,13 @@
                                      );
    //    info( "时间:", ccerc.StartDate().Format( "Y-M2-D2" ), "    è¿è¾“数据:", transportationQuantity, "     è¿è¾“单价:", lct.TransportPrice() );
        cell.ExternalRentalWarehouseTransportationCosts( [Number] ( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ) );
        sumExternalRentalWarehouseTransportationCosts := sumExternalRentalWarehouseTransportationCosts + cell.ExternalRentalWarehouseTransportationCosts();
             
        // å¤–租库仓储费用:料架总数量 - å‘动机库存 / åŒ…装容量(向上取整),再乘以空料架仓储单价得到空料架仓储费用。发动机库存取Actual inventories里取到长春外租库该发动机的仓储量,料架总数量需要手动维护。
        cell.UnitPriceOfEmptyShelfStorage( lcmr.StoragePrice() );
        cell.RentalWarehouseStorageFees( [Number] ( guard( ( cell.TotalQuantityOfMaterialRacks() - [Number]( plannedInventory / lce.PackagingCapacity() ) ) * lcmr.StoragePrice(), 0 ) ) );
        sumRentalWarehouseStorageFees := sumRentalWarehouseStorageFees + cell.RentalWarehouseStorageFees();
        
        // æ¸…洗费用:发动机入库量 / åŒ…装容量 * æ–™æž¶æ¸…洗单价。发动机入库量取发动机销量,包装容量取自发动机成本表。料架清洗单价取料架成本表。
        cell.CleaningCost( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) * lcmr.CleanPrice() ) );
        sumCleaningCost := sumCleaningCost + cell.CleaningCost();
        
        // é¢„计总费用
        cell.EstimatedTotalCost( cell.StorageFeesForRentedWarehouses()             + 
@@ -121,14 +106,12 @@
                                 cell.RentalWarehouseStorageFees()                 +
                                 cell.CleaningCost()
                                );
        sumEstimatedTotalCost := sumEstimatedTotalCost + cell.EstimatedTotalCost();
                                
        // ç³»æ•°
        cell.Coefficient( 1.05 );
        
        // æ€»è´¹ç”¨
        cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
        sumTotalCost := sumTotalCost + cell.TotalCost();
        cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
        
        cell.CC_EngineRackColumn( relset, ccerc );
      }
@@ -138,17 +121,34 @@
    sumR := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
    traverse ( macroPlan, CC_EngineRackColumn, ccerc ) {
      cell := sumR.CC_EngineRackCell( relnew );
      cell.NumberOfEmptyShelves( sumNumberOfEmptyShelves );
      cell.StorageFeesForRentedWarehouses( sumStorageFeesForRentedWarehouses );
      cell.OutboundExpensesForRentedWarehouses( sumOutboundExpensesForRentedWarehouses );
      cell.ExternalRentalWarehouseTransportationCosts( sumExternalRentalWarehouseTransportationCosts );
      cell.RentalWarehouseStorageFees( sumRentalWarehouseStorageFees );
      cell.CleaningCost( sumCleaningCost );
      cell.EstimatedTotalCost( sumEstimatedTotalCost );
      cell.TotalCost( sumTotalCost );
      cell.CC_EngineRackColumn( relset, ccerc );
      cell.NumberOfEmptyShelves( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.NumberOfEmptyShelves() ) );
      cell.StorageFeesForRentedWarehouses( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.StorageFeesForRentedWarehouses() ) );
      cell.OutboundExpensesForRentedWarehouses( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.OutboundExpensesForRentedWarehouses() ) );
      cell.ExternalRentalWarehouseTransportationCosts( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.ExternalRentalWarehouseTransportationCosts() ) );
      cell.RentalWarehouseStorageFees( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.RentalWarehouseStorageFees() ) );
      cell.CleaningCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.CleaningCost() ) );
      cell.EstimatedTotalCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.EstimatedTotalCost() ) );
      cell.Coefficient( 1.05 );
      cell.TotalCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.TotalCost() ) );
    }
    // åˆ›å»ºSUM列
    sumC   := macroPlan.CC_EngineRackColumn( relnew, StartDate := Date::MaxDate() );
    traverse ( macroPlan, CC_EngineRackRow, ccerr ) {
      cell := ccerr.CC_EngineRackCell( relnew );
      cell.CC_EngineRackColumn( relset, sumC );
      cell.NumberOfEmptyShelves( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.NumberOfEmptyShelves() ) );
      cell.StorageFeesForRentedWarehouses( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.StorageFeesForRentedWarehouses() ) );
      cell.OutboundExpensesForRentedWarehouses( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.OutboundExpensesForRentedWarehouses() ) );
      cell.ExternalRentalWarehouseTransportationCosts( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.ExternalRentalWarehouseTransportationCosts() ) );
      cell.RentalWarehouseStorageFees( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.RentalWarehouseStorageFees() ) );
      cell.CleaningCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.CleaningCost() ) );
      cell.EstimatedTotalCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.EstimatedTotalCost() ) );
      cell.Coefficient( 1.05 );
      cell.TotalCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.TotalCost() ) );
    }
  *]
}
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
@@ -35,7 +35,7 @@
    
    
    // ç¬¬äºŒåˆ—
    attrs        := construct( Strings ); attrs.Add( "料架空数量" ); attrs.Add( "空料架数量" ); attrs.Add( "外租库入库费用" ); attrs.Add( "外租库出库费用" ); attrs.Add( "外租库运输费用" );
    attrs        := construct( Strings ); attrs.Add( "料架总数量" ); attrs.Add( "空料架数量" ); attrs.Add( "外租库入库费用" ); attrs.Add( "外租库出库费用" ); attrs.Add( "外租库运输费用" );
                                          attrs.Add( "外租库仓储费用" ); attrs.Add( "清洗费用" ); attrs.Add( "预计总费用" ); attrs.Add( "系数" ); attrs.Add( "总费用" );
    secondColumn := xmlDOM.CreateElement( "column" );
    secondName   := xmlDOM.CreateElement( "name" );
@@ -59,8 +59,8 @@
      cellColumn := xmlDOM.CreateElement( "column" );
      cellName   := xmlDOM.CreateElement( "name" );
      cellType   := xmlDOM.CreateElement( "type" );
      cellName.TextContent( cerc.StartDate().Format( "M2/D2/Y" ) );
      cellType.TextContent( "Number" );
      cellName.TextContent( cerc.DisplayName() );
      cellType.TextContent( "Real" );
      cellColumn.AppendChild( cellName );
      cellColumn.AppendChild( cellType );
      cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Index(), tempCELL.CC_EngineRackRow().Name() );
@@ -98,7 +98,7 @@
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.Coefficient().Round( 0 ) ); // ç³»æ•°
        cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // ç³»æ•°
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
@@ -5,5 +5,81 @@
  GeneralExcelImportAndExportDataTable table
)
{
  TextBody: '//traverse ('
  TextBody:
  [*
    isUpdateFlag        := "";
    attributeUpdateFlag := "";
    traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
      traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
        // å•元格值
        cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
        // é•¿æ˜¥æ–™æž¶æŠ¥è¡¨åˆ—
        ccerc     := select( macroPlan, CC_EngineRackColumn, tempCCERC, tempCCERC.DisplayName() = column.Name() );
        cell      := select( macroPlan, CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() = "SUM" and tempCCERCell.CC_EngineRackColumn() = ccerc );
        if ( column.ColumnIndex() = 0 and cellValue <> "" ) {
          isUpdateFlag := cellValue;
        }
        if ( column.ColumnIndex() = 1 and cellValue <> "" ) {
          attributeUpdateFlag := cellValue;
        }
        if ( isUpdateFlag = "SUM" ) {
          if ( attributeUpdateFlag = "料架总数量"            and not isnull( cell ) ) {
            if ( not cell.IsUpdateTotalQuantityOfMaterialRacks() and cell.TotalQuantityOfMaterialRacks() <> [Real]cellValue ) {
              cell.IsUpdateTotalQuantityOfMaterialRacks( true );
            }
            cell.TotalQuantityOfMaterialRacks( [Real]cellValue );
          } else if ( attributeUpdateFlag = "空料架数量"     and not isnull( cell ) ) {
            if ( not cell.IsUpdateNumberOfEmptyShelves() and cell.NumberOfEmptyShelves() <> [Real]cellValue ) {
              cell.IsUpdateNumberOfEmptyShelves( true );
            }
            cell.NumberOfEmptyShelves( [Real]cellValue );
          } else if ( attributeUpdateFlag = "外租库入库费用" and not isnull( cell ) ) {
            if ( not cell.IsUpdateStorageFeesForRentedWarehouses() and cell.StorageFeesForRentedWarehouses() <> [Real]cellValue ) {
              cell.IsUpdateStorageFeesForRentedWarehouses( true );
            }
            cell.StorageFeesForRentedWarehouses( [Real]cellValue );
          } else if ( attributeUpdateFlag = "外租库出库费用" and not isnull( cell ) ) {
            if ( not cell.IsUpdateOutboundExpensesForRentedWarehouses() and cell.OutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
              cell.IsUpdateOutboundExpensesForRentedWarehouses( true );
            }
            cell.OutboundExpensesForRentedWarehouses( [Real]cellValue );
          } else if ( attributeUpdateFlag = "外租库运输费用" and not isnull( cell ) ) {
            if ( not cell.IsUpdateExternalRentalWarehouseTransportationCosts() and cell.ExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) {
              cell.IsUpdateExternalRentalWarehouseTransportationCosts( true );
            }
            cell.ExternalRentalWarehouseTransportationCosts( [Real]cellValue );
          } else if ( attributeUpdateFlag = "外租库仓储费用" and not isnull( cell ) ) {
            if ( not cell.IsUpdateRentalWarehouseStorageFees() and cell.RentalWarehouseStorageFees() <> [Real]cellValue ) {
              cell.IsUpdateRentalWarehouseStorageFees( true );
            }
            cell.RentalWarehouseStorageFees( [Real]cellValue );
          } else if ( attributeUpdateFlag = "清洗费用"       and not isnull( cell ) ) {
            if ( not cell.IsUpdateCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
              cell.IsUpdateCleaningCost( true );
            }
            cell.CleaningCost( [Real]cellValue );
          } else if ( attributeUpdateFlag = "预计总费用"     and not isnull( cell ) ) {
            if ( not cell.IsUpdateEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
              cell.IsUpdateEstimatedTotalCost( true );
            }
            cell.EstimatedTotalCost( [Real]cellValue );
          } else if ( attributeUpdateFlag = "系数"           and not isnull( cell ) ) {
            if ( not cell.IsUpdateCoefficient() and cell.Coefficient() <> [Real]cellValue ) {
              cell.IsUpdateCoefficient( true );
            }
            cell.Coefficient( [Real]cellValue );
          } else if ( attributeUpdateFlag = "总费用"         and not isnull( cell ) ) {
            if ( not cell.IsUpdateTotalCost() and cell.TotalCost() <> [Real]cellValue ) {
              cell.IsUpdateTotalCost( true );
            }
            cell.TotalCost( [Real]cellValue );
          }
        }
      }
    }
  *]
}
_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute DisplayName
{
  #keys: '3[415754.0.459254726][415754.0.459254725][415754.0.459254727]'
  Description: '列显示'
  ValueType: String
}
_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
Quintiq file version 2.0
#parent: #root
Function CalcDisplayName
{
  TextBody:
  [*
    value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) );
    this.DisplayName( value );
  *]
}
_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
  [*
    // lihongji Aug-12-2024 (created)
    
    value := this.Generation() + " " + this.MLB_MQB();
    value := this.Generation() + ifexpr( this.MLB_MQB() <> "", " " + this.MLB_MQB(), "" );
    
    this.Name( value );
  *]
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCCLineHaulCost
{
  #keys: '3[415754.0.459222291][415754.0.459222290][415754.0.459222292]'
  Description: 'CC长途运输费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCCOutboundExpensesForRentedWarehouses
{
  #keys: '3[415754.0.459256613][415754.0.459256612][415754.0.459256614]'
  Description: 'CC外租库出库费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCCRentalWarehouseStorageFees
{
  #keys: '3[415754.0.459256657][415754.0.459256656][415754.0.459256658]'
  Description: 'CC外租库仓储费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCCShortDistanceTransportationCosts
{
  #keys: '3[415754.0.459256731][415754.0.459256730][415754.0.459256732]'
  Description: 'CC短途运输费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCCStorageFeesForRentedWarehouses
{
  #keys: '3[415754.0.459256569][415754.0.459256568][415754.0.459256570]'
  Description: 'CC外租库入库费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCleaningCost
{
  #keys: '3[415754.0.459256981][415754.0.459256980][415754.0.459256982]'
  Description: '清洗费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCoefficient
{
  #keys: '3[415754.0.459257069][415754.0.459257068][415754.0.459257070]'
  Description: '系数更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsDLExternalRentalWarehouseTransportationCosts
{
  #keys: '3[415754.0.459256937][415754.0.459256936][415754.0.459256938]'
  Description: 'DL外租库运输费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsDLOutboundExpensesForRentedWarehouses
{
  #keys: '3[415754.0.459256863][415754.0.459256862][415754.0.459256864]'
  Description: 'DL外租库出库费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsDLRentalWarehouseStorageFees
{
  #keys: '3[415754.0.459256775][415754.0.459256774][415754.0.459256776]'
  Description: '外租库仓储费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsDLStorageFeesForRentedWarehouses
{
  #keys: '3[415754.0.459256819][415754.0.459256818][415754.0.459256820]'
  Description: 'DL外租库入库费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsEstimatedTotalCost
{
  #keys: '3[415754.0.459257025][415754.0.459257024][415754.0.459257026]'
  Description: '预计总费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsNumberOfEmptyShelves
{
  #keys: '3[415754.0.459256525][415754.0.459256524][415754.0.459256526]'
  Description: '空料架数量更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsTotalCost
{
  #keys: '3[415754.0.459257113][415754.0.459257112][415754.0.459257114]'
  Description: '总费用更新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsTotalQuantityOfMaterialRacks
{
  #keys: '3[415754.0.459222217][415754.0.459222216][415754.0.459222218]'
  Description: '料架总数量跟新值'
  ValueType: Boolean
}
_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
Quintiq file version 2.0
#parent: #root
Method SetTheTotalQuantity (
  Real totalQuantityOfMaterialRacks
)
{
  Description: '设置料架总数量'
  TextBody:
  [*
    this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
    // ç©ºæ–™æž¶æ•°é‡è”动
    this.NumberOfEmptyShelves( [Number] ( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() ) );
    // SUM行联动
    cell := select( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() = "SUM" );
    cell.TotalQuantityOfMaterialRacks( sum( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalQuantityOfMaterialRacks() ) );
    cell.NumberOfEmptyShelves( sum( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.NumberOfEmptyShelves() ) );
    // SUM列联动
    cell := select( this, DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackColumn().DisplayName() = "SUM" );
    cell.TotalQuantityOfMaterialRacks( sum( this,DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalQuantityOfMaterialRacks() ) );
    cell.NumberOfEmptyShelves( sum( this,DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.NumberOfEmptyShelves() ) );
  *]
}
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -59,6 +59,7 @@
                                 tempPISPIP.PlannedInventoryLevelEnd() );
        cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) );
        cell.PlannedInventory( plannedInventory );
        cell.NumberOfEmptyShelves( [Number] ( cell.TotalQuantityOfMaterialRacks() - guard( cell.PlannedInventory() / cell.PackagingCapacity(), 0 ) ) );
        
        // CC外租库入库费用:发动机销量 / åŒ…装容量(向上取整)* æ–™æž¶å…¥åº“单价
        transportationQuantity1 := sum( macroPlan, SalesDemand.astype( Forecast ), tempF, 
@@ -141,10 +142,56 @@
        cell.Coefficient( 1.05 );
        
        // æ€»è´¹ç”¨
        cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
        cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
                
        cell.DL_EngineRackColumn( relset, dlerc );
      }
    }
    // åˆ›å»ºSUM行
    sumR   := macroPlan.DL_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
    traverse ( macroPlan, DL_EngineRackColumn, dlerc ) {
      cell := sumR.DL_EngineRackCell( relnew );
      cell.DL_EngineRackColumn( relset, dlerc );
      cell.TotalQuantityOfMaterialRacks( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalQuantityOfMaterialRacks() ) );
      cell.NumberOfEmptyShelves( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.NumberOfEmptyShelves() ) );
      cell.CCStorageFeesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCStorageFeesForRentedWarehouses() ) );
      cell.CCOutboundExpensesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCOutboundExpensesForRentedWarehouses() ) );
      cell.CCRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCRentalWarehouseStorageFees() ) );
      cell.CCLineHaulCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCLineHaulCost() ) );
      cell.CCShortDistanceTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCShortDistanceTransportationCosts() ) );
      cell.DLStorageFeesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLStorageFeesForRentedWarehouses() ) );
      cell.DLOutboundExpensesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLOutboundExpensesForRentedWarehouses() ) );
      cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );
      cell.DLRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLRentalWarehouseStorageFees() ) );
      cell.CleaningCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CleaningCost() ) );
      cell.EstimatedTotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.EstimatedTotalCost() ) );
      cell.Coefficient( 1.05 );
      cell.TotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalCost() ) );
    }
    // åˆ›å»ºSUM列
    sumC   := macroPlan.DL_EngineRackColumn( relnew, StartDate := Date::MaxDate() );
    traverse ( macroPlan, DL_EngineRackRow, dlerr ) {
      cell := dlerr.DL_EngineRackCell( relnew );
      cell.DL_EngineRackColumn( relset, sumC );
      cell.TotalQuantityOfMaterialRacks( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalQuantityOfMaterialRacks() ) );
      cell.NumberOfEmptyShelves( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.NumberOfEmptyShelves() ) );
      cell.CCStorageFeesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCStorageFeesForRentedWarehouses() ) );
      cell.CCOutboundExpensesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCOutboundExpensesForRentedWarehouses() ) );
      cell.CCRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCRentalWarehouseStorageFees() ) );
      cell.CCLineHaulCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCLineHaulCost() ) );
      cell.CCShortDistanceTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCShortDistanceTransportationCosts() ) );
      cell.DLStorageFeesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLStorageFeesForRentedWarehouses() ) );
      cell.DLOutboundExpensesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLOutboundExpensesForRentedWarehouses() ) );
      cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );
      cell.DLRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLRentalWarehouseStorageFees() ) );
      cell.CleaningCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CleaningCost() ) );
      cell.EstimatedTotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.EstimatedTotalCost() ) );
      cell.Coefficient( 1.05 );
      cell.TotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalCost() ) );
    }
  *]
}
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,144 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Export (
  MacroPlan macroPlan
) as BinaryValue
{
  TextBody:
  [*
    xmlDOMI      := XMLDOMImplementation::Create();
    xmlDOM       := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name></table>' );
    tableElement := xmlDOM.GetElementByTagName( "table", 0 );
    // ç¬¬ä¸€åˆ—(名称)
    dlerrs      := selectsortedset( macroPlan, DL_EngineRackRow, tempDLERR, true, tempDLERR.Index(), tempDLERR.Name() );
    firstColumn := xmlDOM.CreateElement( "column" );
    firstName   := xmlDOM.CreateElement( "name" );
    firstType   := xmlDOM.CreateElement( "type" );
    firstName.TextContent( "*" );
    firstType.TextContent( "String" );
    firstColumn.AppendChild( firstName );
    firstColumn.AppendChild( firstType );
    traverse ( dlerrs, Elements, dlerr ) {
      firstCell := xmlDOM.CreateElement( "cell" );
      firstCell.SetAttribute( "value", dlerr.Name() );
      firstColumn.AppendChild( firstCell );
      for ( i := 0; i < 14; i++ ) {
        firstCell := xmlDOM.CreateElement( "cell" );
        firstCell.SetAttribute( "value", "" );
        firstColumn.AppendChild( firstCell );
      }
    }
    tableElement.AppendChild( firstColumn );
    // ç¬¬äºŒåˆ—
    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( "总费用" );
    secondColumn := xmlDOM.CreateElement( "column" );
    secondName   := xmlDOM.CreateElement( "name" );
    secondType   := xmlDOM.CreateElement( "type" );
    secondName.TextContent( "*" );
    secondType.TextContent( "String" );
    secondColumn.AppendChild( secondName );
    secondColumn.AppendChild( secondType );
    for ( i := 0; i < dlerrs.Size(); i++ ) {
      traverse ( attrs, Elements, attr ) {
        secondCell := xmlDOM.CreateElement( "cell" );
        secondCell.SetAttribute( "value", attr );
        secondColumn.AppendChild( secondCell );
      }
    }
    tableElement.AppendChild( secondColumn );
    // æ—¶é—´åˆ—
    dlercs := selectsortedset( macroPlan, DL_EngineRackColumn, tempDLERC, true, tempDLERC.StartDate() );
    traverse ( dlercs, Elements, dlerc ) {
      cellColumn := xmlDOM.CreateElement( "column" );
      cellName   := xmlDOM.CreateElement( "name" );
      cellType   := xmlDOM.CreateElement( "type" );
      cellName.TextContent( dlerc.DisplayName() );
      cellType.TextContent( "Real" );
      cellColumn.AppendChild( cellName );
      cellColumn.AppendChild( cellType );
      cells := selectsortedset( dlerc, DL_EngineRackCell, tempDLERCell, true, tempDLERCell.DL_EngineRackRow().Index(), tempDLERCell.DL_EngineRackRow().Name() );
      traverse ( cells, Elements, c ) {
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks().Round( 0 ) ); // æ–™æž¶æ€»æ•°é‡
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves().Round( 0 ) ); // ç©ºæ–™æž¶æ•°é‡
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCStorageFeesForRentedWarehouses().Round( 0 ) ); // CC外租库入库费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCOutboundExpensesForRentedWarehouses().Round( 0 ) ); // CC外租库出库费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCRentalWarehouseStorageFees().Round( 0 ) ); // CC外租库仓储费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // CC长途运输费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC短途运输费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.DLStorageFeesForRentedWarehouses().Round( 0 ) ); // DL外租库入库费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.DLOutboundExpensesForRentedWarehouses().Round( 0 ) ); // DL外租库出库费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.DLExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // DL外租库运输费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // å¤–租库仓储费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // æ¸…洗费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // é¢„计总费用
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // ç³»æ•°
        cellColumn.AppendChild( cell );
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // æ€»è´¹ç”¨
        cellColumn.AppendChild( cell );
      }
      tableElement.AppendChild( cellColumn );
    }
    xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM )
    //info( xmlString );
    tableGroupHandle := TableGroupHandle::Create( "Sheet1" );
    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
    tableGroupHandle.Add( tableHandle );
    binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
    return binaryData.AsBinaryValue();
  *]
}
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Import (
  MacroPlan macroPlan,
  GeneralExcelImportAndExportDataTable table
)
{
  TextBody:
  [*
    isUpdateFlag        := "";
    attributeUpdateFlag := "";
    traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
      traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
        // å•元格值
        cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
        // é•¿æ˜¥æ–™æž¶æŠ¥è¡¨åˆ—
        dlerc     := select( macroPlan, DL_EngineRackColumn, tempDLERC, tempDLERC.DisplayName() = column.Name() );
        cell      := select( macroPlan, DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() = "SUM" and tempDLERCell.DL_EngineRackColumn() = dlerc );
        if ( column.ColumnIndex() = 0 and cellValue <> "" ) {
          isUpdateFlag := cellValue;
        }
        if ( column.ColumnIndex() = 1 and cellValue <> "" ) {
          attributeUpdateFlag := cellValue;
        }
        if ( isUpdateFlag = "SUM" ) {
          info( "单元格值:", cellValue );
          if ( attributeUpdateFlag = "料架总数量"            and not isnull( cell ) ) {
            if ( not cell.IsTotalQuantityOfMaterialRacks() and cell.TotalQuantityOfMaterialRacks() <> [Real]cellValue ) {
              cell.IsTotalQuantityOfMaterialRacks( true );
            }
            cell.TotalQuantityOfMaterialRacks( [Real]cellValue );
          } else if ( attributeUpdateFlag = "空料架数量"     and not isnull( cell ) ) {
            if ( not cell.IsNumberOfEmptyShelves() and cell.NumberOfEmptyShelves() <> [Real]cellValue ) {
              cell.IsNumberOfEmptyShelves( true );
            }
            cell.NumberOfEmptyShelves( [Real]cellValue );
          } else if ( attributeUpdateFlag = "CC外租库入库费用" and not isnull( cell ) ) {
            if ( not cell.IsCCStorageFeesForRentedWarehouses() and cell.CCStorageFeesForRentedWarehouses() <> [Real]cellValue ) {
              cell.IsCCStorageFeesForRentedWarehouses( true );
            }
            cell.CCStorageFeesForRentedWarehouses( [Real]cellValue );
          } else if ( attributeUpdateFlag = "CC外租库出库费用" and not isnull( cell ) ) {
            if ( not cell.IsCCOutboundExpensesForRentedWarehouses() and cell.CCOutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
              cell.IsCCOutboundExpensesForRentedWarehouses( true );
            }
            cell.CCOutboundExpensesForRentedWarehouses( [Real]cellValue );
          } else if ( attributeUpdateFlag = "CC外租库仓储费用" and not isnull( cell ) ) {
            if ( not cell.IsCCRentalWarehouseStorageFees() and cell.CCRentalWarehouseStorageFees() <> [Real]cellValue ) {
              cell.IsCCRentalWarehouseStorageFees( true );
            }
            cell.CCRentalWarehouseStorageFees( [Real]cellValue );
          } else if ( attributeUpdateFlag = "CC长途运输费用" and not isnull( cell ) ) {
            if ( not cell.IsCCLineHaulCost() and cell.CCLineHaulCost() <> [Real]cellValue ) {
              cell.IsCCLineHaulCost( true );
            }
            cell.CCLineHaulCost( [Real]cellValue );
          } else if ( attributeUpdateFlag = "CC短途运输费用"       and not isnull( cell ) ) {
            if ( not cell.IsCCShortDistanceTransportationCosts() and cell.CCShortDistanceTransportationCosts() <> [Real]cellValue ) {
              cell.IsCCShortDistanceTransportationCosts( true );
            }
            cell.CCShortDistanceTransportationCosts( [Real]cellValue );
          } else if ( attributeUpdateFlag = "DL外租库入库费用"     and not isnull( cell ) ) {
            if ( not cell.IsDLStorageFeesForRentedWarehouses() and cell.DLStorageFeesForRentedWarehouses() <> [Real]cellValue ) {
              cell.IsDLStorageFeesForRentedWarehouses( true );
            }
            cell.DLStorageFeesForRentedWarehouses( [Real]cellValue );
          } else if ( attributeUpdateFlag = "DL外租库出库费用"           and not isnull( cell ) ) {
            if ( not cell.IsDLOutboundExpensesForRentedWarehouses() and cell.DLOutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
              cell.IsDLOutboundExpensesForRentedWarehouses( true );
            }
            cell.DLOutboundExpensesForRentedWarehouses( [Real]cellValue );
          } else if ( attributeUpdateFlag = "DL外租库运输费用"         and not isnull( cell ) ) {
            if ( not cell.IsDLExternalRentalWarehouseTransportationCosts() and cell.DLExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) {
              cell.IsDLExternalRentalWarehouseTransportationCosts( true );
            }
            cell.DLExternalRentalWarehouseTransportationCosts( [Real]cellValue );
          } else if ( attributeUpdateFlag = "外租库仓储费用"         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 ) ) {
            if ( not cell.IsCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
              cell.IsCleaningCost( true );
            }
            cell.CleaningCost( [Real]cellValue );
          } else if ( attributeUpdateFlag = "预计总费用"         and not isnull( cell ) ) {
            if ( not cell.IsEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
              cell.IsEstimatedTotalCost( true );
            }
            cell.EstimatedTotalCost( [Real]cellValue );
          } else if ( attributeUpdateFlag = "系数"         and not isnull( cell ) ) {
            if ( not cell.IsCoefficient() and cell.Coefficient() <> [Real]cellValue ) {
              cell.IsCoefficient( true );
            }
            cell.Coefficient( [Real]cellValue );
          } else if ( attributeUpdateFlag = "总费用"         and not isnull( cell ) ) {
            if ( not cell.IsTotalCost() and cell.TotalCost() <> [Real]cellValue ) {
              cell.IsTotalCost( true );
            }
            cell.TotalCost( [Real]cellValue );
          }
        }
      }
    }
  *]
}
_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute DisplayName
{
  #keys: '3[415754.0.459254782][415754.0.459254781][415754.0.459254783]'
  Description: '列显示'
  ValueType: String
}
_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
Quintiq file version 2.0
#parent: #root
Function CalcDisplayName
{
  TextBody:
  [*
    value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) );
    this.DisplayName( value );
  *]
}
_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Index
{
  #keys: '3[415754.0.459217915][415754.0.459217914][415754.0.459217916]'
  Description: '排序索引'
  ValueType: Number
}
_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
  [*
    // lihongji Aug-12-2024 (created)
    
    value := this.Generation() + " " + this.MLB_MQB();
    value := this.Generation() + ifexpr( this.MLB_MQB() <> "", " " + this.MLB_MQB(), "" );
    
    this.Name( value );
  *]
_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
@@ -6,6 +6,17 @@
  {
    AttributeKey: '[413988.0.1476832733]'
    Synonym: '清洗费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateCleaningCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation Coefficient
  {
@@ -13,6 +24,14 @@
    Synonym: '系数'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateCoefficient()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
    DataRepresentation.Default
    {
@@ -24,41 +43,129 @@
  {
    AttributeKey: '[413988.0.1476832743]'
    Synonym: '预计总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateEstimatedTotalCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation ExternalRentalWarehouseTransportationCosts
  {
    AttributeKey: '[413988.0.1476832710]'
    Synonym: '外租库运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateExternalRentalWarehouseTransportationCosts()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation NumberOfEmptyShelves
  {
    AttributeKey: '[413988.0.1476832677]'
    Synonym: '空料架数量'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateNumberOfEmptyShelves()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation OutboundExpensesForRentedWarehouses
  {
    AttributeKey: '[413988.0.1476832700]'
    Synonym: '外租库出库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateOutboundExpensesForRentedWarehouses()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation RentalWarehouseStorageFees
  {
    AttributeKey: '[413988.0.1476832723]'
    Synonym: '外租库仓储费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateRentalWarehouseStorageFees()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation StorageFeesForRentedWarehouses
  {
    AttributeKey: '[413988.0.1476832690]'
    Synonym: '外租库入库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateStorageFeesForRentedWarehouses()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation TotalCost
  {
    AttributeKey: '[413988.0.1476832756]'
    Synonym: '总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateTotalCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation TotalQuantityOfMaterialRacks
  {
    AttributeKey: '[413988.0.1476832664]'
    Synonym: '料架总数量'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateTotalQuantityOfMaterialRacks()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  RelationRepresentation CC_EngineRackColumn { RelationKey: '[413988.0.1476832593]' Visibility: 'Normal' }
}
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
@@ -6,31 +6,97 @@
  {
    AttributeKey: '[413988.0.1488160126]'
    Synonym: 'CC长途运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCCLineHaulCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCOutboundExpensesForRentedWarehouses
  {
    AttributeKey: '[413988.0.1488160087]'
    Synonym: 'CC外租库出库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCCOutboundExpensesForRentedWarehouses()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCRentalWarehouseStorageFees
  {
    AttributeKey: '[413988.0.1488160084]'
    Synonym: 'CC外租库仓储费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCCRentalWarehouseStorageFees()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCShortDistanceTransportationCosts
  {
    AttributeKey: '[413988.0.1488160139]'
    Synonym: 'CC短途运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCCShortDistanceTransportationCosts()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CCStorageFeesForRentedWarehouses
  {
    AttributeKey: '[413988.0.1488160081]'
    Synonym: 'CC外租库入库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCCStorageFeesForRentedWarehouses()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation CleaningCost
  {
    AttributeKey: '[413988.0.1488160069]'
    Synonym: '清洗费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCleaningCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation Coefficient
  {
@@ -38,6 +104,14 @@
    Synonym: '系数'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCoefficient()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
    DataRepresentation.Default
    {
@@ -49,41 +123,129 @@
  {
    AttributeKey: '[413988.0.1488160119]'
    Synonym: 'DL外租库运输费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsDLExternalRentalWarehouseTransportationCosts()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLOutboundExpensesForRentedWarehouses
  {
    AttributeKey: '[413988.0.1488160106]'
    Synonym: 'DL外租库出库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsDLOutboundExpensesForRentedWarehouses()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLRentalWarehouseStorageFees
  {
    AttributeKey: '[413988.0.1488160103]'
    Synonym: '外租库仓储费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsDLRentalWarehouseStorageFees()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation DLStorageFeesForRentedWarehouses
  {
    AttributeKey: '[413988.0.1488160100]'
    Synonym: 'DL外租库入库费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsDLStorageFeesForRentedWarehouses()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation EstimatedTotalCost
  {
    AttributeKey: '[413988.0.1488160066]'
    Synonym: '预计总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsEstimatedTotalCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation NumberOfEmptyShelves
  {
    AttributeKey: '[413988.0.1488160058]'
    Synonym: '空料架数量'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsNumberOfEmptyShelves()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation TotalCost
  {
    AttributeKey: '[413988.0.1488160072]'
    Synonym: '总费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsTotalCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation TotalQuantityOfMaterialRacks
  {
    AttributeKey: '[413988.0.1488160062]'
    Synonym: '料架总数量'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsTotalQuantityOfMaterialRacks()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  RelationRepresentation DL_EngineRackColumn { RelationKey: '[413988.0.1488132648]' Visibility: 'Normal' }
}
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
@@ -79,7 +79,7 @@
      ]
      Properties:
      [
        Legend: 'StartDate'
        Legend: 'DisplayName'
        SortCriteria: 'StartDate'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: MatrixEditor531
Response OnCheckEditability () id:Response_MatrixEditor531_OnCheckEditability
{
  #keys: '[415754.0.470111247]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
  QuillAction
  {
    Body:
    [*
      cond := focusedattribute = "TotalQuantityOfMaterialRacks";
      editinfo.CanEdit( cond );
      editinfo.UserHint( ifexpr( cond, "", "不能修改" ) );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: MatrixEditor531
Response OnUpdateValue (
  CC_EngineRackCell cell,
  Real value
) id:Response_MatrixEditor531_OnUpdateValue
{
  #keys: '[415754.0.469051167]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
  QuillAction
  {
    Body:
    [*
      cell.SetTheTotalQuantity( value );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
@@ -79,7 +79,7 @@
      ]
      Properties:
      [
        Legend: 'StartDate'
        Legend: 'DisplayName'
        SortCriteria: 'StartDate'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
@@ -15,6 +15,28 @@
        Taborder: 0
      ]
    }
    Component bImport id:bImport_549
    {
      #keys: '[415754.0.469011898]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Label: '导入'
        Taborder: 1
      ]
    }
    Component bExport id:bExport_715
    {
      #keys: '[415754.0.469011958]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 2
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: MatrixEditor392
Response OnCheckEditability () id:Response_MatrixEditor392_OnCheckEditability
{
  #keys: '[415754.0.469021886]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
  QuillAction
  {
    Body:
    [*
      cond := focusedattribute = "TotalQuantityOfMaterialRacks";
      editinfo.CanEdit( cond );
      editinfo.UserHint( ifexpr( cond, "", "不能修改" ) );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: MatrixEditor392
Response OnUpdateValue (
  DL_EngineRackCell cell,
  Real value
) id:Response_MatrixEditor392_OnUpdateValue
{
  #keys: '[415754.0.469021864]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
  QuillAction
  {
    Body:
    [*
      cell.SetTheTotalQuantity( value );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick#844.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: pHeader/bExport_715
Response OnClick () id:Response_pHeader_bExport_OnClick_844
{
  #keys: '[415754.0.469011957]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      binaryValue := DL_EngineRackCell::Export( MacroPlan );
      Application.Download( "大连发动机料架报表.xlsx", binaryValue.AsBinaryData() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick#593.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
Quintiq file version 2.0
#parent: pHeader/bImport_549
Response OnClick () id:Response_pHeader_bImport_OnClick_593
{
  #keys: '[415754.0.469011897]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      try {
        uploadJsonString := Application.GetFile();
        if ( uploadJsonString <> "" ) {
          uploadJson := JSON::Parse( uploadJsonString );
          Archive::VerifyTheFileName( uploadJson );
          fileName := uploadJson.Get( "name" ).GetString();
          base64String := uploadJson.Get( "data" ).GetString();
          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
          generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( RecycleBin, webFileBinaryData, fileName );
          generalExcelImportAndExportDataSource.ReadStructure();
          selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
          DL_EngineRackCell::Import( MacroPlan, selection );
          // åŽç»­åˆ é™¤
          generalExcelImportAndExportDataSource.Delete();
          WebMessageBox::Success( Translations::A_VWED_Success() );
        }
      } onerror {
        WebMessageBox::Error( e.GeneralInformation() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
@@ -27,6 +27,163 @@
          {
            sizeRatio: 1
          }
          FormDL_EngineRackReport_MatrixEditor392
          {
            gridColor: '#c4c4c4'
            totalHeaderWidth: 222
            attributeHeaderWidthRatio: 0.6
            nameHeaderWidthRatio: 0.4
            columnWidth: 100
            horizontalGrid: true
            verticalGrid: true
            backendState
            {
              componentId: 'QMacroPlanner::FormDL_EngineRackReport.MatrixEditor392'
              state
              {
                cells
                {
                  attributes
                  {
                    attribute_TotalQuantityOfMaterialRacks
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 0
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'TotalQuantityOfMaterialRacks'
                    }
                    attribute_NumberOfEmptyShelves
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 1
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'NumberOfEmptyShelves'
                    }
                    attribute_CCStorageFeesForRentedWarehouses
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 2
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'CCStorageFeesForRentedWarehouses'
                    }
                    attribute_CCOutboundExpensesForRentedWarehouses
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 3
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'CCOutboundExpensesForRentedWarehouses'
                    }
                    attribute_CCRentalWarehouseStorageFees
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 4
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'CCRentalWarehouseStorageFees'
                    }
                    attribute_CCLineHaulCost
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 5
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'CCLineHaulCost'
                    }
                    attribute_CCShortDistanceTransportationCosts
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 6
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'CCShortDistanceTransportationCosts'
                    }
                    attribute_DLStorageFeesForRentedWarehouses
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 7
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'DLStorageFeesForRentedWarehouses'
                    }
                    attribute_DLOutboundExpensesForRentedWarehouses
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 8
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'DLOutboundExpensesForRentedWarehouses'
                    }
                    attribute_DLExternalRentalWarehouseTransportationCosts
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 9
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'DLExternalRentalWarehouseTransportationCosts'
                    }
                    attribute_DLRentalWarehouseStorageFees
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 10
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'DLRentalWarehouseStorageFees'
                    }
                    attribute_CleaningCost
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 11
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'CleaningCost'
                    }
                    attribute_EstimatedTotalCost
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 12
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'EstimatedTotalCost'
                    }
                    attribute_Coefficient
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 13
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'Coefficient'
                    }
                    attribute_TotalCost
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 14
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'TotalCost'
                    }
                  }
                }
                columns
                {
                  sorting
                  {
                    criteria: "datamember:'StartDate'"
                  }
                }
                rows
                {
                  sorting
                  {
                    criteria: "datamember:'Name'"
                  }
                }
              }
            }
          }
        }
      }
      form_FormGeneralSettings