From ae3b7f21551deb0e163eb5dbd4bea0a70bd54c50 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 10 十月 2024 17:54:30 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg

---
 _Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
index ce8bc30..1d69434 100644
--- a/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
@@ -13,7 +13,10 @@
     // 鎵捐閰嶇嚎琛�
     oprs := selectsortedset( opt, OfflinePlanRow, tempOPR, 
                              tempOPR.ProductionLine() = "DL MoMo" 
-    //                         or tempOPR.ProductionLine() = "CC MoMo" or tempOPR.ProductionLine() = "DL ZKM"
+                             or 
+                             tempOPR.ProductionLine() = "CC MoMo" 
+                             or 
+                             tempOPR.ProductionLine() = "DL ZKM"
                              , 
                              tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() );
     opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() );
@@ -43,17 +46,17 @@
                                );
       
       u           := select( macroPlan, Unit, tempU, tempU.ID() = pl );
-      drainPs     := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "鎺掔┖", false ) );
-      lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "閾虹嚎", false ) );
+      drainPs     := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "鎷夌┖" ), false ) );
+      lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "閾虹嚎" ), false ) );
       
       // 澶勭悊鎺掔┖
-      info( "褰撳墠浜х嚎锛�", pl, "    澶勭悊鎺掔┖--------------------------" );
+      info( "褰撳墠浜х嚎锛�", pl, "    澶勭悊鎷夌┖--------------------------" );
       traverse ( drainPs, Elements, p ) {
         traverse ( p, ExplicitTimeInterval, eti ) {
           info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), "    缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
           // 鍓嶄竴澶╂棩鍘�
           aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = ( eti.Start().Date() - 1 ) );
-          info( "闇�瑕佹帓绌虹殑涓婄嚎璁″垝鏃堕棿锛�", aopc.ColumnDate().Format( "Y-M2-D2" ) );
+          info( "闇�瑕佹媺绌虹殑涓婄嚎璁″垝鏃堕棿锛�", aopc.ColumnDate().Format( "Y-M2-D2" ) );
           aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
                               exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
           aopr  := maxselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
@@ -70,6 +73,15 @@
       traverse ( lineLyingPs, Elements, p ) {
         traverse ( p, ExplicitTimeInterval, eti ) {
           info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), "    缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
+          info( "闇�瑕侀摵绾跨殑涓婄嚎璁″垝鏃堕棿锛�", eti.Start().Format( "Y-M2-D2" ) );
+          aopc  := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = eti.Start().Date() );
+          aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
+                              exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
+          aopr  := minselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
+                              [Number]tempAOPC.Value().ReplaceAll( "#0", "" ) );
+          cell  := select( macroPlan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanRow().ProductionLine() = pl and tempAOPC.AssemblyOnlinePlanColumn() = aopc and
+                           tempAOPC.AssemblyOnlinePlanRow().Type() = "1" and tempAOPC.AssemblyOnlinePlanRow().ProductID() = aopr.AssemblyOnlinePlanRow().ProductID() );
+          cell.Value( [String] ( [Number]cell.Value() + targetQuantity ) );
         }
       }
     }

--
Gitblit v1.9.3