From dc03b8a0920cb6793a37e3a9cc4cd83ff384be94 Mon Sep 17 00:00:00 2001
From: hongji.li <hongji.a.li@capgemini.com>
Date: 星期四, 26 十月 2023 14:48:39 +0800
Subject: [PATCH] 实际库存、外部库存、库存成本、产品在车道实现多事业部分发

---
 _Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
index d2f5724..4c98455 100644
--- a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
@@ -12,9 +12,10 @@
     // renhao Aug-14-2023 (created)
     listtodeal := construct( Global_MappingActualProductInStockingPointInPeriods, constcontent );
     if ( businessTypes.Size() > 0 ) {
-      businessTypeName := businessTypes.Element( 0 );
-      targetGlobal_ProductCategory := select( globalOTDTable, Global_ProductCategory, tempGPC, tempGPC.BusinessTypeName() = businessTypeName );
-      listtodeal := selectset( targetGlobal_ProductCategory, Global_MappingProduct_MP.Global_MAPISPIPCategory.Global_MappingActualProductInStockingPointInPeriod, 
+      targetGlobal_ProductCategory := selectset( globalOTDTable, Global_ProductCategory, tempGPC, 
+                                                 exists( businessTypes, Elements, tempBTN, tempBTN = tempGPC.BusinessTypeName() ) );
+      listtodeal := selectset( targetGlobal_ProductCategory, 
+                               Elements.Global_MappingProduct_MP.Global_MAPISPIPCategory.Global_MappingActualProductInStockingPointInPeriod, 
                                tempGMPIL, 
                                ( tempGMPIL.ActualInventoryLevelEnd() > 0 ) and 
                                ( organcodelist.Find( tempGMPIL.StockingPointID().SubString( 0, 3 ) ) >= 0 ) );

--
Gitblit v1.9.3