| | |
| | | routingId := item.OrganCode() + "_" + item.ProductID(); |
| | | unitId := item.OrganCode() + "_" + item.PlantName() + "_" + item.ProcessSection(); |
| | | routingStepName := item.ProcessSection() + "_" + [String]item.SequenceNumber(); |
| | | operationId := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection(); |
| | | operationId := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection()+"_" + [String]item.SequenceNumber(); |
| | | // info( "========" ) |
| | | // info( "routingId:" + routingId ); |
| | | // info( "unitId:" + unitId ); |
| | |
| | | if( isnull( routingStep ) ) { |
| | | routingStep := RoutingStep::Create( routing, routingStepName, "", true ); |
| | | } |
| | | // UnitOfMeasure |
| | | unitOfMeasure := UnitOfMeasure_MP::FindByName( this, item.UnitOfMeasureName() ); |
| | | if( isnull( unitOfMeasure ) ) { |
| | | error( "unit of measure [" + item.UnitOfMeasureName() + "] not found for routing [" + routingId + "]" ); |
| | | } |
| | | |
| | | // Unit |
| | | unit := Unit::FindById( this, unitId ); |
| | | if( isnull( unit ) ) { |
| | | unit := this.Unit( relnew, |
| | | // UnitOfMeasure |
| | | unitOfMeasure := UnitOfMeasure_MP::FindByName( this, item.UnitOfMeasureName() ); |
| | | if( isnull( unitOfMeasure ) ) { |
| | | info( "unit of measure [" + item.UnitOfMeasureName() + "] not found for routing [" + routingId + "]" ); |
| | | } |
| | | unit := this.Unit( relnew, |
| | | ID := unitId, Name := unitId, CapacityType := "Infinite", |
| | | DefaultGridX := 0, DefaultGridY := 0, |
| | | IsManuallyConfigured := false, |