Exemple #1
0
        private static bool TryGetInterRoute(this FabProduct product, FabStep step, out FabInterBom interBom, bool isFromTo)
        {
            interBom = null;

            FabInterBom[] list = isFromTo ? product.NextInterBoms : product.PrevInterBoms;

            if (step == null)
            {
                interBom = null;
                return(false);
            }

            foreach (FabInterBom it in list)
            {
                if (step.ShopID != it.CurrentShopID ||
                    it.CurrentStep.StepID != step.StepID)
                {
                    continue;
                }

                interBom = it;
                break;
            }

            return(interBom != null);
        }
Exemple #2
0
        public static void AddNextInterBom(this FabProduct prod, FabInterBom bom)
        {
            if (LcdHelper.ArrayContains(prod.NextInterBoms, bom))
            {
                return;
            }

            FabInterBom[] ps = prod.NextInterBoms;

            LcdHelper.ArrayAdd(ref ps, bom);

            prod.NextInterBoms = ps;
        }
Exemple #3
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="partChangeInfo"/>
        /// <param name="isRun"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart APPLY_PART_CHANGE_INFO0(PegPart pegPart, object partChangeInfo, bool isRun, ref bool handled, PegPart prevReturnValue)
        {
            FabInterBom bom = partChangeInfo as FabInterBom;

            FabPegPart pp = pegPart.ToFabPegPart();


            pp.AddCurrentPlan(bom.Product, bom.CurrentStep);

            pp.Product  = bom.ChangeProduct;
            pp.InterBom = bom;

            return(pp);
        }
Exemple #4
0
        public static FabStep GetPrevMainStep(this FabStep currentStep, FabProduct product, bool checkInterBom)
        {
            FabStep     orgStep   = currentStep;
            FabInterBom interBoms = null;

            if (checkInterBom && product.TryGetPrevInterRoute(orgStep, out interBoms))
            {
                return(interBoms.ChangeStep);
            }

            FabStep prev = currentStep.PrevStep as FabStep;

            do
            {
                if (prev == null)
                {
                    return(null);
                }

                if (IsSkipStep(product, prev))
                {
                    if (prev.PrevStep != null)
                    {
                        prev = prev.PrevStep as FabStep;
                    }
                    else
                    {
                        prev = null;
                    }

                    continue;
                }

                break;
            } while (true);

            return(prev);
        }
Exemple #5
0
 public static bool TryGetPrevInterRoute(this FabProduct product, FabStep step, out FabInterBom interBom)
 {
     return(product.TryGetInterRoute(step, out interBom, false));
 }