Beispiel #1
0
        private void ExpandLayer(List <EqpGantt.GanttInfo> list)
        {
            for (int i = 0; i < list.Count; i++)
            {
                var info = list[i];

                string eqpGroup = info.EqpGroup;
                string eqpID    = info.EqpID;
                string subEqpID = info.SubEqpID;
                string layer    = info.Layer;

                foreach (BarList barList in info.Items.Values)
                {
                    foreach (GanttBar bar in barList)
                    {
                        for (int j = 0; j < list.Count; j++)
                        {
                            EqpGantt.GanttInfo info2 = list[j];

                            bool condition = info2.Layer != layer && info2.EqpID == eqpID && info2.SubEqpID == subEqpID && bar.IsGhostBar == false && bar.State != EqpState.DOWN;

                            if (condition)
                            {
                                var ghostBar = new GanttBar(eqpGroup,
                                                            eqpID,
                                                            subEqpID,
                                                            layer,
                                                            bar.LotID,
                                                            bar.OrigLotID,
                                                            bar.WipInitRun,
                                                            bar.ProductID,
                                                            bar.ProductVersion,
                                                            bar.OwnerType,
                                                            bar.ProcessID,
                                                            bar.StepID,
                                                            bar.ToolID,
                                                            bar.StartTime,
                                                            bar.EndTime,
                                                            0,
                                                            (bar.State == EqpState.PM || bar.State == EqpState.DOWN) ? bar.State : EqpState.IDLERUN,
                                                            bar.EqpInfo,
                                                            bar.DispatchingInfo,
                                                            bar.LotPriority,
                                                            bar.EqpRecipe,
                                                            bar.StateInfo,
                                                            true);

                                info2.AddItem("ghost", ghostBar, this.IsProductInBarTitle);
                            }
                        }
                    }
                }

                if (info.Layer == "PM")
                {
                    list.RemoveAt(i);
                    i--;
                }
            }
        }
Beispiel #2
0
        public BrushInfo GetBrushInfo(GanttBar bar, string patternOfProdID)
        {
            BrushInfo brushinfo = null;

            if (bar.State == EqpState.SETUP)
            {
                brushinfo = new BrushInfo(Color.Red);
            }
            else if (bar.State == EqpState.IDLE || bar.State == EqpState.IDLERUN)
            {
                brushinfo = new BrushInfo(Color.White);
            }
            else if (bar.State == EqpState.PM)
            {
                brushinfo = new BrushInfo(Color.Black);
            }
            else if (bar.State == EqpState.DOWN)
            {
                brushinfo = new BrushInfo(HatchStyle.Percent30, Color.Gray, Color.Black);
            }
            else if (bar.IsGhostBar)
            {
                brushinfo = new BrushInfo(HatchStyle.Percent30, Color.LightGray, Color.White);
            }
            else
            {
                var color = GetBarColorByProductID(bar.ProductID);

                if (bar.WipInitRun == "Y")
                {
                    brushinfo = new BrushInfo(HatchStyle.Percent30, Color.Black, color);
                }
                else
                {
                    brushinfo = new BrushInfo(color);
                }
            }

            var selBar = this.SelectedBar;

            if (!this.EnableSelect || selBar == null)
            {
                bar.BackColor = brushinfo.BackColor;
                return(brushinfo);
            }

            if (!CompareToSelectedBar(bar, patternOfProdID))
            {
                bar.BackColor = this.BrushEmpth.BackColor;

                return(this.BrushEmpth);
            }

            bar.BackColor = brushinfo.BackColor;
            return(brushinfo);
        }
Beispiel #3
0
            public void AddItem(string key, GanttBar bar, bool isProductInBarTitle, bool isSplitA = false)
            {
                BarList list;

                if (this.Items.TryGetValue(key, out list) == false)
                {
                    this.Items.Add(key, list = new BarList());
                    list.Add(bar);
                    return;
                }

                foreach (GanttBar it in list)
                {
                    if (it.WipInitRun != bar.WipInitRun)
                    {
                        continue;
                    }

                    if (it.OwnerType != bar.OwnerType)
                    {
                        continue;
                    }

                    if (isProductInBarTitle)
                    {
                        if (it.ProductID + it.ProductVersion != bar.ProductID + bar.ProductVersion || it.State != bar.State)
                        {
                            continue;
                        }
                    }
                    else
                    {
                        if (it.LotID != bar.LotID || it.State != bar.State)
                        {
                            continue;
                        }
                    }

                    if (it.IsShiftSplit || (bar.IsShiftSplit && isSplitA == false) && it.State.Equals(bar.State))
                    {
                        return;
                    }

                    if (it.Merge(bar))
                    {
                        return;
                    }
                }

                list.Add(bar);
            }
