From 602aee97554a09ab36ac0396bd4cd155ab590a80 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期四, 31 十月 2024 18:35:49 +0800
Subject: [PATCH] 包装计划优化

---
 _Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
index 6b23ce9..b450973 100644
--- a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
+++ b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
@@ -14,7 +14,7 @@
     allProductionLines := selectuniquevalues( newNOPT, NewOfflinePlanRow, tempNOPR, true, tempNOPR.ProductionLine() );
     
     traverse ( allProductionLines, Elements, pl
-    //           , pl = "eMotor Assy (France)" 
+    //           , pl = "CC MoMo" 
              ) 
     {
       // 涓嬬嚎璁″垝褰撳墠浜х嚎涓嬬殑琛�
@@ -24,11 +24,12 @@
       preNOPCell := null( NewOfflinePlanCell );
       
       traverse ( newNOPT, NewOfflinePlanColumn, nopc
-    //             , nopc.StartDate() >= macroPlan.StartOfPlanning().Date() and nopc.StartDate() <= Date::Construct( 2024, 4, 17 ) // 娴嬭瘯鏃跺彲浠ヨ繃婊ゆ椂闂�
+    //             , nopc.StartDate() >= macroPlan.StartOfPlanning().Date() and nopc.StartDate() <= Date::Construct( 2025, 1, 16 ) // 娴嬭瘯鏃跺彲浠ヨ繃婊ゆ椂闂�
                ) 
       {         
         for ( i := 1; i < 10; i++ ) {
-          nopcell := select( noprs, Elements.NewOfflinePlanCell, tempNOPC, tempNOPC.NewOfflinePlanColumn() = nopc and tempNOPC.OrderNr() = i );
+          nopcell := select( noprs, Elements.NewOfflinePlanCell, tempNOPC, tempNOPC.NewOfflinePlanColumn() = nopc and tempNOPC.OrderNr() = i and tempNOPC.Order() <> "" );
+          
           // 鎹㈠瀷鎹熷け鍙傛暟
           cls     := select( macroPlan, ChangeLossSetting, tempCLS, 
                              tempCLS.ProductFirst().ID()  = guard( preNOPCell.NewOfflinePlanRow().ProductID(), "" ) and
@@ -39,10 +40,12 @@
     
           // 鎵e噺鎹㈠瀷鎹熷け
           if ( not isnull( preNOPCell ) and not isnull( nopcell ) and not isnull( cls ) ) {
-            preNOPCell.Quantity( preNOPCell.Quantity() - cls.ChangeLossNumber() );                 
+    //        info( "褰撳墠浜у搧搴忓彿锛�", nopcell.OrderNr(),  "    ", nopcell.Order(), "    ", i );
     //        info( "褰撳墠鍒楁椂闂达細", nopc.StartDate().Format( "Y-M2-D2" ), 
     //              "    涓婁竴涓骇鍝佸綋鍓嶅簭鍙凤細", preNOPCell.Order(), "    涓婁竴涓骇鍝佹暟閲忥細", preNOPCell.Quantity(), "    涓婁竴涓骇鍝佸悕锛�", preNOPCell.NewOfflinePlanRow().ProductID(),
-    //              "    褰撳墠浜у搧搴忓彿锛�"      , nopcell.Order()   , "    褰撳墠浜у搧鏁伴噺锛�"     , nopcell.Quantity(), "    褰撳墠浜у搧鍚嶏細"  , nopcell.NewOfflinePlanRow().ProductID() );
+    //              "    褰撳墠浜у搧搴忓彿锛�"      , nopcell.Order()   , "    褰撳墠浜у搧鏁伴噺锛�"     , nopcell.Quantity(), "    褰撳墠浜у搧鍚嶏細"  , nopcell.NewOfflinePlanRow().ProductID(), 
+    //              "    闇�瑕佹墸鍑忕殑鏁伴噺锛�", cls.ChangeLossNumber() );
+            preNOPCell.Quantity( preNOPCell.Quantity() - cls.ChangeLossNumber() ); 
           }
           
           // 璁剧疆涓婁竴涓敓浜х殑浜у搧Cell

--
Gitblit v1.9.3