From 3cb5a54def670d97301f07170fcaad213bfc54f2 Mon Sep 17 00:00:00 2001
From: yypsybs <yypsybs@foxmail.com>
Date: 星期六, 09 九月 2023 15:30:46 +0800
Subject: [PATCH] 同步逻辑由MacroPlan移到MPSync
---
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl | 124 ++++++++++++++++++++--------------------
1 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
index 93b5707..16d4ed2 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
@@ -8,67 +8,67 @@
{
TextBody:
[*
- // yypsybs Aug-21-2023 (created)
-
- keyProductList := construct( Strings );
- if( isKeyProduct ) {
- keyProductList := selectuniquevalues( this, MappingProduct, item, item.KeyProduct(), item.ID() );
- }
- bomList := selectsortedset( this, MappingBOM, item,
- ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0,
- true,
- businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 )
- and ifexpr( isKeyProduct,
- keyProductList.Size() > 0 and keyProductList.Find( item.ComponentCode() ) >= 0,
- true ),
- item.OrganCode() + "_" + item.ProductCode() + "_" + item.ProcessSection() );
- // 鎸塺outing鍙妑outingStep鍒嗙粍
- routingIds := selectuniquevalues( bomList, Elements, item, true, item.OrganCode() + "_" + item.ProductCode() );
- traverse( routingIds, Elements, routingId ) {
- routingRows := selectset( bomList, Elements, item, true, routingId = item.OrganCode() + "_" + item.ProductCode() );
- 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" );
- // }
- routing := Routing::FindById( this, routingId );
- if( not isnull( routing ) ) {
- // error( "routing : " + routingId + " not found" );
- // ========澶勭悊杈撳嚭========
- if( not isnull( stockingPoint ) ) {
- // info( 1 );
- operationsInLastSteps := Operation::FindFinalOperationsByRoutingId( this, routingId );
- traverse( operationsInLastSteps, Elements, operationsInLastStep ) {
- operationsInLastStep.CreateOperationBOM( product, stockingPoint, false, true );
- operationsInLastStep.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 );
- }
- // ========鍒嗙粍澶勭悊杈撳叆========
-
- }
- if( not isnull( inputStockingPoint)){
- this.MappingOperationBOMDataRouting( routing,routingRows,inputStockingPoint,keyProductList);
- }
- }
- }
- }
- }
- if( createPurchaseSupplyMaterial ) {
- toCreateBomList := selectuniquevalues( bomList, Elements, item,
- item.ProductType() = "P", item.OrganCode() + item.ComponentCode());
- 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.ComponentType());
- }
- }
+ //// yypsybs Aug-21-2023 (created)
+ //
+ //keyProductList := construct( Strings );
+ //if( isKeyProduct ) {
+ // keyProductList := selectuniquevalues( this, MappingProduct, item, item.KeyProduct(), item.ID() );
+ //}
+ //bomList := selectsortedset( this, MappingBOM, item,
+ // ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0,
+ // true,
+ // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 )
+ // and ifexpr( isKeyProduct,
+ // keyProductList.Size() > 0 and keyProductList.Find( item.ComponentCode() ) >= 0,
+ // true ),
+ // item.OrganCode() + "_" + item.ProductCode() + "_" + item.ProcessSection() );
+ //// 鎸塺outing鍙妑outingStep鍒嗙粍
+ //routingIds := selectuniquevalues( bomList, Elements, item, true, item.OrganCode() + "_" + item.ProductCode() );
+ //traverse( routingIds, Elements, routingId ) {
+ // routingRows := selectset( bomList, Elements, item, true, routingId = item.OrganCode() + "_" + item.ProductCode() );
+ // 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" );
+ // // }
+ // routing := Routing::FindById( this, routingId );
+ // if( not isnull( routing ) ) {
+ //// error( "routing : " + routingId + " not found" );
+ // // ========澶勭悊杈撳嚭========
+ // if( not isnull( stockingPoint ) ) {
+ //// info( 1 );
+ // operationsInLastSteps := Operation::FindFinalOperationsByRoutingId( this, routingId );
+ // traverse( operationsInLastSteps, Elements, operationsInLastStep ) {
+ // operationsInLastStep.CreateOperationBOM( product, stockingPoint, false, true );
+ // operationsInLastStep.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 );
+ // }
+ // // ========鍒嗙粍澶勭悊杈撳叆========
+ //
+ // }
+ // if( not isnull( inputStockingPoint)){
+ // this.MappingOperationBOMDataRouting( routing,routingRows,inputStockingPoint,keyProductList);
+ // }
+ // }
+ // }
+ // }
+ //}
+ //if( createPurchaseSupplyMaterial ) {
+ // toCreateBomList := selectuniquevalues( bomList, Elements, item,
+ // item.ProductType() = "P", item.OrganCode() + item.ComponentCode());
+ // 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.ComponentType());
+ // }
+ //}
*]
}
--
Gitblit v1.9.3