private static void StepChange_Curr(this StayHour info, FabStep currStep, DateTime now) { if (currStep != null) { //FromStepOutTime 미설정된 상태로 중간 Step에 진입한 경우(예외처리) if (info.FromStep.IsMainStep && info.FromStepOutTime == DateTime.MinValue) { if (info.IsMatchedStep(currStep)) { DateTime planStartTime = ModelContext.Current.StartTime; info.FromStepOutTime = planStartTime; #region WriteErrorHistory. string key = string.Format("Qtime{0}/{1}", info.Lot.LotID, currStep.StepKey); ErrHist.WriteIf(key, ErrCategory.SIMULATION, ErrLevel.INFO, currStep.FactoryID, currStep.ShopID, info.Lot.LineID, info.Product.ProductID, info.Lot.CurrentProductVersion, info.Lot.CurrentProcessID, Constants.NULL_ID, currStep.StepID, "NOT FOUND FROM_STEP_OUT_TIME", "Qtime:StepChange_Current"); #endregion } } info.CurrStepInTime = now; } }
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); } }
//internal static void InitMask_LocateWip(AoFactory factory, IHandlingBatch hb) //{ // FabLot lot = hb.ToFabLot(); // if (IsUseTool(lot) == false) // return; // if (lot.CurrentFabPlan.IsInitRunWip == false) // return; // var targetEqp = lot.CurrentPlan.LoadedResource as FabEqp; // if (targetEqp == null) // return; // var mask = targetEqp.InitMask; // if (mask == null) // return; // var aeqp = factory.GetEquipment(targetEqp.EqpID) as FabAoEquipment; // var loableList = GetLoadableMaskList(aeqp, lot); // if (loableList.Contains(mask)) // { // aeqp.SeizeMaskTool(mask, lot); // } // else // { // ErrHist.WriteIf(mask.ToolID, // ErrCategory.SIMULATION, // ErrLevel.INFO, // targetEqp.FactoryID, // targetEqp.ShopID, // lot.LotID, // lot.CurrentProductID, // lot.CurrentProductVersion ?? lot.Wip.ProductVersion, // lot.CurrentProcessID, // targetEqp.EqpID, // lot.CurrentStepID, // "CAN NOT INIT MASK_TOOL", // string.Format("Eqp InitMask : {0}", mask.ToolID) // ); // } //} internal static void InitLocate(AoEquipment aeqp, IHandlingBatch hb) { FabLot lot = hb.ToFabLot(); if (IsUseTool(lot) == false) { return; } FabEqp targetEqp = aeqp.Target as FabEqp; var mask = targetEqp.InitMask; if (mask == null) { return; } var loableList = GetLoadableMaskList(aeqp, lot); if (loableList.Contains(mask)) { lot.CurrentMask = mask; } else { ErrHist.WriteIf(mask.ToolID, ErrCategory.SIMULATION, ErrLevel.INFO, targetEqp.FactoryID, targetEqp.ShopID, lot.LotID, lot.CurrentProductID, lot.CurrentProductVersion ?? lot.Wip.ProductVersion, lot.CurrentProcessID, targetEqp.EqpID, lot.CurrentStepID, "CAN NOT INIT MASK_TOOL", string.Format("Eqp InitMask : {0}", mask.ToolID) ); } }