示例#1
0
        internal static FabPlanInfo CreateInitLastPlan(EqpStatusInfo info)
        {
            string     shopID = info.LastShopID;
            FabProduct prod   = BopHelper.FindProduct(shopID, info.LastProduct);

            if (prod == null || prod.Process == null)
            {
                return(null);
            }

            FabStep step = prod.Process.FindStep(info.LastStep) as FabStep;

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

            FabPlanInfo plan = new FabPlanInfo(step);

            plan.ShopID         = shopID;
            plan.Product        = prod;
            plan.ProductID      = prod.ProductID;
            plan.ProductVersion = info.LastProductVer;
            plan.OwnerType      = info.LastOwnerType;

            //TODO : last OwnerID
            //plan.OwnerID = null;

            return(plan);
        }
示例#2
0
        public static List <FabStep> GetPrevSteps(this FabStep currnetStep, string productID)
        {
            List <FabStep> result = new List <FabStep>();

            if (currnetStep.IsArrayShop && currnetStep.IsFirst)
            {
                return(result);
            }

            foreach (FabStep item in currnetStep.GetInnerPrevSteps())
            {
                result.Add(item);
            }

            FabProduct prod = BopHelper.FindProduct(currnetStep.ShopID, productID);

            FabInterBom bom;

            prod.TryGetPrevInterRoute(currnetStep, out bom);

            if (bom != null)
            {
                result.Add(bom.ChangeStep);
            }

            return(result);
        }
示例#3
0
        internal static void PrePareTargetbyCell_InTarget(MergedPegPart mg)
        {
            List <PegPart> list = new List <PegPart>(mg.Items);

            foreach (FabPegPart pp in list)
            {
                string arrayCode = CellCodeMaster.GetArrayCode(pp.Product.ProductID);
                string cfCode    = CellCodeMaster.GetCfCode(pp.Product.ProductID);

                var arrayProd = BopHelper.FindProduct(Constants.ArrayShop, arrayCode);
                var cfProd    = BopHelper.FindProduct(Constants.CF, cfCode);

                if (arrayProd == null || cfProd == null)
                {
                    ErrHist.WriteIf(string.Format("BuildFabOutTarget{0}", pp.Product.ProductID),
                                    ErrCategory.PEGGING,
                                    ErrLevel.ERROR,
                                    pp.Current.Step.FactoryID,
                                    pp.Current.Step.ShopID,
                                    Constants.NULL_ID,
                                    pp.Product.ProductID,
                                    Constants.NULL_ID,
                                    Constants.NULL_ID,
                                    Constants.NULL_ID,
                                    pp.Current.ShopID,
                                    "NOT FOUND PRODUCT",
                                    string.Format("Do not build TFT OutTarget")
                                    );

                    mg.Items.Remove(pp);

                    continue;
                }

                FabStep arrayStep = BopHelper.GetSafeDummyStep(pp.Current.FactoryID, Constants.ArrayShop, "0000");
                FabStep cfStep    = BopHelper.GetSafeDummyStep(pp.Current.FactoryID, Constants.CfShop, "0000");

                FabPegPart cfPP = PegMaster.CreateCellBankPegPart(pp, cfProd);
                cfPP.AddCurrentPlan(cfProd, cfStep);


                pp.AddCurrentPlan(arrayProd, arrayStep);
                pp.Product = arrayProd;

                foreach (FabPegTarget pt in pp.PegTargetList)
                {
                    pt.TargetKey = PegHelper.CreateTargetKey(pt.TargetKey, arrayProd.ProductID.Substring(0, 2));
                }



                mg.Items.Add(cfPP);
            }
        }
示例#4
0
        private static void CreateCellInProfile()
        {
            var outProfiles = InOutProfileMaster.OutProfiles;
            var inProfiles  = InOutProfileMaster.InProfiles;

            var targetView = InputMart.Instance.ShopInTargetProdView;

            foreach (var op in outProfiles.Values)
            {
                if (op.HasCellCodeList() == false)
                {
                    continue;
                }

                string shopID    = op.ShopID;
                string ownerType = op.OwnerType;

                foreach (var cellCode in op.CellCodeList)
                {
                    var prod = BopHelper.FindProduct(Constants.CellShop, cellCode);
                    if (prod == null)
                    {
                        continue;
                    }

                    string key = CreateKey(cellCode, ownerType);

                    CellInProfile profile;
                    if (inProfiles.TryGetValue(key, out profile) == false)
                    {
                        profile = CreateHelper.CreateCellInProfile(prod, ownerType);
                        inProfiles.Add(key, profile);

                        var inTargets = targetView.FindRows(prod).ToList();
                        if (inTargets != null && inTargets.Count > 1)
                        {
                            inTargets.Sort(CompareHelper.ShopInTargetComparer.Default);
                        }

                        profile.InTargets = inTargets;
                    }

                    profile.AddOutInfos(shopID, op.Infos);
                }
            }
        }
示例#5
0
        private static bool Allocate_FixPlan(this DcnMaster mst, DcnBucket bck, DcnTarget target, FixPlanDCN fixPlan, DateTime now)
        {
            int allocQty = fixPlan.PLAN_QTY;

            if (allocQty <= 0)
            {
                return(false);
            }

            FabProduct prod = target == null ? null : target.Product;

            if (prod == null)
            {
                prod = BopHelper.FindProduct(fixPlan.SHOP_ID, fixPlan.PRODUCT_ID);
            }

            if (prod == null)
            {
                return(false);
            }

            var plan = bck.Allocate(prod, allocQty, target, now);

            //전체 Alloc Plan 기록
            if (plan != null)
            {
                plan.FixPlan  = fixPlan;
                plan.AllocSeq = mst.AllPlans.Count + 1;

                mst.AllPlans.Add(plan);
                mst.Current.Add(plan);
            }

            bool isNoAlloc = plan == null;

            if (isNoAlloc)
            {
                return(false);
            }

            return(true);
        }
示例#6
0
        public static void AddFixPlan(FixPlanDCN entity)
        {
            if (entity == null)
            {
                return;
            }

            if (entity.PLAN_QTY <= 0)
            {
                return;
            }

            var dcnMst = ReleasePlanMaster.DcnMst;

            string eqpID = entity.EQP_ID;

            if (string.IsNullOrEmpty(eqpID))
            {
                return;
            }

            var prod = BopHelper.FindProduct(entity.SHOP_ID, entity.PRODUCT_ID);

            if (prod == null)
            {
                return;
            }

            List <FixPlanDCN> list;

            if (dcnMst.FixPlans.TryGetValue(eqpID, out list) == false)
            {
                dcnMst.FixPlans.Add(eqpID, list = new List <FixPlanDCN>());
            }

            LcdHelper.AddSort(list, entity, FixPlanComparer.Default);
        }