xiaoding721
2024-10-21 4668a16a939a1d4d4fdfe11416158f8cd53a536d
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已添加48个文件
已修改18个文件
已删除1个文件
1934 ■■■■ 文件已修改
_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 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl 60 ●●●● 补丁 | 查看 | 原始文档 | 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/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement0.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement#817.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement#822.qbl 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement.qbl 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement0.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl 235 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_Download0.qbl 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_GetSearchRows.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/CC_EngineRackCell.qrp 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp 8 ●●●●● 补丁 | 查看 | 原始文档 | 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/CCEngineRackReport.vw 2 ●●● 补丁 | 查看 | 原始文档 | 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
¶Ô±ÈÐÂÎļþ
@@ -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, 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,34 +106,49 @@
                                 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 );
      }
    }
    
    // åˆ›å»ºSUM行
    sumR := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
    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/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
@@ -115,7 +115,7 @@
      ccsvaluesum           := ccsvaluesum + ccsvalue;
    }
    sumcolumn                 := table.FinancialWeeklyColumn( relnew, Name := 'SUM' );
    //cumulantcolumn            := table.FinancialWeeklyColumn( relnew, Name := '累计量' );
    cumulantcolumn            := table.FinancialWeeklyColumn( relnew, Name := '累计量' );
    proportioncolumn          := table.FinancialWeeklyColumn( relnew, Name := '占比' );
    //SUM
    totalpcellsum           := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( [Number]totalpvaluesum ) );
