123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.Text;
- using DocumentFormat.OpenXml.Drawing;
- using MECF.Framework.Common.CommonData;
- using MECF.Framework.Common.Jobs;
- namespace Aitex.Core.Common
- {
- public enum WaferSize
- {
- WS0 = 0, //undefine, initialize status
- WS3 = 3,
- WS4 = 4,
- WS6 = 6,
- WS8 = 8,
- WS12 = 12,
- WS2 = 2,
- WS5 = 5,
- WS7 = 7,
- }
- public enum WaferStatus
- {
- Empty = 0,
- Normal = 1,
- Crossed = 2,
- Double = 3,
- Unknown = 4,
- Dummy = 5
- }
- public enum EnumE90Status
- {
- None = -1,
- NeedProcessing = 0,
- InProcess,
- Processed,
- Aborted,
- Stopped,
- Rejected,
- Lost,
- Skipped,
- }
- //public enum EnumWaferProcessStatus
- //{
- // NeedProcessing=0,
- // Processed,
- // Aborted,
- // Stopped,
- // Rejected,
- // Lost,
- // Skipped,
- //}
- public enum SubstrateTransportStatus
- {
- AtSource = 0,
- AtWork,
- AtDestination,
- None,
- }
- public enum EnumWaferProcessStatus
- {
- Idle = 0,
- InProcess,
- Completed,
- Failed,
- Wait,
- Abort,
- }
- public enum ProcessStatus
- {
- Idle = 0,
- Wait = 1,
- Busy = 2,
- Completed = 3,
- Failed = 4,
- Abort = 5,
- }
- public enum SubstAccessType
- {
- Create = 0,
- UpdateWaferID,
- Arrive,
- Left,
- UpdateLM1,
- UpdateLM2,
- Delete,
- Alignment,
- }
- [Serializable]
- [DataContract]
- public class SubstHistory
- {
- [DataMember]
- public string locationID { get; set; }
- [DataMember]
- public int SlotNO { get; set; }
- [DataMember]
- public DateTime AccessTimeIn { get; set; }
- [DataMember]
- public DateTime AccessTimeOut { get; set; }
- [DataMember]
- public SubstAccessType AccessType { get; set; }
- public SubstHistory(string loc, int slot, DateTime dt, SubstAccessType type)
- {
- locationID = loc;
- SlotNO = slot;
- AccessTimeIn = dt;
- AccessType = type;
- }
- }
- [Serializable]
- [DataContract]
- public class WaferInfo : NotifiableItem
- {
- private string procesjobid;
- [DataMember]
- public string ProcessJobID
- {
- get
- {
- return procesjobid;
- }
- set
- {
- procesjobid = value;
- InvokePropertyChanged("ProcessJobID");
- }
- }
- private string controljobid;
- [DataMember]
- public string ControlJobID
- {
- get
- {
- return controljobid;
- }
- set
- {
- controljobid = value;
- InvokePropertyChanged("ControlJobID");
- }
- }
- private SubstrateTransportStatus substtransstatus;
- [DataMember]
- public SubstrateTransportStatus SubstTransStatus
- {
- get
- {
- return substtransstatus;
- }
- set
- {
- substtransstatus = value;
- InvokePropertyChanged("SubstTransStatus");
- }
- }
- private EnumE90Status Subste90status;
- [DataMember]
- public EnumE90Status SubstE90Status
- {
- get
- {
- return Subste90status;
- }
- set
- {
- Subste90status = value;
- InvokePropertyChanged("SubstE90Status");
- }
- }
- private SubstHistory[] substhists;
- [DataMember]
- public SubstHistory[] SubstHists
- {
- get
- {
- return substhists;
- }
- set
- {
- substhists = value;
- InvokePropertyChanged("SubstHists");
- }
- }
- public bool IsEmpty
- {
- get { return Status == WaferStatus.Empty; }
- }
- private string waferID;
- [DataMember]
- public string WaferID
- {
- get
- {
- return waferID;
- }
- set
- {
- waferID = value;
- InvokePropertyChanged("WaferID");
- }
- }
- private string _waferOrigin;
- [DataMember]
- public string WaferOrigin
- {
- get
- {
- return _waferOrigin;
- }
- set
- {
- _waferOrigin = value;
- InvokePropertyChanged("WaferOrigin");
- }
- }
- private string hostlaserMark1;
- [DataMember]
- public string HostLaserMark1
- {
- get
- {
- return hostlaserMark1;
- }
- set
- {
- hostlaserMark1 = value;
- InvokePropertyChanged("HostLaserMark1");
- }
- }
- private string hostlaserMark2;
- [DataMember]
- public string HostLaserMark2
- {
- get
- {
- return hostlaserMark2;
- }
- set
- {
- hostlaserMark2 = value;
- InvokePropertyChanged("HostLaserMark2");
- }
- }
- private string laserMarker;
- [DataMember]
- public string LaserMarker
- {
- get
- {
- return laserMarker;
- }
- set
- {
- laserMarker = value;
- InvokePropertyChanged("LaserMarker");
- }
- }
- private string t7Code;
- [DataMember]
- public string T7Code
- {
- get
- {
- return t7Code;
- }
- set
- {
- t7Code = value;
- InvokePropertyChanged("T7Code");
- }
- }
- private string _laserMarkerScore;
- [DataMember]
- public string LaserMarkerScore
- {
- get
- {
- return _laserMarkerScore;
- }
- set
- {
- _laserMarkerScore = value;
- InvokePropertyChanged("LaserMarker1Score");
- }
- }
- private string _t7CodeScore;
- [DataMember]
- public string T7CodeScore
- {
- get
- {
- return _t7CodeScore;
- }
- set
- {
- _t7CodeScore = value;
- InvokePropertyChanged("T7CodeScore");
- }
- }
- private string _imageFileName;
- [DataMember]
- public string ImageFileName
- {
- get
- {
- return _imageFileName;
- }
- set
- {
- _imageFileName = value;
- InvokePropertyChanged("ImageFileName");
- }
- }
- private string _imageFilePath;
- [DataMember]
- public string ImageFilePath
- {
- get
- {
- return _imageFilePath;
- }
- set
- {
- _imageFilePath = value;
- InvokePropertyChanged("ImageFilePath");
- }
- }
- [DataMember]
- public string LotId { get; set; }
- [DataMember]
- public string TransFlag { get; set; }
- private WaferStatus status;
- [DataMember]
- public WaferStatus Status
- {
- get
- {
- return status;
- }
- set
- {
- status = value;
- InvokePropertyChanged("Status");
- }
- }
- [DataMember]
- public string CurrentCarrierID
- {
- get;
- set;
- }
- [DataMember]
- public int Station
- {
- get;
- set;
- }
- [DataMember]
- public int Slot
- {
- get;
- set;
- }
- [DataMember]
- public int OriginStation
- {
- get;
- set;
- }
- [DataMember]
- public int OriginSlot
- {
- get;
- set;
- }
- [DataMember]
- public string OriginCarrierID
- {
- get;
- set;
- }
- [DataMember]
- public int DestinationStation
- {
- get;
- set;
- }
- [DataMember]
- public string DestinationCarrierID
- {
- get;
- set;
- }
- [DataMember]
- public int DestinationSlot
- {
- get;
- set;
- }
- [DataMember]
- public int NextStation
- {
- get;
- set;
- }
- [DataMember]
- public int NextStationSlot
- {
- get;
- set;
- }
- [DataMember]
- public int Notch
- {
- get;
- set;
- }
- [DataMember]
- public WaferSize Size
- {
- get;
- set;
- }
- private bool isChecked;
- public bool IsChecked
- {
- get
- { return isChecked; }
- set
- {
- isChecked = value;
- InvokePropertyChanged("IsChecked");
- }
- }
- [DataMember]
- public string PPID //Recipe or Sequence
- {
- get;
- set;
- }
- private EnumWaferProcessStatus processState;
- [DataMember]
- public EnumWaferProcessStatus ProcessState
- {
- get
- {
- return processState;
- }
- set
- {
- processState = value;
- InvokePropertyChanged("ProcessStatus");
- }
- }
- private bool isSource;
- [DataMember]
- public bool IsSource
- {
- get
- {
- return isSource;
- }
- set
- {
- isSource = value;
- InvokePropertyChanged("IsSource");
- }
- }
- private bool isDestination;
- [DataMember]
- public bool IsDestination
- {
- get
- {
- return isDestination;
- }
- set
- {
- isDestination = value;
- InvokePropertyChanged("IsDestination");
- }
- }
- [DataMember]
- public Guid InnerId { get; set; }
- [DataMember]
- public ProcessJobInfo ProcessJob { get; set; }
- [DataMember]
- public int NextSequenceStep { get; set; }
- [DataMember]
- public bool HasWarning { get; set; }
- public WaferInfo()
- {
- InnerId = Guid.Empty;
- }
- public WaferInfo(string waferID, WaferStatus status = WaferStatus.Empty) : this()
- {
- this.WaferID = waferID;
- this.Status = status;
- }
- public void Update(WaferInfo source)
- {
- InnerId = source.InnerId;
- WaferID = source.waferID;
- WaferOrigin = source.WaferOrigin;
- LaserMarker = source.LaserMarker;
- LaserMarkerScore = source.LaserMarkerScore;
- T7Code = source.T7Code;
- T7CodeScore = source.T7CodeScore;
- Status = source.Status;
- ProcessState = source.ProcessState;
- IsSource = source.IsSource;
- IsDestination = source.IsDestination;
- Station = source.Station;
- Slot = source.Slot;
- OriginStation = source.OriginStation;
- OriginSlot = source.OriginSlot;
- if (source.OriginCarrierID != null) OriginCarrierID = source.OriginCarrierID;
- if (source.DestinationCarrierID != null) DestinationCarrierID = source.DestinationCarrierID;
- DestinationStation = source.DestinationStation;
- DestinationSlot = source.DestinationSlot;
- NextStation = source.NextStation;
- NextStationSlot = source.NextStationSlot;
- Notch = source.Notch;
- Size = source.Size;
- TransFlag = source.TransFlag;
- LotId = source.LotId;
- ProcessJob = source.ProcessJob;
- NextSequenceStep = source.NextSequenceStep;
- SubstHists = source.SubstHists;
- HasWarning = source.HasWarning;
- SubstE90Status = source.SubstE90Status;
- PPID = source.PPID;
- HostLaserMark1 = source.HostLaserMark1;
- HostLaserMark2 = source.HostLaserMark2;
- }
- public WaferInfo Clone()
- {
- WaferInfo source = this;
- return new WaferInfo()
- {
- InnerId = source.InnerId,
- WaferID = source.waferID,
- WaferOrigin = source.WaferOrigin,
- LaserMarker = source.LaserMarker,
- LaserMarkerScore = source.LaserMarkerScore,
- T7Code = source.T7Code,
- T7CodeScore = source.T7CodeScore,
- Status = source.Status,
- ProcessState = source.ProcessState,
- IsSource = source.IsSource,
- IsDestination = source.IsDestination,
- Station = source.Station,
- Slot = source.Slot,
- OriginStation = source.OriginStation,
- OriginSlot = source.OriginSlot,
- OriginCarrierID = source.OriginCarrierID,
- DestinationCarrierID = source.DestinationCarrierID,
- DestinationStation = source.DestinationStation,
- DestinationSlot = source.DestinationSlot,
- NextStation = source.NextStation,
- NextStationSlot = source.NextStationSlot,
- Notch = source.Notch,
- Size = source.Size,
- TransFlag = source.TransFlag,
- LotId = source.LotId,
- ProcessJob = source.ProcessJob,
- NextSequenceStep = source.NextSequenceStep,
- SubstHists = source.SubstHists,
- HasWarning = source.HasWarning,
- SubstE90Status = source.SubstE90Status,
- PPID = source.PPID,
- };
- }
- public void SetEmpty()
- {
- this.InnerId = Guid.Empty;
- this.WaferID = string.Empty;
- this.WaferOrigin = string.Empty;
- this.LaserMarker = string.Empty;
- this.LaserMarkerScore = string.Empty;
- this.T7Code = string.Empty;
- this.T7CodeScore = string.Empty;
- this.Status = (int)WaferStatus.Empty;
- this.ProcessState = EnumWaferProcessStatus.Idle;
- this.IsSource = false;
- this.IsDestination = false;
- this.Station = 0;
- this.Slot = 0;
- this.OriginStation = 0;
- this.OriginSlot = 0;
- //this.SourceStation = 0;
- //this.SourceSlot = 0;
- this.DestinationStation = 0;
- this.DestinationSlot = 0;
- this.Notch = 0;
- //保留最后一次的Wafer Size信息,便于后续判断和优化
- //this.Size = WaferSize.WS0;
- this.TransFlag = string.Empty;
- this.LotId = string.Empty;
- this.ProcessJob = null;
- this.NextSequenceStep = 0;
- this.HasWarning = false;
- this.PPID = "";
- }
- }
- }
|