| | |
| | | // åå»ºè¡ |
| | | genrations := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() ); |
| | | mqbmlbs := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() ); |
| | | traverse ( genrations, Elements, g ) { |
| | | traverse ( mqbmlbs, Elements, m ) { |
| | | traverse ( genrations, Elements, g, g = "350bar" ) { |
| | | traverse ( mqbmlbs, Elements, m, m = "MQB" ) { |
| | | macroPlan.DL_EngineRackRow( relnew, Generation := g, MLB_MQB := m ); |
| | | } |
| | | } |
| | |
| | | plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().IsLeaf() and |
| | | exists( tempPISPIP.ProductInStockingPoint_MP().Product_MP(), AllParent.AsParent, tempPMP, tempPMP.ID() = "å卿º" ) and |
| | | tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = "大è¿å卿ºçé¿æ¥å¤ç§åº" and |
| | | //tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = "大è¿å卿ºçé¿æ¥å¤ç§åº" and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().Generation() = dlerr.Generation() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().MQBMLB() = dlerr.MLB_MQB() and |
| | | tempPISPIP.Start().Date() >= dlerc.StartDate() and |
| | | tempPISPIP.End().Date() <= lastDayOfThisMonth, |
| | | tempPISPIP.PlannedInventoryLevelEnd() ) / ( lastDayOfThisMonth - dlerc.StartDate() ); |
| | | tempPISPIP.Start().Date().Year() = dlerc.StartDate().Year() and |
| | | tempPISPIP.Start().Date().Month() = dlerc.StartDate().Month(), |
| | | tempPISPIP.PlannedInventoryLevelEnd() ) / ( dlerc.StartDate().StartOfNextMonth() - dlerc.StartDate() ); |
| | | cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) ); |
| | | cell.PlannedInventory( plannedInventory ); |
| | | cell.NumberOfEmptyShelves( [Number] guard( ( cell.TotalQuantityOfMaterialRacks() - guard( cell.PlannedInventory() / cell.PackagingCapacity(), 0 ) - guard( mrcc.Quantity(), 0 ) ) * guard( mrpc.Quantity(), 1 ), 0 ) ); |
| | |
| | | tempPIT.Quantity() |
| | | ); |
| | | // info( "æ°éï¼", transportationQuantity2 ); |
| | | cell.CCLineHaulCost( [Number] ( guard( transportationQuantity2 / lce.PackagingCapacity() / lct1.LoadingCapacity(), 0 ) * guard( lct1.TransportPrice(), 1 ) ) ); |
| | | cell.CCLineHaulCost( [Number] ( guard( ceil( ceil( transportationQuantity2 / lce.PackagingCapacity() ) / lct1.LoadingCapacity() ), 0 ) * guard( lct1.TransportPrice(), 1 ) ) ); |
| | | |
| | | // CCçéè¿è¾è´¹ç¨ï¼è°æ¨æ°é / å
è£
容é / è£
载容é * ææ¶è¿è¾åä»· |
| | | cell.CCShortDistanceTransportationCosts( [Number] ( guard( transportationQuantity1 / lce.PackagingCapacity() / lct3.LoadingCapacity(), 0 ) * guard( lct3.TransportPrice(), 1 ) ) ) |
| | |
| | | tempF.StartDate() >= ( dlerc.StartDate() - 2 ) and |
| | | tempF.StartDate() <= ( lastDayOfThisMonth - 2 ), |
| | | tempF.FulfilledQuantity() ); |
| | | // info( "æ¶é´ï¼", dlerc.StartDate().Format( "Y-M2-D2" ), " å
¥åºæ°éï¼", inventoryQuantity, " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ), |
| | | // " å
¥åºåä»·ï¼", guard( lcmr.WarehousingPrice(), 0 ) ); // æµè¯è¾åº |
| | | // info( "æ¶é´ï¼", dlerc.StartDate().Format( "Y-M2-D2" ), " æ¶é´åºåï¼", ( dlerc.StartDate() - 2 ).Format( "Y-M2-D2" ), " ", ( lastDayOfThisMonth - 2 ).Format( "Y-M2-D2" ), |
| | | // " å
¥åºæ°éï¼", inventoryQuantity, " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ), |
| | | // " å
¥åºåä»·ï¼", guard( lcmrDL.WarehousingPrice(), 0 ) ); // æµè¯è¾åº |
| | | cell.DLStorageFeesForRentedWarehouses( [Number] ( guard( inventoryQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmrDL.WarehousingPrice(), 1 ) ) ); |
| | | |
| | | // DLå¤ç§åºåºåºè´¹ç¨ï¼å卿ºåºåºé / ææ¶å®¹éï¼åä¸åæ´ï¼* ææ¶åºåºåä»· |
| | |
| | | tempPISPIPPL.Start().Date() >= dlerc.StartDate() and |
| | | tempPISPIPPL.End().Date() <= lastDayOfThisMonth, |
| | | tempPISPIPPL.NewSupplyQuantity() ); |
| | | // info( "æ°éï¼", outboundQuantity, " å
è£
èåï¼", guard( lce.PackagingCapacity(), 0 ), " åºåºåä»·ï¼", guard( lcmr.OutboundPrice(), 0 ) ); |
| | | // info( "æ°éï¼", outboundQuantity, " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ), " åºåºåä»·ï¼", guard( lcmr.OutboundPrice(), 0 ) ); |
| | | cell.DLOutboundExpensesForRentedWarehouses( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmrDL.OutboundPrice(), 1 ) ) ); |
| | | |
| | | // DLå¤ç§åºè¿è¾è´¹ç¨ï¼å卿ºè¿è¾é / å
è£
容é / è£
载容éï¼åä¸åæ´ï¼* ææ¶è¿è¾åä»· |
| | |
| | | tempPISPIPPL.ProductInStockingPoint_MP().Product_MP().Generation() = dlerr.Generation() and |
| | | tempPISPIPPL.ProductInStockingPoint_MP().Product_MP().MQBMLB() = dlerr.MLB_MQB() and |
| | | tempPISPIPPL.ProductInStockingPoint_MP().StockingPointID() = "大è¿å¤ç§åº" and |
| | | tempPISPIPPL.Start().Date() >= dlerc.StartDate() and |
| | | tempPISPIPPL.End().Date() <= lastDayOfThisMonth, |
| | | tempPISPIPPL.Start().Date().Year() = dlerc.StartDate().Year() and |
| | | tempPISPIPPL.Start().Date().Month() = dlerc.StartDate().Month(), |
| | | tempPISPIPPL.NewSupplyQuantity() ); |
| | | cell.DLExternalRentalWarehouseTransportationCosts( [Number] ( guard( outboundQuantity1 / lce.PackagingCapacity() / lct2.LoadingCapacity(), 0 ) * guard( lct2.TransportPrice(), 1 ) ) ); |
| | | // info( "æ°éï¼", outboundQuantity1, " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ), " è£
载容éï¼", guard( lct2.LoadingCapacity(), 0 ), " è¿è¾åä»·ï¼", guard( lct2.TransportPrice(), 1 ) ); |
| | | cell.DLExternalRentalWarehouseTransportationCosts( [Number] ( guard( ceil( ceil( outboundQuantity1 / lce.PackagingCapacity() ) / lct2.LoadingCapacity() ), 0 ) * guard( lct2.TransportPrice(), 1 ) ) ); |
| | | |
| | | // 大è¿å¤ç§åºä»å¨è´¹ç¨ï¼ã350bar MQBææ¶æ»æ°é-ææ350bar MQBæ»åºå/å
è£
容é-客æ·åºææ¶æ°éã*大è¿å¤ç§åºç©ºææ¶æ¯ä¾ |
| | | // DLå¤ç§åºä»å¨è´¹ç¨ï¼ææ¶æ»æ°é - å卿ºåºå / å
è£
容éï¼åä¸åæ´ï¼* ç©ºææ¶ä»å¨åä»· |
| | | plannedInventory1 := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().IsLeaf() and |
| | | exists( tempPISPIP.ProductInStockingPoint_MP().Product_MP(), AllParent.AsParent, tempPMP, tempPMP.ID() = "å卿º" ) and |
| | | tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = "大è¿å¤ç§åº" and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().Generation() = dlerr.Generation() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().MQBMLB() = dlerr.MLB_MQB() and |
| | | tempPISPIP.Start().Date() >= dlerc.StartDate() and |
| | | tempPISPIP.End().Date() <= lastDayOfThisMonth, |
| | | tempPISPIP.PlannedInventoryLevelEnd() ); |
| | | cell.DLRentalWarehouseStorageFees( [Number] guard( ( cell.TotalQuantityOfMaterialRacks() - guard( plannedInventory1 / lce.PackagingCapacity(), 0 ) - guard( mrcc.Quantity(), 0 ) ) * guard( mrpc.Quantity(), 1 ) * guard( lcmrDL.StoragePrice(), 1 ), 0 ) ); |
| | | // info( "ç©ºææ¶æ°éï¼", cell.TotalQuantityOfMaterialRacks(), " åºåï¼", cell.PlannedInventory(), " 天æ°ï¼", dlerc.StartDate().StartOfNextMonth() - dlerc.StartDate(), |
| | | // " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ) ); |
| | | cell.DLRentalWarehouseStorageFees( [Number] guard( ( cell.TotalQuantityOfMaterialRacks() - ceil( guard( cell.PlannedInventory() / lce.PackagingCapacity(), 0 ) ) - guard( mrcc.Quantity(), 0 ) ) * guard( mrpc.Quantity(), 1 ) * guard( lcmrDL.StoragePrice(), 1 ) * ( dlerc.StartDate().StartOfNextMonth() - dlerc.StartDate() ), 0 ) ); |
| | | |
| | | // CCå¤ç§åºæ¸
æ´è´¹ç¨ï¼å卿ºå
¥åºé / å
è£
容é * ææ¶æ¸
æ´åä»·ãå卿ºå
¥åºéåå卿ºééï¼å
è£
容éåèªå卿ºææ¬è¡¨ãææ¶æ¸
æ´åä»·åææ¶ææ¬è¡¨ã |
| | | clearnQuantity := sum( macroPlan, SalesDemand.astype( Forecast ), tempF, |
| | | tempF.Product_MP().Generation() = dlerr.Generation() and |
| | | tempF.Product_MP().MQBMLB() = dlerr.MLB_MQB() and |
| | | tempF.StockingPointID() = "大è¿å卿ºçé¿æ¥å¤ç§åº" and |
| | | tempF.StartDate().Year() = dlerc.StartDate().Year() and |
| | | tempF.StartDate().Month() = dlerc.StartDate().Month(), |
| | | tempF.Quantity() ); |
| | | // info( "æ°éï¼", clearnQuantity, " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ), " æ¸
æ´åä»·ï¼", guard( lcmr.CleanPrice(), 0 ) ); |
| | | cell.CCCleaningCost( [Number] ( guard( clearnQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmrCC.CleanPrice(), 1 ) ) ); |
| | | // info( "æ°éï¼", transportationQuantity1, " å
è£
容éï¼", guard( lce.PackagingCapacity(), 0 ), " æ¸
æ´åä»·ï¼", guard( lcmrCC.CleanPrice(), 0 ) ); |
| | | cell.CCCleaningCost( [Number] ( guard( transportationQuantity1 / lce.PackagingCapacity(), 0 ) * guard( lcmrCC.CleanPrice(), 1 ) ) ); |
| | | |
| | | // DLå¤ç§åºæ¸
æ´è´¹ç¨ï¼å卿ºå
¥åºé / å
è£
容é * ææ¶æ¸
æ´åä»·ãå卿ºå
¥åºéåå卿ºééï¼å
è£
容éåèªå卿ºææ¬è¡¨ãææ¶æ¸
æ´åä»·åææ¶ææ¬è¡¨ã |
| | | cell.CleaningCost( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmrDL.CleanPrice(), 1 ) ) ); |