From 6aa25283a699341a838f00d3fab14e1e0a59b561 Mon Sep 17 00:00:00 2001
From: yy <yuan.yan@capgemini.com>
Date: 星期一, 04 九月 2023 19:40:10 +0800
Subject: [PATCH] 1 Product取全量物料,不做事业部区分 2 Produc的ID和Name取相同值 3 PR的Routing创建,unitID和routingID取值修改 4 投入库存点取值
---
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl | 31 ++++++++++++++++---------------
_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl | 2 +-
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl | 9 +++++++--
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataSupplyPurchase.qbl | 4 ++--
4 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
index 493d9c1..93b5707 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
@@ -29,11 +29,13 @@
if( routingRows.Size() > 0 ) {
firstRow := routingRows.Element( 0 );
stockingPointId := firstRow.OrganCode() + "_" + firstRow.ProductType() + "_STOCK";
+ inputStockingPointId := firstRow.OrganCode() + "_" + firstRow.ComponentType() + "_STOCK";
// ========妫�鏌�========
product := Product_MP::FindById( this, firstRow.ProductCode() );
if( not isnull( product ) ) {
// error( "product : " + firstRow.ProductCode() + " not found" );
stockingPoint := StockingPoint_MP::FindById( this, stockingPointId );
+ inputStockingPoint := StockingPoint_MP::FindById( this, inputStockingPointId );
// info( stockingPointId.AsQUILL() );
// if( isnull( stockingPoint ) ) {
// error( "stockingPoint : " + stockingPointId + " not found" );
@@ -50,7 +52,10 @@
operationsInLastStep.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 );
}
// ========鍒嗙粍澶勭悊杈撳叆========
- this.MappingOperationBOMDataRouting( routing, routingRows, stockingPoint, keyProductList );
+
+ }
+ if( not isnull( inputStockingPoint)){
+ this.MappingOperationBOMDataRouting( routing,routingRows,inputStockingPoint,keyProductList);
}
}
}
@@ -62,7 +67,7 @@
traverse( toCreateBomList, Elements, key ) {
boms := selectset( bomList, Elements, item, item.ProductType() = "P" and item.OrganCode() + item.ComponentCode() = key );
bom := boms.First();
- this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ProductType() );
+ this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType());
}
}
*]
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataSupplyPurchase.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataSupplyPurchase.qbl
index 41be758..ab499a8 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataSupplyPurchase.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataSupplyPurchase.qbl
@@ -8,8 +8,8 @@
{
TextBody:
[*
- routingId := orgCode + "_" + productId;
- unitId := orgCode + "_PR_" + productId;
+ routingId := "PR_"+orgCode + "_" + productId;
+ unitId := "渚涘簲鍟�";
routingStepName := "Purchase";
operationId := orgCode + "_PR_" + productId;
routing := Routing::CreateOrUpdate( this, routingId );
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
index 77838b6..56e75fb 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
@@ -129,7 +129,7 @@
Product_MP::Create( this,
item.ID(),
productsubclasstype,
- item.Name(),
+ item.ID(),
item.UnitOfMeasureName(),
isbyproduct,
item.Name(),
diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
index c60c9a8..3f014f2 100644
--- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
+++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
@@ -63,7 +63,8 @@
//todo: 鏁版嵁鏈夐噸澶嶏紝鍏堢暐杩�
macroPlan.Broker_OTD_Product().Execute();
info( "Start data mapping of product" );
- macroPlan.MappingProductData( businessTypes, false );
+ testproduct := construct( Strings );
+ macroPlan.MappingProductData( testproduct, false );
//鍗曚綅杞崲-7
info( "BaseConversionFactor::DoSync" )
BaseConversionFactor::DoSync( macroPlan );
@@ -97,25 +98,25 @@
port := 443;
data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
macroPlan.ApiLaneLegsData( data );
- // 渚涘簲缃戠粶锛堣溅閬擄級-12
- info( "ProductInLane::DoSync" )
- macroPlan.Broker_OTD_ProductInLane().Execute();
- macroPlan.MappingProductInLaneData();
+ //// 渚涘簲缃戠粶锛堣溅閬擄級-12
+ //info( "ProductInLane::DoSync" )
+ //macroPlan.Broker_OTD_ProductInLane().Execute();
+ //macroPlan.MappingProductInLaneData();
// 鍦ㄥ簱搴撳瓨鏁版嵁-13
info( "ActualPISPIP::DoSync" )
macroPlan.Broker_OTD_ActualPISPIP().Execute();
//macroPlan.MappingActualPISPIPData( businessTypes, true );
macroPlan.MappingActualPISPIPData( businessTypes, false );
- // 鍦ㄩ�斿簱瀛�-14
- info( "ExternalSupply::DoSync" )
- info( "Start data broker of External supply" );
- macroPlan.Broker_OTD_ExternalSupply().Execute();
- //macroPlan.MappingExternalSupplyData( businessTypes, true );
- info( "Start data mapping of External supply" );
- macroPlan.MappingExternalSupplyData( businessTypes, false );
- // 搴撳瓨鎴愭湰-15
- info( "InventoryCost::DoSync" );
- InventoryValueAndCost::DoSync( macroPlan );
+ //// 鍦ㄩ�斿簱瀛�-14
+ //info( "ExternalSupply::DoSync" )
+ //info( "Start data broker of External supply" );
+ //macroPlan.Broker_OTD_ExternalSupply().Execute();
+ ////macroPlan.MappingExternalSupplyData( businessTypes, true );
+ //info( "Start data mapping of External supply" );
+ //macroPlan.MappingExternalSupplyData( businessTypes, false );
+ //// 搴撳瓨鎴愭湰-15
+ //info( "InventoryCost::DoSync" );
+ //InventoryValueAndCost::DoSync( macroPlan );
//// todo 鍒堕�犳垚鏈�-16
//info( "OperationCost::DoSync" );
//macroPlan.MappingOperationCostData( businessTypes );
--
Gitblit v1.9.3