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); }
public static void AddEqpState(EqpStatusInfo info) { if (info == null) { return; } string eqpID = info.EqpID; if (string.IsNullOrEmpty(eqpID)) { return; } if (info.Status == ResourceState.Up) { return; } var dcnMst = ReleasePlanMaster.DcnMst; if (dcnMst.EqpStates.ContainsKey(eqpID)) { return; } dcnMst.EqpStates.Add(eqpID, info); }
private static void Allocate_State(this DcnBucket bck, EqpStatusInfo info, DateTime startTime, DateTime endTime, DateTime now) { if (info == null) { return; } if (info.Duration <= 0) { return; } DateTime st = LcdHelper.Max(info.StartTime, startTime); DateTime et = LcdHelper.Min(info.EndTime, endTime); if (st < et) { DcnPlan plan = new DcnPlan() { Product = null, Target = null, AllocQty = 0, TactTime = 0, EqpStartTime = st, EqpEndTime = et, AllocTime = now, EqpID = bck.EqpID, EqpState = info.MesStatus.ToString() }; bck.LastEqpEndTime = et; bck.Plans.Add(plan); } if (info.EndTime > et) { info.StartTime = et; } else { //clear info.StartTime = DateTime.MinValue; info.EndTime = DateTime.MinValue; } }
public static void SetInitEqpStatus(this FabEqp targetEqp, FabAoEquipment eqp) { EqpStatusInfo info = targetEqp.StatusInfo; if (info == null) { return; } eqp.ContinuousQty = info.LastContinuousQty; //down 이후 setup 필요 (2020.01.14 - by.liujian(유건)) //if (targetEqp.State == ResourceState.Down && info.OrigineStatus != MesEqpStatus.IDLE) // return; var status = info.MesStatus; if (status == MesEqpStatus.RUN || status == MesEqpStatus.Set_Up || status == MesEqpStatus.E_RUN || info.OrigineStatus == MesEqpStatus.IDLE || info.OrigineStatus == MesEqpStatus.DOWN) { eqp.LastPlan = SimHelper.CreateInitLastPlan(info); } }