From 386cb9a858f89d881acea3fd3a0d7c65945542ef Mon Sep 17 00:00:00 2001 From: hongjli <3117313295@qq.com> Date: 星期五, 17 一月 2025 08:17:33 +0800 Subject: [PATCH] 包装计划,上线计划bug修复 --- _Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl | 5 +++-- _Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValuesCC.qbl | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl index adf176c..5c8f602 100644 --- a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl +++ b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl @@ -58,8 +58,9 @@ targetQuantity := targetQuantity - [Number]finalQuantity; targetCell := minselect( targetCells, Elements, tempNAOPCell, tempNAOPCell.OrderNr() > 0 and tempNAOPCell.Quantity() > 0, tempNAOPCell.OrderNr() ); - finalQuantity := minvalue( targetQuantity, targetCell.Quantity() ); - currentCell := select( naopc, NewAssemblyOnlinePlanCell, tempNAOPCell, tempNAOPCell.NewAssemblyOnlinePlanRow() = targetCell.NewAssemblyOnlinePlanRow() ); + finalQuantity := minvalue( targetQuantity, guard( targetCell.Quantity(), 0.0 ) ); + currentCell := select( naopc, NewAssemblyOnlinePlanCell, tempNAOPCell, + guard( tempNAOPCell.NewAssemblyOnlinePlanRow() = targetCell.NewAssemblyOnlinePlanRow(), false ) ); } } } diff --git a/_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValuesCC.qbl b/_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValuesCC.qbl index f2c0576..58792b3 100644 --- a/_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValuesCC.qbl +++ b/_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValuesCC.qbl @@ -16,12 +16,14 @@ traverse ( ts, Elements.ProductInTrip, pit, pit.Quantity() > 0 and pit.ProductID() = ppr.ProductID() ) { ppcell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn().StartDate() = pit.Trip().Departure().Date() ); - if ( pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( "澶栫搴�" ) and pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( "绾胯竟搴�" ) ) { - ppcell.Unpacking( pit.Quantity() ); - } - - if ( pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( "绾胯竟搴�" ) and pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( "澶栫搴�" ) ) { - ppcell.Package( pit.Quantity() ); + if ( not isnull( ppcell ) ) { + if ( pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( "澶栫搴�" ) and pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( "绾胯竟搴�" ) ) { + ppcell.Unpacking( pit.Quantity() ); + } + + if ( pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( "绾胯竟搴�" ) and pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( "澶栫搴�" ) ) { + ppcell.Package( pit.Quantity() ); + } } } // traverse ( ppr, PackagingPlanCell, ppcell/*, ppcell.StartDate() <= Date::Construct( 2025, 1, 4 )*/ ) { -- Gitblit v1.9.3