Beispiel #1
0
        internal static void AddCurrentEqpRecipeInfo(FabLot lot, EqpRecipeInfo info)
        {
            if (lot.CurrentFabPlan.LotFilterInfo.RecipeTimes == null)
            {
                lot.CurrentFabPlan.LotFilterInfo.RecipeTimes = new Dictionary <string, EqpRecipeInfo>();
            }

            lot.CurrentFabPlan.LotFilterInfo.RecipeTimes[info.EqpID] = info;
        }
Beispiel #2
0
        public static bool IsEqpRecipeTime(AoEquipment aeqp, FabLot lot, Time inTime, ref string reason)
        {
            if (InputMart.Instance.GlobalParameters.ApplyRecipeTime == false)
            {
                return(true);
            }

            var eqp = aeqp.ToFabAoEquipment();
            List <EqpRecipeInfo> list = FilterMaster.GetRecipeMatchList(eqp, lot);

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

            EqpRecipeInfo info = list[0];

            //M 무조건 투입방지 (Matching에서 활용가능한 M만 가져왔음)
            if (info.Flag == RecipeFlag.M)
            {
                reason = string.Format("M:{0}≤{1}", info.MaxCount, info.TrackInCount);
                return(false);
            }

            //TestLot 하나 흘림. 그동안 해당 제품은 흘릴 수 없음.
            else if (info.Flag == RecipeFlag.X)
            {
                if (info.ActiveEndTime == Time.MaxValue)
                {
                    FilterMaster.AddCurrentEqpRecipeInfo(lot, info);
                    return(true);
                }

                if (info.ActiveStartTime != DateTime.MinValue)
                {
                    if (inTime < info.ActiveEndTime)
                    {
                        Time remain = info.ActiveEndTime - inTime;
                        reason = string.Format("X:Remain {0}Hour", remain.TotalHours.ToRound(1));
                        return(false);
                    }
                }
            }
            //DueDate까지만 흘릴 수 있음. (DueDate 이내에 Lot이 들어가지 않을 경우 X처럼동작
            else if (info.Flag == RecipeFlag.Y)
            {
                if (info.ChangeYtoX)
                {
                    if (info.ActiveStartTime != DateTime.MinValue)
                    {
                        if (inTime < info.ActiveEndTime)
                        {
                            Time remain = info.ActiveEndTime - inTime;
                            reason = string.Format("Y:Remain {0}Hour", remain.TotalHours.ToRound(1));
                            return(false);
                        }
                    }
                }
                else
                {
                    FilterMaster.AddCurrentEqpRecipeInfo(lot, info);
                }
            }

            return(true);
        }