@@ -131,18 +131,18 @@
    ccscellsum              := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluesum );
    ccsales.FinancialWeeklyCell( relinsert, ccscellsum );
    //累计量
    //totalpcellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalpvaluecumulant );
    //totalproduction.FinancialWeeklyCell( relinsert, totalpcellcumulant );
    //dlpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlpvaluecumulant );
    //dlproduction.FinancialWeeklyCell( relinsert, dlpcellcumulant );
    //ccpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccpvaluecumulant );
    //ccproduction.FinancialWeeklyCell( relinsert, ccpcellcumulant );
    //totalscellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalsvaluecumulant );
    //totalsales.FinancialWeeklyCell( relinsert, totalscellcumulant );
    //dlscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlsvaluecumulant );
    //dlsales.FinancialWeeklyCell( relinsert, dlscellcumulant );
    //ccscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluecumulant );
    //ccsales.FinancialWeeklyCell( relinsert, ccscellcumulant );
    totalpcellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalpvaluecumulant );
    totalproduction.FinancialWeeklyCell( relinsert, totalpcellcumulant );
    dlpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlpvaluecumulant );
    dlproduction.FinancialWeeklyCell( relinsert, dlpcellcumulant );
    ccpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccpvaluecumulant );
    ccproduction.FinancialWeeklyCell( relinsert, ccpcellcumulant );
    totalscellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalsvaluecumulant );
    totalsales.FinancialWeeklyCell( relinsert, totalscellcumulant );
    dlscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlsvaluecumulant );
    dlsales.FinancialWeeklyCell( relinsert, dlscellcumulant );
    ccscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluecumulant );
    ccsales.FinancialWeeklyCell( relinsert, ccscellcumulant );
    //占比
    totalpvalueproportion   := guard( ( totalpvaluecumulant / totalpvaluesum ).Format( 'N(Dec(2))' ), '0.00' );
    totalpcellproportion    := proportioncolumn.FinancialWeeklyCell( relnew, Value := totalpvalueproportion );
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateCellElement (
  XMLDOMDocument xmlDOM,
  XMLDOMElement columnelement,
  String value
)
{
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    cellElement          := xmlDOM.CreateElement( "cell" );
    cellElement.SetAttribute( "value", value );
    columnelement.AppendChild( cellElement );
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement0.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateCellElement (
  XMLDOMDocument xmlDOM,
  XMLDOMElement columnelement,
  String value,
  Number rowsize
)
{
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    for( j := 0; j < rowsize; j := j + 1 ){
      cellElement          := xmlDOM.CreateElement( "cell" );
      cellElement.SetAttribute( "value", value );
      columnelement.AppendChild( cellElement );
    }
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement#817.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateColumnElement (
  XMLDOMElement xmltable,
  XMLDOMDocument xmlDOM,
  String name
) as XMLDOMElement
{
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    columnelement           := xmlDOM.CreateElement( "column" );
    nameelement             := xmlDOM.CreateElement( "name" );
    typeelement             := xmlDOM.CreateElement( "type" );
    nameelement.TextContent( name );
    typeelement.TextContent( "String" );
    columnelement.AppendChild( nameelement );
    columnelement.AppendChild( typeelement );
    xmltable.AppendChild( columnelement );
    return columnelement;
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement#822.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateColumnElement (
  XMLDOMElement xmltable,
  XMLDOMDocument xmlDOM,
  String value,
  String name,
  Number rowsize
) as XMLDOMElement
{
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    columnelement           := InventorySummarySource::CreateColumnElement( xmltable, xmlDOM, name );
    InventorySummarySource::CreateCellElement( xmlDOM, columnelement, value );
    for( i := 1; i < rowsize; i := i + 1 ){
      InventorySummarySource::CreateCellElement( xmlDOM, columnelement, '' );
    }
    return columnelement;
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateColumnElement (
  XMLDOMElement xmltable,
  XMLDOMDocument xmlDOM,
  Strings values,
  String name,
  Number rowsize
) as XMLDOMElement
{
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    columnelement           := InventorySummarySource::CreateColumnElement( xmltable, xmlDOM, name );
    for( i := 0; i < rowsize; i := i + 1 ){
      if( i < values.Size() ){
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, values.Element( i ) );
      }else{
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, '' );
      }
    }
    return columnelement;
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement0.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateColumnElement (
  XMLDOMElement xmltable,
  XMLDOMDocument xmlDOM,
  String name,
  Number rowsize
) as XMLDOMElement
{
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    columnelement           := InventorySummarySource::CreateColumnElement( xmltable, xmlDOM, '' );
    for( i := 0; i < rowsize; i := i + 1 ){
      InventorySummarySource::CreateCellElement( xmlDOM, columnelement, '' );
    }
    InventorySummarySource::CreateCellElement( xmlDOM, columnelement, name );
    return columnelement;
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl
@@ -12,116 +12,67 @@
  Description: '下载财务报表数据'
  TextBody:
  [*
    //获取查询行数
    searchrowsize               := InventorySummarySource::GetSearchRows( factorys, generations, powers, mlbmqls );
    table                       := selectobject( macroPlan, InventorySummarySource.InventorySummaryReport, table, table.IsShow() );
    
    xmlDOMI                     := XMLDOMImplementation::Create();
    xmlDOM                      := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
    
    tableElement                := xmlDOM.GetElementByTagName( "table", 0 );
    //Search
    searchcolumnelement         := xmlDOM.CreateElement( "column" );
    searchnameelement           := xmlDOM.CreateElement( "name" );
    searchtypeelement           := xmlDOM.CreateElement( "type" );
    searchnameelement.TextContent( 'Search' );
    searchtypeelement.TextContent( "String" );
    searchcolumnelement.AppendChild( searchnameelement );
    searchcolumnelement.AppendChild( searchtypeelement );
    //Product
    productcolumnelement        := xmlDOM.CreateElement( "column" );
    productnameelement          := xmlDOM.CreateElement( "name" );
    producttypeelement          := xmlDOM.CreateElement( "type" );
    productnameelement.TextContent( 'Product' );
    producttypeelement.TextContent( "String" );
    productcolumnelement.AppendChild( productnameelement );
    productcolumnelement.AppendChild( producttypeelement );
    //Unit
    unitcolumnelement           := xmlDOM.CreateElement( "column" );
    unitnameelement             := xmlDOM.CreateElement( "name" );
    unittypeelement             := xmlDOM.CreateElement( "type" );
    unitnameelement.TextContent( 'Unit' );
    unittypeelement.TextContent( "String" );
    unitcolumnelement.AppendChild( unitnameelement );
    unitcolumnelement.AppendChild( unittypeelement );
    //Attribute
    attricolumnelement          := xmlDOM.CreateElement( "column" );
    attrinameelement            := xmlDOM.CreateElement( "name" );
    attritypeelement            := xmlDOM.CreateElement( "type" );
    attrinameelement.TextContent( 'Attribute' );
    attritypeelement.TextContent( "String" );
    attricolumnelement.AppendChild( attrinameelement );
    attricolumnelement.AppendChild( attritypeelement );
    //Product/Unit
    factoryvalues               := selectuniquevalues( factorys, Elements, factory, factory.Name() );
    productcolumnelement        := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, factoryvalues, 'Unit', searchrowsize );
    InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, 'Product' );
    //Unit/Generation
    generationvalues            := selectuniquevalues( generations, Elements, generation, generation.Generation() );
    unitcolumnelement           := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, generationvalues, 'Generation', searchrowsize );
    InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, 'Unit' );
    //Attribute/Power
    powervalues                 := selectuniquevalues( powers, Elements, power, power.Power() );
    attricolumnelement          := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, powervalues, 'Power', searchrowsize );
    InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, 'Attribute' );
    //MLBMQBS
    mlbmqbvalues                := selectuniquevalues( mlbmqls, Elements, mlbmqb, mlbmqb.MLBMQB() );
    mlbmqlcolumnelement         := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, mlbmqbvalues, 'MLBMQB', searchrowsize );
    //Start date
    startcolumnelement          := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, search.StartDate().Format( 'M2/D2/Y' ), 'Start date', searchrowsize );
    //End date
    endcolumnelement            := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, search.EndDate().Format( 'M2/D2/Y' ), 'End date', searchrowsize );
    //Period
    periodcolumnelement         := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, search.Category(), 'Period', searchrowsize );
    
    tableElement.AppendChild( searchcolumnelement );
    tableElement.AppendChild( productcolumnelement );
    tableElement.AppendChild( unitcolumnelement );
    tableElement.AppendChild( attricolumnelement );
    searchtotal                 := factorys.Size() + generations.Size() + powers.Size() + mlbmqls.Size() + 10 ;
    searchunitElement           := xmlDOM.CreateElement( "cell" );
    searchunitElement.SetAttribute( "value", 'Unit' );
    searchcolumnelement.AppendChild( searchunitElement );
    traverse( factorys, Elements, factory ){
      searchunitcellElement     := xmlDOM.CreateElement( "cell" );
      searchunitcellElement.SetAttribute( "value", factory.Name() );
      searchcolumnelement.AppendChild( searchunitcellElement );
    }
    searchgenerationElement     := xmlDOM.CreateElement( "cell" );
    searchgenerationElement.SetAttribute( "value", 'Generation' );
    searchcolumnelement.AppendChild( searchgenerationElement );
    traverse( generations, Elements, generation ){
      generationcellElement     := xmlDOM.CreateElement( "cell" );
      generationcellElement.SetAttribute( "value", generation.Generation() );
      searchcolumnelement.AppendChild( generationcellElement );
    }
    searchpowerElement          := xmlDOM.CreateElement( "cell" );
    searchpowerElement.SetAttribute( "value", 'Power' );
    searchcolumnelement.AppendChild( searchpowerElement );
    traverse( powers, Elements, power ){
      searchpowercellElement    := xmlDOM.CreateElement( "cell" );
      searchpowercellElement.SetAttribute( "value", power.Power() );
      searchcolumnelement.AppendChild( searchpowercellElement );
    }
    searchmlbmqlElement         := xmlDOM.CreateElement( "cell" );
    searchmlbmqlElement.SetAttribute( "value", 'MQBMLB' );
    searchcolumnelement.AppendChild( searchmlbmqlElement );
    traverse( mlbmqls, Elements, mlbmql ){
      searchmlbmqlcellElement   := xmlDOM.CreateElement( "cell" );
      searchmlbmqlcellElement.SetAttribute( "value", mlbmql.MLBMQB() );
      searchcolumnelement.AppendChild( searchmlbmqlcellElement );
    }
    searchstartdateElement      := xmlDOM.CreateElement( "cell" );
    searchstartdateElement.SetAttribute( "value", 'Start date' );
    searchcolumnelement.AppendChild( searchstartdateElement );
    searchstartdatecellElement  := xmlDOM.CreateElement( "cell" );
    searchstartdatecellElement.SetAttribute( "value", search.StartDate().Format( 'M2/D2/Y' ) );
    searchcolumnelement.AppendChild( searchstartdatecellElement );
    searchenddateElement        := xmlDOM.CreateElement( "cell" );
    searchenddateElement.SetAttribute( "value", 'End date' );
    searchcolumnelement.AppendChild( searchenddateElement );
    searchenddatecellElement    := xmlDOM.CreateElement( "cell" );
    searchenddatecellElement.SetAttribute( "value", search.EndDate().Format( 'M2/D2/Y' ) );
    searchcolumnelement.AppendChild( searchenddatecellElement );
    searchperiodElement         := xmlDOM.CreateElement( "cell" );
    searchperiodElement.SetAttribute( "value", 'Periods' );
    searchcolumnelement.AppendChild( searchperiodElement );
    searchperiodcellElement     := xmlDOM.CreateElement( "cell" );
    searchperiodcellElement.SetAttribute( "value", search.Category() );
    searchcolumnelement.AppendChild( searchperiodcellElement );
    for( i := searchtotal; i < table.InventroySummaryRow( relsize ) * 4; i := i + 1 ){
      searchcellElement         := xmlDOM.CreateElement( "cell" );
      searchcellElement.SetAttribute( "value", '' );
      searchcolumnelement.AppendChild( searchcellElement );
    searchcolumn                := 7 ;
    rowsize                     := table.InventroySummaryRow( relsize ) * 4;
    for( i := table.InventorySummaryColumn( relsize ); i < searchcolumn - 3; i := i + 1 ){
      if( i = 0 ){
        InventorySummarySource::CreateCellElement( xmlDOM, mlbmqlcolumnelement, '', rowsize );
      }else if( i = 1 ){
        InventorySummarySource::CreateCellElement( xmlDOM, startcolumnelement, '', rowsize );
      }else if( i = 2 ){
        InventorySummarySource::CreateCellElement( xmlDOM, endcolumnelement, '', rowsize );
      }else if( i = 3 ){
        InventorySummarySource::CreateCellElement( xmlDOM, periodcolumnelement, '', rowsize );
      }
    }
    
    traverse ( table, InventorySummaryColumn, column ) {
      columnelement             := xmlDOM.CreateElement( "column" );
      nameelement               := xmlDOM.CreateElement( "name" );
      typeelement               := xmlDOM.CreateElement( "type" );
      nameelement.TextContent( column.Name() );
      typeelement.TextContent( "String" );
      columnelement.AppendChild( nameelement );
      columnelement.AppendChild( typeelement );
      columnelement             := null( XMLDOMElement );
      if( column.Index() = 0 ){
        columnelement           := mlbmqlcolumnelement;
        InventorySummarySource::CreateCellElement( xmlDOM, mlbmqlcolumnelement, column.Name() );
      }else if( column.Index() = 1 ){
        columnelement           := startcolumnelement
        InventorySummarySource::CreateCellElement( xmlDOM, startcolumnelement, column.Name() );
      }else if( column.Index() = 2 ){
        columnelement           := endcolumnelement;
        InventorySummarySource::CreateCellElement( xmlDOM, endcolumnelement, column.Name() );
      }else if( column.Index() = 3 ){
        columnelement           := periodcolumnelement;
        InventorySummarySource::CreateCellElement( xmlDOM, periodcolumnelement, column.Name() );
      }else{
        columnelement           := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name(), rowsize );
      }
      
      cells                     := selectsortedset( column, InventorySummaryCell, cell, cell.InventroySummaryRow().RowNr() );
    
@@ -129,86 +80,36 @@
        if( column.Index() = 0 ){
          row                   := c.InventroySummaryRow();
          //Product
          productcellElement1   := xmlDOM.CreateElement( "cell" );
          productcellElement1.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement1 );
          productcellElement2   := xmlDOM.CreateElement( "cell" );
          productcellElement2.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement2 );
          productcellElement3   := xmlDOM.CreateElement( "cell" );
          productcellElement3.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement3 );
          productcellElement4   := xmlDOM.CreateElement( "cell" );
          productcellElement4.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement4 );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          //Unit
          unitcellElement1      := xmlDOM.CreateElement( "cell" );
          unitcellElement1.SetAttribute( "value", row.Unit() );
          unitcolumnelement.AppendChild( unitcellElement1 );
          unitcellElement2      := xmlDOM.CreateElement( "cell" );
          unitcellElement2.SetAttribute( "value", row.Unit() );
          unitcolumnelement.AppendChild( unitcellElement2 );
          unitcellElement3      := xmlDOM.CreateElement( "cell" );
          unitcellElement3.SetAttribute( "value", row.Unit() );
          unitcolumnelement.AppendChild( unitcellElement3 );
          unitcellElement4      := xmlDOM.CreateElement( "cell" );
          unitcellElement4.SetAttribute( "value", row.Unit() );
          unitcolumnelement.AppendChild( unitcellElement4 );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          //Attribute
          //期末库存
          endcellElement        := xmlDOM.CreateElement( "cell" );
          endcellElement.SetAttribute( "value", '期末库存' );//EndingInventory
          attricolumnelement.AppendChild( endcellElement );
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '期末库存' );//EndingInventory
          //最小库存
          mincellElement        := xmlDOM.CreateElement( "cell" );
          mincellElement.SetAttribute( "value", '最小库存' );//MinimumInventory
          attricolumnelement.AppendChild( mincellElement );
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '最小库存' );//MinimumInventory
          //最大库存
          maxcellElement        := xmlDOM.CreateElement( "cell" );
          maxcellElement.SetAttribute( "value", '最大库存' );//MaximumInventory
          attricolumnelement.AppendChild( maxcellElement );
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '最大库存' );//MaximumInventory
          //平均库存
          avecellElement        := xmlDOM.CreateElement( "cell" );
          avecellElement.SetAttribute( "value", '平均库存' );//AverageInventory
          attricolumnelement.AppendChild( avecellElement );
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '平均库存' );//AverageInventory
    
        }
        //期末库存
        endcellElement          := xmlDOM.CreateElement( "cell" );
        endcellElement.SetAttribute( "value", [String]c.EndingInventory() );
        columnelement.AppendChild( endcellElement );
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.EndingInventory() );
        //最小库存
        mincellElement          := xmlDOM.CreateElement( "cell" );
        mincellElement.SetAttribute( "value", [String]c.MinimumInventory() );
        columnelement.AppendChild( mincellElement );
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MinimumInventory() );
        //最大库存
        maxcellElement          := xmlDOM.CreateElement( "cell" );
        maxcellElement.SetAttribute( "value", [String]c.MaximumInventory() );
        columnelement.AppendChild( maxcellElement );
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MaximumInventory() );
        //平均库存
        avecellElement          := xmlDOM.CreateElement( "cell" );
        avecellElement.SetAttribute( "value", [String]c.AverageInventory() );
        columnelement.AppendChild( avecellElement );
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.AverageInventory() );
      }
      for( i := cells.Size() * 4; i < searchtotal; i := i + 1 ){
        searchcellElement       := xmlDOM.CreateElement( "cell" );
        searchcellElement.SetAttribute( "value", '' );
        columnelement.AppendChild( searchcellElement );
        if( column.Index() = 0 ){
          productcellElement    := xmlDOM.CreateElement( "cell" );
          productcellElement.SetAttribute( "value", '' );
          productcolumnelement.AppendChild( productcellElement );
          unitcellElement       := xmlDOM.CreateElement( "cell" );
          unitcellElement.SetAttribute( "value", '' );
          unitcolumnelement.AppendChild( unitcellElement );
          endcellElement        := xmlDOM.CreateElement( "cell" );
          endcellElement.SetAttribute( "value", '' );//EndingInventory
          attricolumnelement.AppendChild( endcellElement );
        }
      }
      tableElement.AppendChild( columnelement );  
    }
    
