From d8483f551bc64f0356e06e9ec32475a84c301364 Mon Sep 17 00:00:00 2001
From: renhao <renhui.hao@capgemini.com>
Date: 星期五, 13 十月 2023 11:22:41 +0800
Subject: [PATCH] Merge branch 'dev_cyy'
---
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl | 3 ++-
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl | 5 +++--
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl | 12 ++++++++----
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl | 6 +++---
4 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
index 2f75b5f..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,6 +83,7 @@
// 娌℃湁BOM 娣诲姞娴嬭瘯鏁版嵁
else
{
+ //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());
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
index 88c8f1d..02a2296 100644
--- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
@@ -15,6 +15,10 @@
*鍒涘缓浜猴細yunying
*鍒涘缓鏃堕棿锛�20230-09-24
*鎻忚堪锛氱郴缁熷唴璁㈠崟鍐插噺璋冪敤鍑芥暟锛孖sNew=true鏃讹紝閲嶆柊澶勭悊棰勬祴淇℃伅锛孖sNew=false鏃讹紝鐢ㄩ娴嬬疮璁′俊鎭��
+ *鍙傛暟锛欼sNew 鏄惁鏃舵柊鐨勮绠楄〃绀�
+ * Operator 鎿嶄綔浜�
+ * OperatorType 鎿嶄綔绫诲瀷[鍙嶇,鎺堟潈,ERP璁㈠崟]锛岃繖閲屽簲璇ユ槸ERP璁㈠崟
+ *澶囨敞锛氬鎴峰叏閮ㄤ娇鐢ㄥ鎴峰悕绉帮紝涓嶈浣跨敤瀹㈡埛ID锛岄娴嬪師濮嬫暟鎹病鏈夊鎴稩D淇℃伅
*****************************************************************************/
// 鍒濆鍖栫粨鏋�
bStatus := false;
@@ -58,9 +62,9 @@
nHaveForecastQty :=0; //鏈夐娴嬫暟閲�
nNoHaveForecastQty:=0;//浜旈娴嬫暟閲�
OrderQuantity := 0; //鍓╀綑璁㈠崟鏁伴噺
- // 鑾峰彇棰勬祴鏁伴噺锛堝鎴�+SKU+鏈堜唤 鐞嗚鏄病鏈夌墿鏂欓娴嬶級
+ // 鑾峰彇棰勬祴鏁伴噺锛堝鎴峰悕绉�+SKU+鏈堜唤 鐞嗚鏄病鏈夌墿鏂欓娴嬶級
OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = ObjOrder.ProductID()
- and Obj.CustomCode() = ObjOrder.CustomerName()
+ and Obj.CustomName() = ObjOrder.CustomerName()
and Obj.Month().Format( "YM2") =ObjOrder.EndDate().Format( "YM2"));
if ( not isnull(OrderForecast))
{
@@ -74,9 +78,9 @@
nReverseQtyOld := ObjReverse.ReverseRealQty();
nReverseQtyNew := nReverseQtyOld;
}
- // 鑾峰彇鎺堟潈鏁伴噺锛堝鎴稩D+SKU锛�
+ // 鑾峰彇鎺堟潈鏁伴噺锛堝鎴峰悕绉�+SKU锛�
ObjAuthorize := select(Owner, H_AuthorizeRealQty , Obj, Obj.SKU() = ObjOrder.ProductID()
- and Obj.CustomID() = ObjOrder.CustomerName());
+ and Obj.CustomName() = ObjOrder.CustomerName());
if ( not isnull(ObjAuthorize))
{
nAuthorizeQtyOld := ObjAuthorize.AuthorizeRealQty();
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl
index 4379bdc..1143233 100644
--- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl
@@ -170,9 +170,9 @@
{
strMsg :="濉骇鍚庤鍗曞啿鍑忓彂鐢熼敊璇紝璇疯仈绯荤郴缁熺鐞嗗憳锛�";
// 璁板綍閿欒鏃ュ織
- // Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_OrderHedgingEx",
- // DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
- // GeneralInformation := e.GeneralInformation());
+ Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_OrderHedgingEx",
+ DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
+ GeneralInformation := e.GeneralInformation());
}
return JSON::Object().Add( "Status",bStatus)
.Add( "Count",nCount)
--
Gitblit v1.9.3