Esempio n. 1
0
        public int GetWips(WipType wipType, string productVersion)
        {
            List <FabLot> list = GetWipList(wipType);

            if (list == null)
            {
                return(0);
            }

            int wipQty = 0;

            foreach (FabLot lot in list)
            {
                if (LcdHelper.IsEmptyID(productVersion))
                {
                    wipQty += lot.UnitQty;
                }
                else if (lot.OrigProductVersion == productVersion)
                {
                    wipQty += lot.UnitQty;
                }
            }

            return(wipQty);
        }
Esempio n. 2
0
        internal static CellBom FindCellBomAtFrom(string productID, string prodVer, CellActionType actionType)
        {
            List <CellBom> list = GetCellBomAtFrom(productID, actionType);

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

            CellBom bom = null;

            foreach (var item in list)
            {
                if (actionType != CellActionType.None && item.ActionType != actionType)
                {
                    continue;
                }

                if (LcdHelper.IsEmptyID(item.CellCode))
                {
                    continue;
                }

                if (prodVer != Constants.ALL && prodVer != item.FromProductVer)
                {
                    continue;
                }

                bom = item;
                break;
            }

            return(bom);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        private static bool IsVersionChange(string fromVersion, string toVersion)
        {
            if (LcdHelper.IsEmptyID(fromVersion))
            {
                return(true);
            }

            return(fromVersion != toVersion);
        }
Esempio n. 5
0
        private static Time GetMaskTransferTime(string from, string to)
        {
            if (LcdHelper.IsEmptyID(from))
            {
                return(Time.FromMinutes(30));
            }

            return(Time.FromMinutes(60));
        }
Esempio n. 6
0
        public static FabWeightPreset GetWeightPreset(string presetID)
        {
            if (LcdHelper.IsEmptyID(presetID))
            {
                return(null);
            }

            FabWeightPreset preset;

            InputMart.Instance.FabWeightPreset.TryGetValue(presetID, out preset);

            return(preset);
        }
Esempio n. 7
0
        private StepRouteByProdVersion GetStepProdVersion(string productVersion)
        {
            if (LcdHelper.IsEmptyID(productVersion))
            {
                return(null);
            }

            StepRouteByProdVersion info;

            _verList.TryGetValue(productVersion, out info);

            return(info);
        }
Esempio n. 8
0
        public static string MergeString(string org, string dst)
        {
            string result = LcdHelper.IdentityNull();

            if (LcdHelper.IsEmptyID(org) == true)
            {
                result = dst;
            }
            else
            {
                result = string.Format("{0},{1}", org, dst);
            }

            return(result);
        }
Esempio n. 9
0
        public static bool ToBoolYN(this string yn, bool defaultValue)
        {
            if (LcdHelper.IsEmptyID(yn))
            {
                return(defaultValue);
            }

            if (string.Equals(LcdHelper.Trim(yn), "Y", StringComparison.CurrentCultureIgnoreCase))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 10
0
            public string GetMaxQtyVersion()
            {
                if (_isSelect == false)
                {
                    string selectVersion = FindMaxVersion(this.AfterCOAWips);

                    if (LcdHelper.IsEmptyID(selectVersion))
                    {
                        selectVersion = FindMaxVersion(this.WipList);
                    }

                    this.MaxVersion = selectVersion;
                    _isSelect       = true;
                }

                return(this.MaxVersion);
            }
Esempio n. 11
0
        public static FabWeightPreset GetSafeWeightPreset(string presetID)
        {
            if (LcdHelper.IsEmptyID(presetID))
            {
                return(null);
            }

            FabWeightPreset preset;

            if (InputMart.Instance.FabWeightPreset.TryGetValue(presetID, out preset) == false)
            {
                preset = new FabWeightPreset(presetID);
                InputMart.Instance.FabWeightPreset.Add(presetID, preset);
            }

            return(preset);
        }
Esempio n. 12
0
            private string FindMaxVersion(Dictionary <string, List <FabLot> > dic)
            {
                int    max           = 0;
                string selectVersion = string.Empty;

                foreach (var item in dic)
                {
                    int qty = item.Value.Sum(p => p.UnitQty);

                    if (LcdHelper.IsEmptyID(item.Key) == false && qty > max)
                    {
                        max           = qty;
                        selectVersion = item.Key;
                    }
                }

                return(selectVersion);
            }
Esempio n. 13
0
        private static Time GetTransferTime(string from, string to)
        {
            //TimeSpan defaultTime = TimeSpan.FromMinutes(InputMart.Instance.GetConfigParameters(string.Empty).DefaultTransferTime);
            Time defaultTime = SiteConfigHelper.GetDefaultTransferTime();

            if (LcdHelper.IsEmptyID(from) || LcdHelper.IsEmptyID(to))
            {
                return(defaultTime);
            }

            EqpMoveTime time = InputMart.Instance.EqpMoveTimeView.FindRows(from, to).FirstOrDefault();

            if (time != null)
            {
                return(Time.FromMinutes(time.TRANSFER_TIME));
            }

            return(defaultTime);
        }
Esempio n. 14
0
        public static FabWeightPreset GetDebugPreset(string presetID)
        {
            if (GlobalParameters.Instance.ApplyDebug == false)
            {
                return(null);
            }

            string debugPreset = InputMart.Instance.GlobalParameters.DebugPreset;

            if (string.IsNullOrEmpty(debugPreset) == false && LcdHelper.IsEmptyID(debugPreset) == false)
            {
                int index = presetID.IndexOf("_");
                if (index >= 0)
                {
                    string testPresetID = LcdHelper.Concat(debugPreset, presetID.Substring(index));
                    var    preset       = WeightHelper.GetWeightPreset(testPresetID);

                    return(preset);
                }
            }

            return(null);
        }
Esempio n. 15
0
        public List <FabLot> GetStepWipList(FabStep step, WipType wipType, string productVer)
        {
            List <FabLot> list   = GetStepWipList(step, wipType);
            List <FabLot> result = new List <FabLot>();

            if (list == null)
            {
                return(result);
            }

            foreach (var lot in list)
            {
                if (LcdHelper.IsEmptyID(productVer))
                {
                    result.Add(lot);
                }
                else if (lot.OrigProductVersion == productVer)
                {
                    result.Add(lot);
                }
            }

            return(result);
        }
Esempio n. 16
0
        internal static List <EqpRecipeInfo> GetRecipeMatchList(FabAoEquipment eqp, FabLot lot)
        {
            FabStep step      = lot.CurrentFabStep;
            FabMask mask      = lot.CurrentMask;
            string  productID = lot.CurrentProductID;

            string stepID  = step.StdStep.RecipeLPOBM.Contains("O") ? lot.CurrentFabStep.StepID : Constants.NULL_ID;
            string prodVer = step.StdStep.RecipeLPOBM.Contains("B") ? lot.CurrentProductVersion : Constants.NULL_ID;;
            string toolID  = step.StdStep.RecipeLPOBM.Contains("M") ? mask != null ? mask.ToolID : Constants.NULL_ID : Constants.NULL_ID;

            string key = LcdHelper.CreateKey(eqp.EqpID, step.StepID, productID, prodVer, toolID);

            List <EqpRecipeInfo> list;

            if (_cacheRecipeInfo.TryGetValue(key, out list))
            {
                return(list);
            }

            FabEqp targetEqp = eqp.TargetEqp;

            if (targetEqp.RecipeTime.TryGetValue(productID, out list) == false)
            {
                return(new List <EqpRecipeInfo>());
            }

            List <EqpRecipeInfo> result = new List <EqpRecipeInfo>();

            foreach (var item in list)
            {
                if (item.Flag == RecipeFlag.N || item.Flag == RecipeFlag.None)
                {
                    continue;
                }

                if (item.Flag == RecipeFlag.M && item.IsVaildMFlag == false)
                {
                    continue;
                }

                string runMode = eqp.GetCurrentRunMode();

                //RunMode
                if (LcdHelper.IsEmptyID(runMode) == false)
                {
                    if (runMode != item.RunMode)
                    {
                        continue;
                    }
                }

                //Shop
                if (step.ShopID != item.ShopID)
                {
                    continue;
                }

                //O - Step
                if (LcdHelper.IsEmptyID(stepID) == false && stepID != item.StepID)
                {
                    continue;
                }

                //B - Version
                if (LcdHelper.IsEmptyID(prodVer) == false)
                {
                    if (item.ProductVersion != prodVer)
                    {
                        continue;
                    }
                }

                //M - Mask
                if (LcdHelper.IsEmptyID(toolID) == false)
                {
                    if (toolID != item.ToolID)
                    {
                        continue;
                    }
                }

                result.Add(item);
            }

            result.Sort(new CompareHelper.EqpRecipeTimeComparer());

            _cacheRecipeInfo.Add(key, result);

            return(result);
        }