From e8619d825e5f09daf129b4847bf2bf4e660d40c5 Mon Sep 17 00:00:00 2001
From: yunchai <yunying.chai@capgemini.com>
Date: 星期四, 12 十月 2023 09:29:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev'

---
 _Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
index b09ed68..3ef68b5 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
@@ -2,7 +2,8 @@
 #parent: #root
 Method MappingOperationData (
   Strings businessTypes,
-  GlobalOTDTable globalOTDTable
+  GlobalOTDTable globalOTDTable,
+  Strings organcodelist
 )
 {
   TextBody:
@@ -11,7 +12,6 @@
     // 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍
     toDealList := construct( Global_MappingOperations ) ;
     if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
-        organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, businessTypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() );
         toDealList := selectsortedset( globalOTDTable, Global_MappingOperation, item, 
                                        ( businessTypes.Find( item.BusinessType() ) >= 0 ) and 
                                        ( organcodelist.Find( item.OrganCode() ) >= 0 ), 
@@ -74,7 +74,7 @@
         op := Operation::FindOperationTypeIndex( operationId );
         if( isnull( op)){
           op := Operation::Create( operationId, unit, operationId, routingStep, 
-                                        Duration::Hours( item.UserLeadTime() ), Duration::Zero(), item.ActualCapacity(), false, 
+                                        Duration::Days( item.UserLeadTime() ), Duration::Zero(), item.ActualCapacity(), false, 
                                         [Real]item.MinimumQuantity(), haveMaxQty, guard( [Real]item.MaximumQuantity(), Real::MaxReal() ), 
                                         0.0, 0.0, false, true );
         }

--
Gitblit v1.9.3