public static Dictionary <Tuple <string, string>, UIProcess> LoadProcessStep(MicronBEAssy.ResultDataContext resultDataContext) { Dictionary <Tuple <string, string>, UIProcess> processList = new Dictionary <Tuple <string, string>, UIProcess>(); foreach (ProcessStep info in resultDataContext.ModelContext.ProcessStep) { Tuple <string, string> key = new Tuple <string, string>(info.LINE_ID, info.PROCESS_ID); UIProcess process; if (processList.TryGetValue(key, out process) == false) { process = new UIProcess(info.LINE_ID, info.PROCESS_ID); processList.Add(key, process); } UIStep step = new UIStep(process, info.STEP_ID, info.SEQUENCE, info.STEP_GROUP); process.AddStep(step); } string dieBank = "DIE BANK"; string dieAttach = "DIE ATTACH"; string wireBond = "WIRE BOND"; List <string> stockSteps = new List <string> { "LOTS RECEIVED", "WAFER STORAGE INV", "DIE BANK" }; foreach (UIProcess process in processList.Values) { #if DEBUG if (process.ProcessID == "(MSB ASSY) M60A-X8_VFBGA-63/120_2.0") { Console.WriteLine(); } #endif List <UIStep> stepList = new List <UIStep>(process.Steps.Values); stepList.Sort((x, y) => x.Sequence.CompareTo(y.Sequence)); UIStep dieBankStep = null; UIStep firstDAStep = null; UIStep lastCR2Step = null; int daCnt = 0; foreach (UIStep step in stepList) { if (dieBankStep == null && step.StepID == dieBank) { dieBankStep = step; } if (firstDAStep == null && step.StepGroup == dieAttach) { firstDAStep = step; } if ((step.StepGroup == wireBond || step.StepGroup == dieAttach) && (lastCR2Step == null || lastCR2Step.Sequence < step.Sequence)) { lastCR2Step = step; } if (step.StepID.Length > 0 && (step.StepGroup == dieAttach || step.StepGroup == wireBond)) { process.DAWBProcess += step.StepID[0]; } if (step.StepGroup == dieAttach) { daCnt++; if (process.DaSteps.ContainsKey(daCnt) == false) { process.DaSteps.Add(daCnt, step); } } step.DaThroughCount = daCnt; } foreach (UIStep step in stepList) { if ((dieBankStep != null && step.Sequence <= dieBankStep.Sequence) || stockSteps.Contains(step.StepID)) { step.Categroy = UIStepCategory.STOCK; } else if (firstDAStep == null || step.Sequence < firstDAStep.Sequence) { step.Categroy = UIStepCategory.CR1; } else if (lastCR2Step != null && step.Sequence <= lastCR2Step.Sequence) { step.Categroy = UIStepCategory.CR2; } else { step.Categroy = UIStepCategory.EPE; } } } return(processList); }
internal static Dictionary <Tuple <string, string, bool, bool, int>, UIProduct> LoadProductRoute(MicronBEAssy.ResultDataContext resultDataContext) { _resultDataContext = resultDataContext; ProductInfos.Clear(); ProductDetailList.Clear(); Dictionary <Tuple <string, string>, UIProcess> processList = LoadProcessStep(resultDataContext); ProductDetailList = LoadProductDetail(resultDataContext, processList); CollectProductRouteData(); CollectBinSplitInfoData(); CollectAltProdInfoData(); // return(ProductInfos); }