| | |
| | | macroPlan.DL_EngineRackRow( relflush ); |
| | | macroPlan.DL_EngineRackColumn( relflush ); |
| | | |
| | | // 创建行EVO5 MLB, EVO5 MQB, GEN3 MLB, GEN3 MQB |
| | | macroPlan.DL_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MLB" ); |
| | | macroPlan.DL_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MQB" ); |
| | | macroPlan.DL_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MLB" ); |
| | | macroPlan.DL_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 ) { |
| | | traverse ( mqbmlbs, Elements, m ) { |
| | | macroPlan.DL_EngineRackRow( relnew, Generation := g, MLB_MQB := m ); |
| | | } |
| | | } |
| | | |
| | | // 创建列 |
| | | indexDate := macroPlan.StartOfPlanning().Date().StartOfMonth(); |
| | |
| | | } |
| | | |
| | | // 创建单元格 |
| | | traverse ( macroPlan, DL_EngineRackRow, dlerr ) { |
| | | traverse ( macroPlan, DL_EngineRackColumn, dlerc ) { |
| | | traverse ( macroPlan, DL_EngineRackRow, dlerr ) { // 循环行 |
| | | info( "当前遍历的行:", dlerr.Generation(), " ", dlerr.MLB_MQB() ); |
| | | traverse ( macroPlan, DL_EngineRackColumn, dlerc ) { // 循环列 |
| | | // 发动机成本参数 |
| | | lce := select( macroPlan, LogisticsCostEngine, tempLCE, tempLCE.Generation() = dlerr.Generation() and tempLCE.MLB_MQB() = dlerr.MLB_MQB() and tempLCE.Factory() = "大连工厂" |
| | | and tempLCE.StartDate() <= dlerc.StartDate() and tempLCE.EndDate() >= dlerc.StartDate().StartOfNextMonth() ); |
| | | |
| | | // 当前月末最后一天日期 |
| | | lastDayOfThisMonth := dlerc.StartDate().StartOfNextMonth() - 1; |
| | | |
| | | cell := dlerr.DL_EngineRackCell( relnew ); |
| | | |
| | | // 外租库入库费用(发动机销量 / 包装容量[向上取整] * 料架入库单价) |
| | | // 空料架数量:大连厂该产品的料架总数量 - 发动机库存 / 包装容量(向上取整) |
| | | 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().Product_MP().Generation() = dlerr.Generation() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().MQBMLB() = dlerr.MLB_MQB() and |
| | | tempPISPIP.Start().Date() = lastDayOfThisMonth, |
| | | tempPISPIP.PlannedInventoryLevelEnd() ); |
| | | cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) ); |
| | | cell.PlannedInventory( plannedInventory ); |
| | | |
| | | // 外租库出库费用(发动机产量 / 包装容量[向上取整] * 料架出库单价) |
| | | // CC外租库入库费用:发动机销量 / 包装容量(向上取整)* 料架入库单价 |
| | | |
| | | // CC外租库出库费用:发动机销量 / 包装容量(向上取整)* 料架出库单价 |
| | | |
| | | cell.DL_EngineRackColumn( relset, dlerc ); |
| | | } |
| | | } |
| | | *] |