| | |
| | | Method MappingOperationBOMData ( |
| | | Strings businessTypes, |
| | | Boolean isKeyProduct, |
| | | Boolean createPurchaseSupplyMaterial |
| | | Boolean createPurchaseSupplyMaterial, |
| | | GlobalOTDTable globalOTDTable |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | |
| | | keyProductList := construct( Strings ); |
| | | if( isKeyProduct ) { |
| | | keyProductList := selectuniquevalues( this, MappingProduct, item, item.ProductMajorType()="成品" or item.ProductMajorType()="半成品", item.ID() ); |
| | | keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="成品" or item.ProductMajorType()="半成品", item.ID() ); |
| | | } |
| | | bomList := selectsortedset( this, MappingBOM, item, |
| | | bomList := selectsortedset( globalOTDTable, Global_MappingOperationBOM, item, |
| | | ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0, |
| | | true, |
| | | // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 ) |
| | |
| | | if( not isnull( stockingPoint)){ |
| | | if( isKeyProduct){ |
| | | keyRows := selectset( routingRows,Elements,routingrow,keyProductList.Find( routingrow.ComponentCode())>=0); |
| | | this.MappingOperationBOMDataRouting( routing,keyRows); |
| | | this.MappingOperationBOMDataRouting( routing,globalOTDTable,keyRows); |
| | | }else{ |
| | | this.MappingOperationBOMDataRouting( routing,routingRows); |
| | | this.MappingOperationBOMDataRouting( routing,globalOTDTable,routingRows); |
| | | } |
| | | |
| | | } |