From 6d6cc10d9e8e242661da7fd655dec155a09d676c Mon Sep 17 00:00:00 2001
From: haorenhui <renhui.hao@capgemini.com>
Date: 星期一, 30 十月 2023 11:41:12 +0800
Subject: [PATCH] actual关键物料判断
---
_Main/BL/Type_Global_MAPISPIPCategory/Function_CalcCritical.qbl | 13 +++++++++++++
_Main/BL/Type_Global_MappingProduct_MP/Function_CalcCritical.qbl | 12 ++++++++++++
_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl | 7 ++++---
_Main/BL/Type_Global_MappingProduct_MP/Attribute_KeyProduct.qbl | 5 +++++
_Main/BL/Type_Global_MappingProduct_MP/Attribute_Critical.qbl | 8 ++++++++
_Main/BL/Type_Global_MAPISPIPCategory/Attribute_Critical.qbl | 8 ++++++++
6 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/_Main/BL/Type_Global_MAPISPIPCategory/Attribute_Critical.qbl b/_Main/BL/Type_Global_MAPISPIPCategory/Attribute_Critical.qbl
new file mode 100644
index 0000000..d8e681a
--- /dev/null
+++ b/_Main/BL/Type_Global_MAPISPIPCategory/Attribute_Critical.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Critical
+{
+ #keys: '3[414882.0.72610025][414882.0.72610024][414882.0.72610026]'
+ Description: '鍏抽敭鐗╂枡'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_Global_MAPISPIPCategory/Function_CalcCritical.qbl b/_Main/BL/Type_Global_MAPISPIPCategory/Function_CalcCritical.qbl
new file mode 100644
index 0000000..a6a025e
--- /dev/null
+++ b/_Main/BL/Type_Global_MAPISPIPCategory/Function_CalcCritical.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcCritical
+{
+ TextBody:
+ [*
+ // hongjli Oct-24-2023 (created)
+
+ value := guard( select( this, Global_MappingProduct_MP, tempGMPMP, true ).Critical(), false );
+
+ this.Critical(value);
+ *]
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_Critical.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_Critical.qbl
new file mode 100644
index 0000000..bdc96fd
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_Critical.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Critical
+{
+ #keys: '3[414882.0.72574612][414882.0.72574611][414882.0.72574613]'
+ Description: '鍏抽敭鐗╂枡'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_KeyProduct.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_KeyProduct.qbl
index 431f730..3824133 100644
--- a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_KeyProduct.qbl
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_KeyProduct.qbl
@@ -3,5 +3,10 @@
Attribute KeyProduct
{
#keys: '3[414702.0.247711010][414702.0.247711009][414702.0.247711011]'
+ Description:
+ [*
+ 宸插純鐢�
+ 鍏抽敭鐗╂枡娌℃湁鏁版嵁鏉ユ簮锛屼互鍚庝粠鍏朵粬灞炴�ц绠楀緱鍒帮紝鏀逛负Critical
+ *]
ValueType: Boolean
}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Function_CalcCritical.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Function_CalcCritical.qbl
new file mode 100644
index 0000000..be05486
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Function_CalcCritical.qbl
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcCritical
+{
+ TextBody:
+ [*
+ // renhao Oct-30-2023 (created)
+ value := this.ProductMajorType()="鎴愬搧" or this.ProductMajorType()="鍗婃垚鍝�";
+
+ this.Critical(value);
+ *]
+}
diff --git a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
index 4c98455..7140c64 100644
--- a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
@@ -36,10 +36,11 @@
info( "Now is dealing with the " + count.AsQUILL() + "ActualPISPIP " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
}
//product := select( globalOTDTable,Global_MappingProduct_MP,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true);
- if( /*not isnull( product*/ guard( actual.Global_MAPISPIPCategory().KeyProduct() = nuclear, false ) ){
+ //if( guard( actual.Global_MAPISPIPCategory().KeyProduct() = nuclear, false ) ){
+ if( not nuclear or (nuclear and actual.Global_MAPISPIPCategory().Critical() = nuclear) ){
if( not isnull(businessTypes)){
- for( i :=0 ;i < businessTypes.Size();i++ ){
+
//businessType := businessTypes.Element( i );
if( /*product.BusinessType() = businessType and not product.IsCommon()*/ not actual.Global_MAPISPIPCategory().IsCommon() ){
ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
@@ -49,7 +50,7 @@
actual.ActualInventoryLevelEnd(),
actual.ManufacturedDate());
}
- }
+
}else{
ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
--
Gitblit v1.9.3