_Main/BL/Type_InventorySummarySource/StaticMethod_Download0.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Download0 (
  MacroPlan macroPlan,
  Factorys factorys,
  ProductGenerations generations,
  ProductPowers powers,
  ProductMLBMQBs mlbmqls,
  InventorySummarySearch search
) as BinaryValue
{
  Description: '下载财务报表数据'
  TextBody:
  [*
    //获取查询行数
    searchrowsize               := InventorySummarySource::GetSearchRows( factorys, generations, powers, mlbmqls );
    table                       := selectobject( macroPlan, InventorySummarySource.InventorySummaryReport, table, table.IsShow() );
    xmlDOMI                     := XMLDOMImplementation::Create();
    xmlDOM                      := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
    tableElement                := xmlDOM.GetElementByTagName( "table", 0 );
    //Product
    productcolumnelement        := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Product' );
    //Unit
    unitcolumnelement           := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Unit' );
    //Attribute
    attricolumnelement          := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Attribute' );
    traverse ( table, InventorySummaryColumn, column ) {
      columnelement             := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name() );
      cells                     := selectsortedset( column, InventorySummaryCell, cell, cell.InventroySummaryRow().RowNr() );
      traverse ( cells, Elements, c ) {
        if( column.Index() = 0 ){
          row                   := c.InventroySummaryRow();
          //Product
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
          //Unit
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
          //Attribute
          //期末库存
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '期末库存' );//EndingInventory
          //最小库存
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '最小库存' );//MinimumInventory
          //最大库存
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '最大库存' );//MaximumInventory
          //平均库存
          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '平均库存' );//AverageInventory
        }
        //期末库存
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.EndingInventory() );
        //最小库存
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MinimumInventory() );
        //最大库存
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MaximumInventory() );
        //平均库存
        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.AverageInventory() );
      }
      tableElement.AppendChild( columnelement );
    }
    searchxmlDOM                := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + 'Search' + '</name></table>' );
    searchElement               := searchxmlDOM.GetElementByTagName( "table", 0 );
    //Unit
    factoryvalues               := selectuniquevalues( factorys, Elements, factory, factory.Name() );
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, factoryvalues, 'Unit', searchrowsize );
    //Generation
    generationvalues            := selectuniquevalues( generations, Elements, generation, generation.Generation() );
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, generationvalues, 'Generation', searchrowsize );
    //Power
    powervalues                 := selectuniquevalues( powers, Elements, power, power.Power() );
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, powervalues, 'Power', searchrowsize );
    //MLBMQBS
    mlbmqbvalues                := selectuniquevalues( mlbmqls, Elements, mlbmqb, mlbmqb.MLBMQB() );
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, mlbmqbvalues, 'MLBMQB', searchrowsize );
    //Start date
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, search.StartDate().Format( 'M2/D2/Y' ), 'Start date', searchrowsize );
    //End date
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, search.EndDate().Format( 'M2/D2/Y' ), 'End date', searchrowsize );
    //Period
    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, search.Category(), 'Period', searchrowsize );
    xmlString                   := xmlDOMI.CreateSerializer().WriteToString( xmlDOM );
    tableGroupHandle            := TableGroupHandle::Create( InventorySummaryReport::GetDefaultName() );
    tableHandle                 := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
    tableGroupHandle.Add( tableHandle );
    searchxmlString                   := xmlDOMI.CreateSerializer().WriteToString( searchxmlDOM );
    searchtableHandle                 := TableHandle::ImportXML( BinaryValue::Construct( searchxmlString ) );
    tableGroupHandle.Add( searchtableHandle );
    binaryData                  := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
    return binaryData.AsBinaryValue();
  *]
}
_Main/BL/Type_InventorySummarySource/StaticMethod_GetSearchRows.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSearchRows (
  Factorys factorys,
  ProductGenerations generations,
  ProductPowers powers,
  ProductMLBMQBs mlbmqls
) as Number
{
  Description: '获取查询条件行数'
  TextBody:
  [*
    // ç”„兰鸽 Oct-18-2024 (created)
    searchrows                  := construct( Numbers );
    searchrows.Add( factorys.Size() );
    searchrows.Add( generations.Size() );
    searchrows.Add( powers.Size() );
    searchrows.Add( mlbmqls.Size() );
    searchrowsize               := max( searchrows, Elements, e, e );
    return searchrowsize;
  *]
}
_Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl
@@ -2,5 +2,5 @@
#parent: #root
Method WholeShiftFiltering () declarative remote as Boolean
{
  TextBody: 'return this.HasCapacityTypeTime() or this.HasCapacityTypeTransportQuantity();'
  TextBody: 'return this.HasCapacityTypeTime() or ( this.HasCapacityTypeTransportQuantity() and this.Name().Regex( "Transport" ) );'
}
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl
@@ -8,27 +8,17 @@
  Description: '车道整班'
  TextBody:
  [*
    traverse ( unit, Lane.LaneLeg.Trip, t ) {
      traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 ) {
        info( pit.Product_MP().ParentID() );
        // èŽ·å–äº§å“lotsize倍数
        lotsize := 1;
        if ( pit.Product_MP().ParentID().Regex( "ZKG" ) ) {
          lotsize := macroPlan.CylinderBlock();
        } else if ( pit.Product_MP().ParentID().Regex( "ZKM" ) ) {
          lotsize := macroPlan.CylinderHead();
        } else if ( pit.Product_MP().ParentID().Regex( "PL" ) ) {
          lotsize := macroPlan.ConnectingRod();
        } else if ( pit.Product_MP().ParentID().Regex( "KW" ) ) {
          lotsize := macroPlan.Crankshaft();
        } else if ( pit.Product_MP().ParentID().Regex( "AGW" ) ) {
          lotsize := macroPlan.BalanceAxis();
        }
        if ( lotsize > 1 ) {
          debuginfo( "产品ID:", pit.ProductID(), "    äº§å“æ•°é‡ï¼š", pit.Quantity(), "    lotsize:", lotsize );
          quantityToBeSupplemented := lotsize - ( pit.Quantity() mod lotsize );
          pit.Update( pit.Quantity() + quantityToBeSupplemented, true );
    us  := unit.Name().Tokenize( " " );
    tmq := select( macroPlan, TransferMinimumQuantity, tempTMQ, tempTMQ.FactoryAbbreviation() = us.Element( 0 ) and tempTMQ.ProductID() = us.Element( 3 ) );
    if ( not isnull( tmq ) ) {
    //  info( "最小包装lotsize:", tmq.Quantity() );
      traverse ( unit, Lane.LaneLeg.Trip, t ) {
        needRoundTransferQuantity := tmq.Quantity() - ( [Number]t.Quantity() mod tmq.Quantity() );
        if ( needRoundTransferQuantity <> 0 and needRoundTransferQuantity <> tmq.Quantity() ) {
    //      info( "时间:", t.Departure().Date().Format( "Y-M2-D2" ), "    ä½™æ•°ï¼š", needRoundTransferQuantity );
          pit := minselect( t, ProductInTrip, tempPIT, tempPIT.Quantity() > 0, tempPIT.Quantity() );
          pit.Update( pit.Quantity() + needRoundTransferQuantity, true );
        }
      }
    }
_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
@@ -6,51 +6,166 @@
  {
    AttributeKey: '[413988.0.1476832733]'
    Synonym: '清洗费用'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateCleaningCost()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
  }
  AttributeRepresentation Coefficient
  {
    AttributeKey: '[413988.0.1476832766]'
    Synonym: '系数'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsUpdateCoefficient()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
    DataRepresentation.Default
    {
      FormatString: 'N(Dec(2))'
      InheritFormatting: false
    }
  }
  AttributeRepresentation EstimatedTotalCost
  {
    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,76 +6,246 @@
  {
    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
  {
    AttributeKey: '[413988.0.1488160075]'
    Synonym: '系数'
    Conditional:
    [
      DataRepresentation.Conditional
      {
        BackgroundColor: '$FF3399'
        ConditionBody: 'object.IsCoefficient()'
        ConversionBody: ''
        DefaultBackgroundColor: false
        InheritConversion: false
      }
    ]
    DataRepresentation.Default
    {
      FormatString: 'N(Dec(2))'
      InheritFormatting: false
    }
  }
  AttributeRepresentation DLExternalRentalWarehouseTransportationCosts
  {
    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/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
@@ -11,6 +11,14 @@
  {
    AttributeKey: '[413988.0.1462991559]'
    Synonym: '系数'
    Conditional:
    [
    ]
    DataRepresentation.Default
    {
      FormatString: 'N(Dec(2))'
      InheritFormatting: false
    }
  }
  AttributeRepresentation EstimatedTotalCost
  {
_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/CCEngineRackReport.vw
@@ -30,7 +30,7 @@
          FormCC_EngineRackReport_MatrixEditor531
          {
            gridColor: '#c4c4c4'
            totalHeaderWidth: 500
            totalHeaderWidth: 214
            attributeHeaderWidthRatio: 0.6
            nameHeaderWidthRatio: 0.4
            columnWidth: 100
_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