| | |
| | | #parent: #root |
| | | Method MappingOperationBOMDataRouting ( |
| | | Routing routing, |
| | | MappingBOMs routingRows, |
| | | StockingPoint_MP stockingPoint, |
| | | Strings keyProductIds |
| | | MappingBOMs routingRows |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | if( not isnull( component ) ) { |
| | | // error( "component : " + noAlterRow.ComponentCode() + " not found" ); |
| | | // 连接产品与operation |
| | | // inputStockingPointId := noAlterRow.OrganCode() + "_" + noAlterRow.ComponentType() + "_Stock"; |
| | | inputStockingPointId := noAlterRow.OrganCode() + "_Stock"; |
| | | stockingPoint := StockingPoint_MP::FindStockingPointTypeIndex( inputStockingPointId); |
| | | pisp := ProductInStockingPoint_MP::CreateIfNotFound( component, stockingPoint ); |
| | | trash := construct( OperationBOMs ); |
| | | operationBOM := toLink.LinkProduct( component, true, BaseOperationLink::GetGroupID( toLink, true, false ), pisp, |
| | |
| | | // } |
| | | traverse( routingStep, Operation, toLink ) { |
| | | // 连接产品与operation |
| | | // inputStockingPointId := firstAlterRow.OrganCode() + "_" + firstAlterRow.ComponentType() + "_Stock"; |
| | | inputStockingPointId := firstAlterRow.OrganCode() + "_Stock"; |
| | | stockingPoint := StockingPoint_MP::FindStockingPointTypeIndex( inputStockingPointId); |
| | | pisp := ProductInStockingPoint_MP::CreateIfNotFound( component, stockingPoint ); |
| | | trash := construct( OperationBOMs ); |
| | | mainBOM := toLink.LinkProduct( component, true, BaseOperationLink::GetGroupID( toLink, true, false ), pisp, |
| | |
| | | alterProd := Product_MP::FindById( this, alterRow.AlternativeMaterialCode() ); |
| | | if( not isnull( alterProd ) ) { |
| | | // error( "alterProd : " + alterRow.AlternativeMaterialCode() + " not found" ); |
| | | stockingPointIdAlter := alterRow.OrganCode() + "_" + alterRow.ProductType() + "_Stock"; |
| | | // stockingPointIdAlter := alterRow.OrganCode() + "_" + alterRow.ComponentType() + "_Stock"; |
| | | stockingPointIdAlter := alterRow.OrganCode() + "_Stock"; |
| | | stockingPointAlter := StockingPoint_MP::FindById( this, stockingPointIdAlter ); |
| | | if( isnull( stockingPointAlter ) ) { |
| | | error( "stockingPoint : " + stockingPointIdAlter + " not found" ); |
| | | } |
| | | pispAlter := ProductInStockingPoint_MP::CreateIfNotFound( alterProd, stockingPointAlter ); |
| | | mainInput := toLink.LastOperationInput(); |
| | | //mainInput := toLink.LastOperationInput(); |
| | | mainInput := select( toLink,OperationInput,operationInut,operationInut.ProductID()=alterRow.ComponentCode()); |
| | | trash := construct( OperationBOMs ); |
| | | if( not isnull( mainInput ) ) { |
| | | alterBom := mainInput.Operation().LinkPISP( pispAlter, true, mainInput.OperationLinkGroupID(), trash ); |