Exemple #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);
        }
Exemple #2
0
        public static bool IsFixedProductVer(FabStdStep stdStep, string productVer)
        {
            string shopID = stdStep.ShopID;

            //Ver는 Array Shop에서만 유효
            if (BopHelper.IsArrayShop(shopID) == false)
            {
                return(false);
            }

            //1300 ~ 5300 공정까지만 ProductVersion 유효(2020.01.13 - by.liujian(유건))
            //5300 이후 ProductVersion 무시
            var toStep = BopHelper.FindStdStep(Constants.ArrayShop, Constants.ITO_PHOTO_STEP);

            if (toStep != null)
            {
                if (stdStep.StepSeq > toStep.StepSeq)
                {
                    return(false);
                }
            }

            //1300 이전 공정 이면서 Ver에 X가 없는 Version은 변경 투입 가능함.
            if (AvailableChangeProductVer(stdStep, productVer))
            {
                return(false);
            }

            if (LcdHelper.IsEmptyID(productVer))
            {
                return(false);
            }

            return(true);
        }
Exemple #3
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);
        }
Exemple #4
0
        private static bool IsUsableMask(List <EqpArrangeInfo> ealist, MaskArrange item)
        {
            if (ealist == null || ealist.Count == 0)
            {
                return(true);
            }

            bool isArrayShop = BopHelper.IsArrayShop(item.ShopID);

            bool isUasble = false;

            foreach (var info in ealist)
            {
                if (isArrayShop && info.HasLimitType(LimitType.B))
                {
                    if (info.ProductVer != item.ProductVersion)
                    {
                        continue;
                    }
                }

                if (info.HasLimitType(LimitType.M))
                {
                    if (info.MaskID != item.ToolID)
                    {
                        continue;
                    }
                }

                isUasble = true;
                break;
            }

            return(isUasble);
        }
Exemple #5
0
        public static bool AvailableChangeProductVer(FabStdStep stdStep, string productVer)
        {
            string shopID = stdStep.ShopID;
            string stepID = stdStep.StepID;

            //1300 이전 공정 이면서 Ver에 X가 없는 Version은 변경 투입 가능함.
            if (BopHelper.IsArrayShop(shopID))
            {
                if (IsProductVer_X(productVer) == false)
                {
                    if (LcdHelper.Equals(Constants.GATE_PHOTO_STEP, stepID))
                    {
                        return(true);
                    }

                    //1300 이전 공정은 ProductVersion 변경가능 함.
                    var fromStep = BopHelper.FindStdStep(Constants.ArrayShop, Constants.GATE_PHOTO_STEP);
                    if (fromStep != null)
                    {
                        if (stdStep.StepSeq <= fromStep.StepSeq)
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Exemple #6
0
        public static FabProcess FindProcess2(string productID, string stepID)
        {
            string key = BopHelper.GetProcessKey2(productID, stepID);

            FabProcess proc;

            InputMart.Instance.ProcessMaps.TryGetValue(key, out proc);

            return(proc);
        }
Exemple #7
0
        public static FabProcess FindProcess(string shopID, string processID)
        {
            string key = BopHelper.GetProcessKey(shopID, processID);

            FabProcess proc;

            InputMart.Instance.FabProcess.TryGetValue(key, out proc);

            return(proc);
        }
Exemple #8
0
        private static void AddDcnTarget(ShopInTarget inTarget)
        {
            if (inTarget == null)
            {
                return;
            }

            //CELL 제외
            if (BopHelper.IsCellShop(inTarget.ShopID))
            {
                return;
            }

            int qty = (int)inTarget.TargetQty;

            if (qty <= 0)
            {
                return;
            }

            var product = inTarget.Product;

            if (product == null)
            {
                return;
            }

            FabStep inTargetStep = inTarget.TargetStep;

            if (inTargetStep == null)
            {
                return;
            }

            var dcnMst = ReleasePlanMaster.DcnMst;

            string shopID = product.ShopID;

            //ARRAY=A000, CF=C000
            string   stepID     = ReleasePlanMaster.GetShopStep(shopID);
            DateTime targetDate = inTarget.TargetDate;

            DcnTarget target = new DcnTarget()
            {
                InTarget   = inTarget,
                TargetStep = inTargetStep,
                Product    = product,
                StepID     = stepID,
                TargetDate = targetDate,
                TargetQty  = qty
            };

            dcnMst.AllTargets.Add(target);
        }
Exemple #9
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);
            }
        }
Exemple #10
0
        public static FabStep FindStep(string shopID, string processID, string stepID)
        {
            FabProcess proc = BopHelper.FindProcess(shopID, processID);

            if (proc != null)
            {
                return(proc.FindStep(stepID) as FabStep);
            }
            else
            {
                return(null);
            }
        }
Exemple #11
0
        private static void AddOutInfos(this CellInProfile profile, string shopID, List <ProfileItem> outInfos)
        {
            if (outInfos == null || outInfos.Count == 0)
            {
                return;
            }

            var list = BopHelper.IsArrayShop(shopID) ? profile.ArrayInfos : profile.CFInfos;

            foreach (var info in outInfos)
            {
                AddInfo(list, info);
            }
        }
Exemple #12
0
        private static void SetSupportSteps(this DcnMaster mst)
        {
            var gate = BopHelper.FindStdStep(Constants.ArrayShop, Constants.GATE_PHOTO_STEP);

            if (gate != null)
            {
                mst.SupportSteps.Add(gate);
            }

            var bm = BopHelper.FindStdStep(Constants.CfShop, Constants.BM__PHOTO_STEP);

            if (bm != null)
            {
                mst.SupportSteps.Add(bm);
            }
        }
Exemple #13
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);
                }
            }
        }
Exemple #14
0
        private static string GetShopStep(string shopID)
        {
            if (BopHelper.IsArrayShop(shopID))
            {
                return(ARRAY_STEP);
            }

            if (BopHelper.IsCfShop(shopID))
            {
                return(CF_STEP);
            }

            if (BopHelper.IsCellShop(shopID))
            {
                return(CELL_STEP);
            }

            return(Constants.NULL_ID);
        }
Exemple #15
0
        internal static string GetCfCode(string cellCode)
        {
            var list = GetCellBomByCellCode(cellCode, CellActionType.Ship);

            if (list == null || list.Count == 0)
            {
                return(null);
            }

            foreach (var item in list)
            {
                if (BopHelper.IsCfShop(item.FromShopID))
                {
                    return(item.FromProductID);
                }
            }

            return(null);
        }
Exemple #16
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);
        }
Exemple #17
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);
        }