void Initialize()
        {
            string condition = string.Format("where prodspec_id ='{0}'", prod);

            LotCatcher.Conditions = condition;
            LotDetails            = LotCatcher.GetEntities().EntityList.ToList();
        }
Beispiel #2
0
        void Initialize()
        {
            LotCatcher.Conditions = string.Format("where Lot_Owner_ID='{0}' and Lot_State='ACTIVE'", UserID);
            var lots = LotCatcher.GetEntities().EntityList;

            LotEntities = lots.Any() ? lots.ToList() : new List <Report62_Lot>();

            CastCatcher.Conditions = string.Format("where foup_owner ='{0}' and drbl_state !='SCRAPPED'", UserID);
            var casts = CastCatcher.GetEntities().EntityList;

            CastEntities = casts.Any() ? casts.ToList() : new List <Report_FoupOwner>();
        }
Beispiel #3
0
        private void Initialize()
        {
            LotCatcher.DB2.GetSomeData(DelOldRecords);
            LotCatcher.GetEntities();
            var lotList = LotCatcher.entities.EntityList;

            if (lotList.Count() < 1)
            {
                throw new Exception("没有YSTD Record");
            }
            WipChartPusher.entities.EntityList = LotCatcher.entities.EntityList;
            WipChartPusher.PushEntities();
        }
        void GetDatas()
        {
            int    year     = Convert.ToInt16(Month.Split('-')[0]);
            string strMonth = Month.Split('-')[1];
            int    month    = Convert.ToInt16(strMonth);
            int    days     = DateTime.DaysInMonth(year, month);

            LotCatcher.Conditions = string.Format("where Completion_Time between '{0}-01' and '{0}-{1}'", Month, days);
            LotCatcher.GetEntities();
            PlanCatcher.Conditions = string.Format("where Plan_Date like '{0}-%'", Month);
            PlanCatcher.GetEntities();

            //生成Items
            for (int i = 1; i <= days; i++)
            {
                Items.Add(string.Format("{0}/{1}", month, i));
                _items.Add(string.Format("{0}-{1}", Month, FixNumber(i)));
            }
            Items.Add(DateTime.Parse(Month + "-01").ToString("MMM", new System.Globalization.CultureInfo("en-us")));
        }
        public void Initialize()
        {
            var lotList = LotCatcher.GetEntities().EntityList;

            if (!lotList.Any())
            {
                throw new Exception("没有触发Qtime的Lot");
            }
            FlowCatcher.Conditions = string.Format("where mainpd_id in ('{0}')", string.Join("','", lotList.Select(s => s.MainPD_ID).Distinct()));
            FlowCatcher.GetEntities();
            //  HsCatcher.Conditions = string.Format("where lot_family_id",string.Join("','",lotList.Select(s=>s.Lot_ID)));
            foreach (var lot in lotList)
            {
                ReqRpt029TableEntity entity = new ReqRpt029TableEntity()
                {
                    LotID           = lot.Lot_ID,
                    OpeNo           = lot.Ope_No,
                    Priority        = lot.Priority_Class,
                    Qty             = lot.Qty,
                    LotHoldState    = lot.Lot_Hold_State,
                    LotProcessState = lot.Lot_Process_State,
                    ToOpeNo         = lot.To_Ope_No,
                    Qtime           = lot.Qtime,
                    FoupID          = lot.Cast_ID,
                    Location        = lot.Location,
                    Status          = lot.Xfer_State,
                    HoldCode        = lot.ReasonCode_ID,
                    HoldComment     = lot.Hold_Claim_Memo
                };
                var MainPDFlows = FlowCatcher.entities.EntityList.Where(w => w.MainPD_ID == lot.MainPD_ID);
                var flow        = MainPDFlows.Where(w => w.Ope_No == lot.Ope_No);
                if (flow.Any())
                {
                    entity.Department = flow.First().Description;
                    entity.EqpType    = flow.First().Eqp_Type;
                    entity.Step       = flow.First().PD_ID;
                }
                var toFlow = MainPDFlows.Where(w => w.Ope_No == lot.To_Ope_No);
                if (toFlow.Any())
                {
                    entity.ToDepartment = toFlow.First().Description;
                    entity.ToEqpType    = toFlow.First().Eqp_Type;
                    entity.ToStep       = toFlow.First().PD_ID;
                }
                flow = MainPDFlows.Where(w => w.Ope_No.CompareTo(lot.Ope_No) > 0 && w.Ope_No.CompareTo(lot.To_Ope_No) <= 0).OrderBy(o => o.Ope_No);
                //剩余站点ct
                double ct = flow.Where(w => w.PD_Std_Proc_Time_Min > 0).Sum(s => s.PD_Std_Proc_Time_Min);
                double m  = 2;
                if (lot.Priority_Class == 1)
                {
                    m = 1.3;
                }
                else if (lot.Priority_Class == 2)
                {
                    m = 1.6;
                }
                ct = ct * m;
                var curFlow = MainPDFlows.Where(w => w.Ope_No == lot.Ope_No && w.PD_Std_Proc_Time_Min > 0);
                //当前站点process time
                double pt = curFlow.Any() ? curFlow.First().PD_Std_Proc_Time_Min : 0;
                entity.RemainCt = pt + ct;
                bool isOrignLot = lot.Lot_ID.Substring(lot.Lot_ID.Length - 3) == ".00";
                if (isOrignLot)
                {
                    //如果不是分批的情况
                    HsCatcher.Conditions = string.Format("where lot_id='{0}' and ope_category in ('OperationComplete','STB') order by Claim_Time", lot.Lot_ID);
                    HsCatcher.GetEntities();
                    var hsList = HsCatcher.entities.EntityList;
                    entity.FirstStepInTime = hsList.Where(w => w.MainPD_ID == lot.MainPD_ID && w.Ope_No == lot.From_Ope_No).First().Claim_Time;
                }
                else
                {
                    //如果是分批的情况
                    entity.FirstStepInTime = GetTargetStepInTime(lot.Lot_ID, lot.MainPD_ID, lot.From_Ope_No);
                }
                Entities.Add(entity);
            }
        }