From f6aa411801444444fd0216322d96c2e2f3bed9c7 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期二, 22 十月 2024 17:28:11 +0800
Subject: [PATCH] 连续排产优化

---
 _Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl b/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl
index 9e4fe66..e561a1a 100644
--- a/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl
+++ b/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl
@@ -8,6 +8,17 @@
   Description: '杩炵画鐢熶骇锛岀Щ鍔ㄤ袱涓懆鏈熶换鍔�'
   TextBody:
   [*
-    // vwedadmin Oct-22-2024 (created)
+    debuginfo( "闇�瑕佸~鍏呯殑鏃ユ湡锛�", fillUPTB.StartDate().Format( "Y-M2-D2" ), "    鐩爣琚彇鏁版棩鏈燂細", targetUPTB.StartDate().Format( "Y-M2-D2" ) );
+    
+    // 鍒ゆ柇鍙敤浜ц兘鏄惁涓�鑷�
+    if ( fillUPTB.BaseAvailableCapacity().HoursAsReal() = targetUPTB.BaseAvailableCapacity().HoursAsReal() ) {
+      traverse ( targetUPTB, PeriodTaskOperation, pto ) {
+        PeriodTaskOperation::Create( pto.Operation(), fillUPTB, pto.Quantity(), false );
+      }
+      
+      PeriodTaskOperation::Delete( selectset( targetUPTB, PeriodTaskOperation, tempPTO, true ) );
+    }
+    
+    Transaction::Transaction().Propagate();
   *]
 }

--
Gitblit v1.9.3