Beispiel #4
0
        public bool CompareToSelectedBar(GanttBar bar, string patternOfProdID)
        {
            if (bar.IsGhostBar)
            {
                return(true);
            }

            if (bar.State == EqpState.PM || bar.State == EqpState.DOWN)
            {
                return(true);
            }

            if (this.MouseSelType == MouseSelectType.Pattern)
            {
                if (string.IsNullOrEmpty(patternOfProdID))
                {
                    return(true);
                }

                bool isLike = StringHelper.Like(bar.ProductID, patternOfProdID);

                return(isLike);
            }

            var selBar = this.SelectedBar as GanttBar;

            if (selBar == null)
            {
                return(true);
            }

            if (this.MouseSelType == MouseSelectType.Product)
            {
                return(selBar.ProductID == bar.ProductID);
            }
            else if (this.MouseSelType == MouseSelectType.PB)
            {
                return(selBar.ProductID + selBar.ProductVersion == bar.ProductID + bar.ProductVersion);
            }
            else if (this.MouseSelType == MouseSelectType.PO)
            {
                return(selBar.ProductID + selBar.StepID == bar.ProductID + bar.StepID);
            }
            else if (this.MouseSelType == MouseSelectType.POB)
            {
                return(selBar.ProductID + selBar.StepID + selBar.ProductVersion
                       == bar.ProductID + bar.StepID + bar.ProductVersion);
            }

            return(false);
        }
Beispiel #5
0
        public void SetBarInfo(GanttBar bar)
        {
            this._bar = bar;

            StringBuilder sb = new StringBuilder();

            if (bar != null)
            {
                //sb.AppendLine("+ -----------------------------------------");
                string stateInfo = StringHelper.IsEmptyID(bar.StateInfo) ? "" : string.Format(" [{0}]", bar.StateInfo);

                sb.AppendLine(string.Format("State : {0}{1}", bar.State.ToString(), stateInfo));
                sb.AppendLine(string.Format("EqpID : {0}", bar.EqpID));
                sb.AppendLine(string.Format("SubEqpID : {0}", bar.SubEqpID));
                sb.AppendLine(string.Format("Layer(Step) : {0}({1})", bar.Layer, bar.StepID));

                sb.AppendLine(string.Format("InQty : {0}", bar.TIQty));
                sb.AppendLine(string.Format("Start : {0}", bar.StartTime.ToString("yyyy-MM-dd HH:mm:ss")));
                sb.AppendLine(string.Format("End : {0}", bar.EndTime.ToString("yyyy-MM-dd HH:mm:ss")));
                sb.AppendLine(string.Format("Gap : {0}", bar.EndTime - bar.StartTime));

                sb.AppendLine(string.Format("LotID : {0}", bar.OrigLotID));
                sb.AppendLine(string.Format("ProductID : {0}", bar.ProductID));
                sb.AppendLine(string.Format("ProductVersion : {0}", bar.ProductVersion));
                sb.AppendLine(string.Format("OwnerType : {0}", bar.OwnerType));

                sb.AppendLine(string.Format("ProcessID : {0}", bar.ProcessID));
                sb.AppendLine(string.Format("ToolID : {0}", bar.ToolID));
                sb.AppendLine(string.Format("LotPriority : {0}", bar.LotPriority));
                sb.AppendLine(string.Format("LongTimeNoRun : {0}", bar.EqpRecipe ?? "N"));
            }

            memoEdit1.Text = sb.ToString();

            btnDispBar.Enabled = bar != null && bar.DispatchingInfo != null;
            btnDispEqp.Enabled = bar != null;
        }
Beispiel #6
0
        private void AddItem(
            string key,
            EqpMaster.Eqp eqpInfo,
            string subEqpID,
            int?subEqpCount,
            string layer,
            string lotID,
            string origLotID,
            string wipInitRun,
            string productID,
            string productVersion,
            string ownerID,
            string processID,
            string stepID,
            string toolID,
            DateTime startTime,
            DateTime endTime,
            int inQty,
            EqpState state,
            DataRow dispInfo,
            int lotPriority,
            string eqpRecipe,
            string stateInfo,
            bool isGhostBar = false)
        {
            string shopID   = eqpInfo.ShopID;
            string eqpGroup = eqpInfo.EqpGroup;
            string eqpID    = eqpInfo.EqpID;

            GanttInfo info;

            if (this.GanttInfos.TryGetValue(key, out info) == false)
            {
                this.GanttInfos.Add(key, info = new GanttInfo(eqpGroup, eqpID, subEqpID, subEqpCount, layer));
            }

            int sortSeq = GetSortSeq(shopID, stepID);

            //SortSeq MIN 기준으로 변경
            info.SortSeq = Math.Min(info.SortSeq, sortSeq);

            GanttBar bar = new GanttBar(eqpGroup,
                                        eqpID,
                                        subEqpID,
                                        layer,
                                        lotID,
                                        origLotID,
                                        wipInitRun,
                                        productID,
                                        productVersion,
                                        ownerID,
                                        processID,
                                        stepID,
                                        toolID,
                                        startTime,
                                        endTime,
                                        inQty,
                                        state,
                                        eqpInfo,
                                        dispInfo,
                                        lotPriority,
                                        eqpRecipe,
                                        stateInfo,
                                        isGhostBar);

            var barKey = state != EqpState.DOWN ? bar.BarKey : "DOWN";

            if (barKey != string.Empty)
            {
                //SETUP 다음 BUSY로 이어진 BUSY Bar는 SETUP과 동일한 값 설정 하도록 함.
                if (bar.DispatchingInfo == null && bar.State == EqpState.BUSY)
                {
                    bar.DispatchingInfo = GetDispInfoBySetup(info, barKey);
                }

                info.AddItem(barKey, bar, this.IsProductInBarTitle);
            }

            //collect job change
            if (state == EqpState.SETUP)
            {
                AddJobChange(startTime);
            }
        }