WaferInfo.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Runtime.Serialization;
  6. using System.Text;
  7. using DocumentFormat.OpenXml.Drawing;
  8. using MECF.Framework.Common.CommonData;
  9. using MECF.Framework.Common.Jobs;
  10. namespace Aitex.Core.Common
  11. {
  12. public enum WaferSize
  13. {
  14. WS0, //undefine, initialize status
  15. WS3,
  16. WS4,
  17. WS6,
  18. WS8,
  19. WS12,
  20. WS2,
  21. WS5,
  22. }
  23. public enum WaferStatus
  24. {
  25. Empty = 0,
  26. Normal = 1,
  27. Crossed = 2,
  28. Double = 3,
  29. Unknown = 4,
  30. Dummy = 5
  31. }
  32. public enum EnumE90Status
  33. {
  34. None = -1,
  35. NeedProcessing = 0,
  36. InProcess,
  37. Processed,
  38. Aborted,
  39. Stopped,
  40. Rejected,
  41. Lost,
  42. Skipped,
  43. }
  44. //public enum EnumWaferProcessStatus
  45. //{
  46. // NeedProcessing=0,
  47. // Processed,
  48. // Aborted,
  49. // Stopped,
  50. // Rejected,
  51. // Lost,
  52. // Skipped,
  53. //}
  54. public enum SubstrateTransportStatus
  55. {
  56. AtSource =0,
  57. AtWork,
  58. AtDestination,
  59. None,
  60. }
  61. public enum EnumWaferProcessStatus
  62. {
  63. Idle = 0,
  64. InProcess,
  65. Completed,
  66. Failed,
  67. Warnning,
  68. Wait,
  69. Abort,
  70. }
  71. public enum ProcessStatus
  72. {
  73. Idle = 0,
  74. Wait = 1,
  75. Busy = 2,
  76. Completed = 3,
  77. Failed = 4,
  78. Abort = 5,
  79. }
  80. public enum SubstAccessType
  81. {
  82. Create=0,
  83. UpdateWaferID,
  84. Arrive,
  85. Left,
  86. UpdateLM1,
  87. UpdateLM2,
  88. Delete,
  89. Alignment,
  90. }
  91. public enum WaferType
  92. {
  93. None,
  94. P,//Production wafer Processed so that a thin film forms on the surface, and becomes product.
  95. M,//Monitor wafer Used for film thickness and particle inspection
  96. M1,//Monitor wafer Used for film thickness and particle inspection
  97. M2,//Monitor wafer Used for film thickness and particle inspection
  98. SD,//Side dummy wafer Used to rectify process gases for more uniform wafer processing production.
  99. ED,//Extra dummy wafer Used as a supplement when there is a shortage of production wafers.
  100. XD,//Expert dummy wafer Dummy wafer used in expert mode to fill empty slots during test wafer processing.
  101. T,//Test wafer Used in expert mode for process verification, performance verification, and pilot processes
  102. }
  103. [Serializable]
  104. [DataContract]
  105. public class SubstHistory
  106. {
  107. [DataMember]
  108. public string locationID { get; set; }
  109. [DataMember]
  110. public int SlotNO { get; set; }
  111. [DataMember]
  112. public DateTime AccessTime { get; set; }
  113. [DataMember]
  114. public SubstAccessType AccessType { get; set; }
  115. public SubstHistory(string loc,int slot,DateTime dt, SubstAccessType type)
  116. {
  117. locationID = loc;
  118. SlotNO = slot;
  119. AccessTime = dt;
  120. AccessType = type;
  121. }
  122. }
  123. [Serializable]
  124. [DataContract]
  125. public class WaferInfo : NotifiableItem
  126. {
  127. private string procesjobid;
  128. [DataMember]
  129. public string ProcessJobID
  130. {
  131. get
  132. {
  133. return procesjobid;
  134. }
  135. set
  136. {
  137. procesjobid = value;
  138. InvokePropertyChanged("ProcessJobID");
  139. }
  140. }
  141. private string controljobid;
  142. [DataMember]
  143. public string ControlJobID
  144. {
  145. get
  146. {
  147. return controljobid;
  148. }
  149. set
  150. {
  151. controljobid = value;
  152. InvokePropertyChanged("ControlJobID");
  153. }
  154. }
  155. private SubstrateTransportStatus substtransstatus;
  156. [DataMember]
  157. public SubstrateTransportStatus SubstTransStatus
  158. {
  159. get
  160. {
  161. return substtransstatus;
  162. }
  163. set
  164. {
  165. substtransstatus = value;
  166. InvokePropertyChanged("SubstTransStatus");
  167. }
  168. }
  169. private EnumE90Status Subste90status;
  170. [DataMember]
  171. public EnumE90Status SubstE90Status
  172. {
  173. get
  174. {
  175. return Subste90status;
  176. }
  177. set
  178. {
  179. Subste90status = value;
  180. InvokePropertyChanged("SubstE90Status");
  181. }
  182. }
  183. private SubstHistory[] substhists;
  184. [DataMember]
  185. public SubstHistory[] SubstHists
  186. {
  187. get
  188. {
  189. return substhists;
  190. }
  191. set
  192. {
  193. substhists = value;
  194. InvokePropertyChanged("SubstHists");
  195. }
  196. }
  197. public bool IsEmpty
  198. {
  199. get { return Status == WaferStatus.Empty; }
  200. }
  201. private string waferID;
  202. [DataMember]
  203. public string WaferID
  204. {
  205. get
  206. {
  207. return waferID;
  208. }
  209. set
  210. {
  211. waferID = value;
  212. InvokePropertyChanged("WaferID");
  213. }
  214. }
  215. private string _waferOrigin;
  216. [DataMember]
  217. public string WaferOrigin
  218. {
  219. get
  220. {
  221. return _waferOrigin;
  222. }
  223. set
  224. {
  225. _waferOrigin = value;
  226. InvokePropertyChanged("WaferOrigin");
  227. }
  228. }
  229. private string hostlaserMark1;
  230. [DataMember]
  231. public string HostLaserMark1
  232. {
  233. get
  234. {
  235. return hostlaserMark1;
  236. }
  237. set
  238. {
  239. hostlaserMark1 = value;
  240. InvokePropertyChanged("HostLaserMark1");
  241. }
  242. }
  243. private string hostlaserMark2;
  244. [DataMember]
  245. public string HostLaserMark2
  246. {
  247. get
  248. {
  249. return hostlaserMark2;
  250. }
  251. set
  252. {
  253. hostlaserMark2 = value;
  254. InvokePropertyChanged("HostLaserMark2");
  255. }
  256. }
  257. private string laserMarker;
  258. [DataMember]
  259. public string LaserMarker
  260. {
  261. get
  262. {
  263. return laserMarker;
  264. }
  265. set
  266. {
  267. laserMarker = value;
  268. InvokePropertyChanged("LaserMarker");
  269. }
  270. }
  271. private string t7Code;
  272. [DataMember]
  273. public string T7Code
  274. {
  275. get
  276. {
  277. return t7Code;
  278. }
  279. set
  280. {
  281. t7Code = value;
  282. InvokePropertyChanged("T7Code");
  283. }
  284. }
  285. private string _laserMarkerScore;
  286. [DataMember]
  287. public string LaserMarkerScore
  288. {
  289. get
  290. {
  291. return _laserMarkerScore;
  292. }
  293. set
  294. {
  295. _laserMarkerScore = value;
  296. InvokePropertyChanged("LaserMarker1Score");
  297. }
  298. }
  299. private string _t7CodeScore;
  300. [DataMember]
  301. public string T7CodeScore
  302. {
  303. get
  304. {
  305. return _t7CodeScore;
  306. }
  307. set
  308. {
  309. _t7CodeScore = value;
  310. InvokePropertyChanged("T7CodeScore");
  311. }
  312. }
  313. private string _imageFileName;
  314. [DataMember]
  315. public string ImageFileName
  316. {
  317. get
  318. {
  319. return _imageFileName;
  320. }
  321. set
  322. {
  323. _imageFileName = value;
  324. InvokePropertyChanged("ImageFileName");
  325. }
  326. }
  327. private string _imageFilePath;
  328. [DataMember]
  329. public string ImageFilePath
  330. {
  331. get
  332. {
  333. return _imageFilePath;
  334. }
  335. set
  336. {
  337. _imageFilePath = value;
  338. InvokePropertyChanged("ImageFilePath");
  339. }
  340. }
  341. [DataMember]
  342. public string LotId { get; set; }
  343. [DataMember]
  344. public string TransFlag { get; set; }
  345. private WaferStatus status;
  346. [DataMember]
  347. public WaferStatus Status
  348. {
  349. get
  350. {
  351. return status;
  352. }
  353. set
  354. {
  355. status = value;
  356. InvokePropertyChanged("Status");
  357. }
  358. }
  359. [DataMember]
  360. public string CurrentCarrierID
  361. {
  362. get;
  363. set;
  364. }
  365. [DataMember]
  366. public int Station
  367. {
  368. get;
  369. set;
  370. }
  371. [DataMember]
  372. public int Slot
  373. {
  374. get;
  375. set;
  376. }
  377. [DataMember]
  378. public int OriginStation
  379. {
  380. get;
  381. set;
  382. }
  383. [DataMember]
  384. public int OriginSlot
  385. {
  386. get;
  387. set;
  388. }
  389. [DataMember]
  390. public string OriginCarrierID
  391. {
  392. get;
  393. set;
  394. }
  395. [DataMember]
  396. public int DestinationStation
  397. {
  398. get;
  399. set;
  400. }
  401. [DataMember]
  402. public string DestinationCarrierID
  403. {
  404. get;
  405. set;
  406. }
  407. [DataMember]
  408. public int DestinationSlot
  409. {
  410. get;
  411. set;
  412. }
  413. [DataMember]
  414. public int NextStation
  415. {
  416. get;
  417. set;
  418. }
  419. [DataMember]
  420. public int NextStationSlot
  421. {
  422. get;
  423. set;
  424. }
  425. [DataMember]
  426. public int Notch
  427. {
  428. get;
  429. set;
  430. }
  431. [DataMember]
  432. public float UseCount
  433. {
  434. get;
  435. set;
  436. }
  437. [DataMember]
  438. public float UseTime
  439. {
  440. get;
  441. set;
  442. }
  443. [DataMember]
  444. public float UseThick
  445. {
  446. get;
  447. set;
  448. }
  449. [DataMember]
  450. public float Thick
  451. {
  452. get;
  453. set;
  454. }
  455. [DataMember]
  456. public WaferSize Size
  457. {
  458. get;
  459. set;
  460. }
  461. private bool isChecked;
  462. public bool IsChecked
  463. {
  464. get
  465. { return isChecked; }
  466. set
  467. {
  468. isChecked = value;
  469. InvokePropertyChanged("IsChecked");
  470. }
  471. }
  472. [DataMember]
  473. public string PPID //Recipe or Sequence
  474. {
  475. get;
  476. set;
  477. }
  478. private EnumWaferProcessStatus processState;
  479. [DataMember]
  480. public EnumWaferProcessStatus ProcessState
  481. {
  482. get
  483. {
  484. return processState;
  485. }
  486. set
  487. {
  488. processState = value;
  489. InvokePropertyChanged("ProcessStatus");
  490. }
  491. }
  492. private bool isSource;
  493. [DataMember]
  494. public bool IsSource
  495. {
  496. get
  497. {
  498. return isSource;
  499. }
  500. set
  501. {
  502. isSource = value;
  503. InvokePropertyChanged("IsSource");
  504. }
  505. }
  506. private bool isDestination;
  507. [DataMember]
  508. public bool IsDestination
  509. {
  510. get
  511. {
  512. return isDestination;
  513. }
  514. set
  515. {
  516. isDestination = value;
  517. InvokePropertyChanged("IsDestination");
  518. }
  519. }
  520. [DataMember]
  521. public Guid InnerId { get; set; }
  522. [DataMember]
  523. public ProcessJobInfo ProcessJob { get; set; }
  524. [DataMember]
  525. public int NextSequenceStep { get; set; }
  526. [DataMember]
  527. public bool HasWarning { get; set; }
  528. [DataMember]
  529. public bool HasError { get; set; }
  530. [DataMember]
  531. public WaferType WaferType { get; set; }
  532. public WaferInfo()
  533. {
  534. InnerId = Guid.Empty;
  535. }
  536. public WaferInfo(string waferID, WaferStatus status = WaferStatus.Empty) : this()
  537. {
  538. this.WaferID = waferID;
  539. this.Status = status;
  540. }
  541. public void Update(WaferInfo source)
  542. {
  543. InnerId = source.InnerId;
  544. WaferID = source.waferID;
  545. WaferOrigin = source.WaferOrigin;
  546. LaserMarker = source.LaserMarker;
  547. LaserMarkerScore = source.LaserMarkerScore;
  548. T7Code = source.T7Code;
  549. T7CodeScore = source.T7CodeScore;
  550. Status = source.Status;
  551. ProcessState = source.ProcessState;
  552. IsSource = source.IsSource;
  553. IsDestination = source.IsDestination;
  554. Station = source.Station;
  555. Slot = source.Slot;
  556. OriginStation = source.OriginStation;
  557. OriginSlot = source.OriginSlot;
  558. if(source.OriginCarrierID!=null) OriginCarrierID = source.OriginCarrierID;
  559. if (source.DestinationCarrierID != null) DestinationCarrierID = source.DestinationCarrierID;
  560. DestinationStation = source.DestinationStation;
  561. DestinationSlot = source.DestinationSlot;
  562. NextStation = source.NextStation;
  563. NextStationSlot = source.NextStationSlot;
  564. Notch = source.Notch;
  565. Size = source.Size;
  566. TransFlag = source.TransFlag;
  567. LotId = source.LotId;
  568. ProcessJob = source.ProcessJob;
  569. NextSequenceStep = source.NextSequenceStep;
  570. SubstHists = source.SubstHists;
  571. HasWarning = source.HasWarning;
  572. HasError = source.HasError;
  573. SubstE90Status = source.SubstE90Status;
  574. PPID = source.PPID;
  575. HostLaserMark1 = source.HostLaserMark1;
  576. HostLaserMark2 = source.HostLaserMark2;
  577. WaferType = source.WaferType;
  578. UseCount = source.UseCount;
  579. UseTime = source.UseTime;
  580. UseThick = source.UseThick;
  581. }
  582. public WaferInfo Clone()
  583. {
  584. WaferInfo source = this;
  585. return new WaferInfo()
  586. {
  587. InnerId = source.InnerId,
  588. WaferID = source.waferID,
  589. WaferOrigin = source.WaferOrigin,
  590. LaserMarker = source.LaserMarker,
  591. LaserMarkerScore = source.LaserMarkerScore,
  592. T7Code = source.T7Code,
  593. T7CodeScore = source.T7CodeScore,
  594. Status = source.Status,
  595. ProcessState = source.ProcessState,
  596. IsSource = source.IsSource,
  597. IsDestination = source.IsDestination,
  598. Station = source.Station,
  599. Slot = source.Slot,
  600. OriginStation = source.OriginStation,
  601. OriginSlot = source.OriginSlot,
  602. OriginCarrierID = source.OriginCarrierID,
  603. DestinationCarrierID = source.DestinationCarrierID,
  604. DestinationStation = source.DestinationStation,
  605. DestinationSlot = source.DestinationSlot,
  606. NextStation = source.NextStation,
  607. NextStationSlot = source.NextStationSlot,
  608. Notch = source.Notch,
  609. Size = source.Size,
  610. TransFlag = source.TransFlag,
  611. LotId = source.LotId,
  612. ProcessJob = source.ProcessJob,
  613. NextSequenceStep = source.NextSequenceStep,
  614. SubstHists = source.SubstHists,
  615. HasWarning = source.HasWarning,
  616. HasError = source.HasError,
  617. SubstE90Status = source.SubstE90Status,
  618. PPID = source.PPID,
  619. UseCount = source.UseCount,
  620. UseTime = source.UseTime,
  621. UseThick = source.UseThick,
  622. };
  623. }
  624. public void SetEmpty()
  625. {
  626. this.InnerId = Guid.Empty;
  627. this.WaferID = string.Empty;
  628. this.WaferOrigin = string.Empty;
  629. this.LaserMarker = string.Empty;
  630. this.LaserMarkerScore = string.Empty;
  631. this.T7Code = string.Empty;
  632. this.T7CodeScore = string.Empty;
  633. this.Status = (int)WaferStatus.Empty;
  634. this.ProcessState = EnumWaferProcessStatus.Idle;
  635. this.IsSource = false;
  636. this.IsDestination = false;
  637. this.Station = 0;
  638. this.Slot = 0;
  639. this.OriginStation = 0;
  640. this.OriginSlot = 0;
  641. //this.SourceStation = 0;
  642. //this.SourceSlot = 0;
  643. this.DestinationStation = 0;
  644. this.DestinationSlot = 0;
  645. this.Notch = 0;
  646. //保留最后一次的Wafer Size信息,便于后续判断和优化
  647. //this.Size = WaferSize.WS0;
  648. this.TransFlag = string.Empty;
  649. this.LotId = string.Empty;
  650. this.ProcessJob = null;
  651. this.NextSequenceStep = 0;
  652. this.HasWarning = false;
  653. this.HasError = false;
  654. this.PPID = "";
  655. this.UseCount = 0;
  656. this.UseTime = 0;
  657. this.UseThick = 0;
  658. }
  659. }
  660. }