| | |
| | | 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, |
| | |
| | | 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() ) ); |
| | | } |
| | | *] |
| | | } |