From d5e46a7a9f2cb9123b9aafb39a20e14059faa2e4 Mon Sep 17 00:00:00 2001
From: Kevin Kok Khah Whey <khahwhey.kok@3ds.com>
Date: 星期三, 18 十月 2023 10:55:59 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_Kevin

---
 _Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl
index 7c5d308..a25f329 100644
--- a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl
+++ b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl
@@ -1,7 +1,8 @@
 Quintiq file version 2.0
 #parent: #root
 StaticMethod FromSupplyPlanning (
-  GlobalOTDTable otdTable,
+  const GlobalOTDTable otdTable,
+  const GlobalOTDSOP otdSop,
   MacroPlan macroPlan,
   String mrpCalverNo,
   String userId
@@ -14,10 +15,15 @@
     // 鎸塎RPCalverNo鏌ワ紝宸叉湁鏃ц褰曟椂涓嶅鐞�
     oldRecords := selectset( macroPlan, PRData, item,
                              item.MRPCalverNo() = mrpCalverNo );
+    nowNo := 1;
     if( isnull( oldRecords ) or oldRecords.Size() = 0 ) {
       pispips := ProductInStockingPointInPeriod::GetByMRPCalverNo( macroPlan, mrpCalverNo );
       traverse( pispips, Elements, item, item.NewSupplyQuantity() > 0 ) {
-        PRData::FromSupplyPlanning( otdTable, macroPlan, item, userId );
+        PRData::FromSupplyPlanning( otdTable, otdSop, macroPlan, item, userId );
+        nowNo := nowNo + 1;
+        if( nowNo mod 1000 = 0 ) {
+          info( "SupplyPlanning to prData : " + [String]nowNo );
+        }
       }
     }
   *]

--
Gitblit v1.9.3