| | |
| | | macroPlan.CC_EngineRackRow( relflush ); |
| | | macroPlan.CC_EngineRackColumn( relflush ); |
| | | |
| | | // å建è¡EVO5 MLB, EVO5 MQB, GEN3 MLB, GEN3 MQB |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MLB" ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MQB" ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MLB" ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MQB" ); |
| | | // åå»ºè¡ |
| | | 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, g.ToUpper() = "EVO5" or g.ToUpper() = "GEN3" ) { |
| | | traverse ( mqbmlbs, Elements, m, m.ToUpper() = "MLB" or m.ToUpper() = "MQB" ) { |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := g, MLB_MQB := m ); |
| | | } |
| | | } |
| | | |
| | | // å建å |
| | | indexDate := macroPlan.StartOfPlanning().Date().StartOfMonth(); |
| | |
| | | |
| | | // å建åå
æ ¼ |
| | | traverse ( macroPlan, CC_EngineRackRow, ccerr ) { |
| | | |
| | | // å卿ºææ¬åæ° |
| | | lce := select( macroPlan, LogisticsCostEngine, tempLCE, tempLCE.Generation() = ccerr.Generation() and tempLCE.MLB_MQB() = ccerr.MLB_MQB() and tempLCE.Factory() = "é¿æ¥å·¥å" ); |
| | | |
| | | // ææ¶ææ¬åæ° |
| | | lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "é¿æ¥å·¥å" ); |
| | | |
| | | traverse ( macroPlan, CC_EngineRackColumn, ccerc ) { |
| | | cell := ccerr.CC_EngineRackCell( relnew ); |
| | | |
| | | // ç©ºææ¶æ°éï¼é¿æ¥å该产åçææ¶æ»æ°é - å卿ºåºå / å
è£
容é ï¼ |
| | | lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1; |
| | | plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().IsLeaf() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().ParentID() = "产æå" and |
| | | tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = "é¿æ¥å¤ç§åº" and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().Generation() = ccerr.Generation() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().MQBMLB() = ccerr.MLB_MQB() and |
| | | tempPISPIP.Start().Date() = lastDayOfThisMonth, |
| | | tempPISPIP.PlannedInventoryLevelEnd() ); |
| | | cell.PackagingCapacity( guard( lce.PackagingCapacity(), 0 ) ); |
| | | cell.PlannedInventory( plannedInventory ); |
| | | |
| | | // å¤ç§åºå
¥åºè´¹ç¨ï¼å卿ºéé / å
è£
容é[åä¸åæ´] * ææ¶å
¥åºåä»·ï¼ |
| | | engineSales := sum( macroPlan, FSImportData, tempFSID, |
| | | tempFSID.Unit() = "é¿æ¥å·¥å" and |
| | | tempFSID.Generation() = ccerr.Generation() and |
| | | tempFSID.MqbMlb() = ccerr.MLB_MQB() and |
| | | tempFSID.StartDate().Year() = ccerc.StartDate().Year() and |
| | | tempFSID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFSID.Quantity() ); |
| | | cell.StorageFeesForRentedWarehouses( guard( [Number] ( engineSales / guard( lce.PackagingCapacity(), 0 ) ) * guard( lcmr.WarehousingPrice(), 0 ), 0 ) ); |
| | | |
| | | // å¤ç§åºåºåºè´¹ç¨ï¼å卿ºäº§é / å
è£
容é[åä¸åæ´] * ææ¶åºåºåä»·ï¼ |
| | | engineProductions := sum( macroPlan, FPImportData, tempFPID, |
| | | tempFPID.Unit() = "é¿æ¥å·¥å" and |
| | | tempFPID.Generation() = ccerr.Generation() and |
| | | tempFPID.MqbMlb() = ccerr.MLB_MQB() and |
| | | tempFPID.StartDate().Year() = ccerc.StartDate().Year() and |
| | | tempFPID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFPID.Quantity() ); |
| | | cell.OutboundExpensesForRentedWarehouses( guard( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 0 ) ) * guard( lcmr.OutboundPrice(), 0 ), 0 ) ); |
| | | |
| | | // å¤ç§åºè¿è¾è´¹ç¨ï¼å卿ºè¿è¾é/å
è£
容é/è£
载容éï¼åä¸åæ´ï¼*ææ¶è¿è¾åä»· |
| | | // å¤ç§åºä»å¨è´¹ç¨ï¼ææ¶æ»æ°é-å卿ºåºå/å
è£
容éï¼åä¸åæ´ï¼ï¼åä¹ä»¥ç©ºææ¶ä»å¨åä»·å¾å°ç©ºææ¶ä»å¨è´¹ç¨ãå卿ºåºååActual inventorieséåå°é¿æ¥å¤ç§åºè¯¥å卿ºçä»å¨éï¼ææ¶æ»æ°ééè¦æå¨ç»´æ¤ã |
| | | // æ¸
æ´è´¹ç¨ï¼å卿ºå
¥åºé/å
è£
容é*ææ¶æ¸
æ´åä»·ãå卿ºå
¥åºéåå卿ºééï¼å
è£
容éåèªå卿ºææ¬è¡¨ãææ¶æ¸
æ´åä»·åææ¶ææ¬è¡¨ã |
| | | |
| | | cell.CC_EngineRackColumn( relset, ccerc ); |
| | | } |
| | | } |
| | | *] |