From b431be38eae882ed1693573fe495b89f1674bef8 Mon Sep 17 00:00:00 2001
From: yunchai <yunying.chai@capgemini.com>
Date: 星期五, 13 十月 2023 10:04:40 +0800
Subject: [PATCH] 提交MacroPlan 数据改为 Glob数据

---
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl |    4 ++--
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl    |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
index 2a2d4d5..4cc3e53 100644
--- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -63,7 +63,7 @@
                 MaterialType:= ObjProduct.ParentID();
                 MaterialName:=ObjProduct.Name();
               }
-              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode());
+              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode(),GlobData);
               if( not isnull( ObjUnit))
               {
                 StockPoint:= ObjUnit.Name();
@@ -83,7 +83,7 @@
       // 娌℃湁BOM 娣诲姞娴嬭瘯鏁版嵁
       else
       {
-        error( "BOM 鏁版嵁鑾峰彇澶辫触锛屾棤娉曟墿灞曞師鏉愭枡淇℃伅锛�");
+        //error( "BOM 鏁版嵁鑾峰彇澶辫触锛屾棤娉曟墿灞曞師鏉愭枡淇℃伅锛�");
         nCount :=Owner.H_MaterialInfo(relsize );
         Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU"+ nCount.AsQUILL() ,ForecastID := ForecastId,OrgCode := "ORG_000",VCode := VCode
                                     ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "鍘熸潗鏂�",NeedDate := NDate
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl
index cfa808a..1be87a9 100644
--- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl
@@ -2,7 +2,8 @@
 #parent: #root
 StaticMethod SM_GetUnitBySKU (
   MacroPlan Owner,
-  String SKU
+  String SKU,
+  GlobalOTDTable GlobData
 ) as Unit
 {
   Description: '閫氳繃SKU鑾峰彇搴撳瓨鐐逛俊鎭�'
@@ -11,7 +12,7 @@
     Obj :=null( Unit,constcontent );
     if( not isnull( Owner) and SKU.Length()>0)
     {
-      OrgCode := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU);
+      OrgCode := select( GlobData,Global_MappingOperationBOM,ObjM,ObjM.ProductCode()=SKU);
       if( not isnull( OrgCode))
       {
         Obj := select( Owner,Unit,ObjU,ObjU.ID()=  OrgCode.OrganCode());

--
Gitblit v1.9.3