| | |
| | | and tempLCE.StartDate() <= dlerc.StartDate() and tempLCE.EndDate() >= dlerc.StartDate().StartOfNextMonth() ); |
| | | |
| | | // 料架成本参数 |
| | | lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "长春工厂" |
| | | lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "大连工厂" |
| | | and tempLCMR.StartDate() <= dlerc.StartDate() and tempLCMR.EndDate() >= dlerc.StartDate().StartOfNextMonth() ); |
| | | |
| | | // 运输成本参数 |
| | |
| | | tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = "大连发动机的长春外租库", |
| | | tempPIT.Quantity() |
| | | ); |
| | | |
| | | cell.CCLineHaulCost( [Number] ( guard( transportationQuantity2 / lce.PackagingCapacity() / lct1.LoadingCapacity(), 0 ) * guard( lct1.TransportPrice(), 1 ) ) ); |
| | | |
| | | // CC短途运输费用:调拨数量 / 包装容量 / 装载容量 * 料架运输单价 |
| | |
| | | tempF.FulfilledQuantity() ); |
| | | // info( "时间:", dlerc.StartDate().Format( "Y-M2-D2" ), " 入库数量:", inventoryQuantity, " 包装容量:", guard( lce.PackagingCapacity(), 0 ), |
| | | // " 装载容量:", guard( lct1.LoadingCapacity(), 0 ) ); // 测试输出 |
| | | cell.DLStorageFeesForRentedWarehouses( [Number] ( guard( inventoryQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.WarehousingPrice(), 1 ) ) ); |
| | | cell.DLStorageFeesForRentedWarehouses( [Number] ( guard( inventoryQuantity / lce.PackagingCapacity(), 0 ) * guard( lce.WarehousingPrice(), 1 ) ) ); |
| | | |
| | | // DL外租库出库费用:发动机出库量 / 料架容量(向上取整)* 料架出库单价 |
| | | outboundQuantity := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), tempPISPIPPL, |
| | | 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.ProductInStockingPoint_MP().StockingPointID() = "大连厂内库" and |
| | | tempPISPIPPL.Start().Date() >= dlerc.StartDate() and |
| | | tempPISPIPPL.End().Date() <= lastDayOfThisMonth, |
| | | tempPISPIPPL.NewSupplyQuantity() ); |
| | | // info( "数量:", outboundQuantity, " 包装融创:", guard( lce.PackagingCapacity(), 0 ), " 出库单价:", guard( lcmr.OutboundPrice(), 0 ) ); |
| | | cell.DLOutboundExpensesForRentedWarehouses( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.OutboundPrice(), 1 ) ) ); |
| | | |
| | | // DL外租库运输费用:发动机运输量 / 包装容量 / 装载容量(向上取整)* 料架运输单价 |
| | |
| | | tempF.Product_MP().Generation() = dlerr.Generation() and |
| | | tempF.Product_MP().MQBMLB() = dlerr.MLB_MQB() and |
| | | tempF.StockingPointID() = "大连发动机的长春外租库" and |
| | | ( tempF.StartDate() - 2 ).Year() = dlerc.StartDate().Year() and |
| | | ( tempF.StartDate() - 2 ).Month() = dlerc.StartDate().Month(), |
| | | tempF.FulfilledQuantity() ); |
| | | cell.CleaningCost( [Number] ( guard( clearnQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) ); |
| | | 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( lcmr.CleanPrice(), 1 ) ) ); |
| | | |
| | | // DL外租库清洗费用:发动机入库量 / 包装容量 * 料架清洗单价。发动机入库量取发动机销量,包装容量取自发动机成本表。料架清洗单价取料架成本表。 |
| | | cell.CleaningCost( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) ); |