admin
2024-10-10 98fe33ee130f36bfe116cc31181a31405d9a946b
长春料架优化
已修改1个文件
4 ■■■ 文件已修改
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -38,7 +38,7 @@
                        and tempLCMR.StartDate() <= ccerc.StartDate() and tempLCMR.EndDate() >= ccerc.StartDate().StartOfNextMonth() );
                        
        // 运输成本参数
        lct  := select( macroPlan, LogisticsCostTransport, tempLCT, tempLCT.Product() = "发动机" and tempLCT.Origin() = "CC 厂内库" and tempLCT.Destination() = "长春外租库" );
        lct  := select( macroPlan, LogisticsCostTransport, tempLCT, tempLCT.Product() = "发动机料架" and tempLCT.Origin() = "长春外租库" and tempLCT.Destination() = "CC 厂内库" );
        
        // 当前月末最后一天日期                
        lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1; 
@@ -65,6 +65,7 @@
                            tempFSID.StartDate().Year()  = ccerc.StartDate().Year()                      and
                            tempFSID.StartDate().Month() = ccerc.StartDate().Month(),
                            tempFSID.Quantity() );
        cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) );
             
        // 外租库出库费用(发动机产量 / 包装容量[向上取整] * 料架出库单价)
@@ -87,6 +88,7 @@
                                       tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = "长春外租库",
                                       tempPIT.Quantity()
                                      );
    //    info( "时间:", ccerc.StartDate().Format( "Y-M2-D2" ), "    运输数据:", transportationQuantity, "     运输单价:", lct.TransportPrice() );
        cell.ExternalRentalWarehouseTransportationCosts( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) );
             
        // 外租库仓储费用:料架总数量 - 发动机库存 / 包装容量(向上取整),再乘以空料架仓储单价得到空料架仓储费用。发动机库存取Actual inventories里取到长春外租库该发动机的仓储量,料架总数量需要手动维护。