12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Aitex.Core.Common;
- using MECF.Framework.Common.DBCore;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.Jobs;
- using MECF.Framework.Common.SubstrateTrackings;
- namespace CyberX8_RT.Schedulers
- {
- class SchedulerDBCallback : ISchedulerDBCallback
- {
- public void LotCreated(ControlJobInfo cj)
- {
- Guid carrierGuid = CarrierManager.Instance.GetCarrier(cj.Module).InnerId;
- LotDataRecorder.StartLot(cj.LotInnerId.ToString(), carrierGuid.ToString(), "", cj.LotName, cj.Module, cj.Module, cj.LotWafers.Count);
- foreach (var waferInfo in cj.LotWafers)
- {
- LotDataRecorder.InsertLotWafer(cj.LotInnerId.ToString(), waferInfo.InnerId.ToString());
- //WaferDataRecorder.SetWaferLotId(waferInfo.InnerId.ToString(), cj.LotName,waferInfo.SequenceName);
- }
- }
- public void LotUpdate(ControlJobInfo cj)
- {
- foreach (var waferInfo in cj.LotWafers)
- {
- WaferDataRecorder.SetWaferLotId(waferInfo.InnerId.ToString(), cj.LotName, waferInfo.SequenceName);
- }
- }
- public void LotFinished(ControlJobInfo cj)
- {
- int unprocessed = 0;
- int aborted = 0;
- foreach (var waferInfo in cj.LotWafers)
- {
- if (waferInfo.ProcessState == EnumWaferProcessStatus.Failed)
- {
- aborted++;
- continue;
- }
- if (waferInfo.ProcessState != EnumWaferProcessStatus.Completed)
- {
- unprocessed++;
- continue;
- }
- }
- LotDataRecorder.EndLot(cj.LotInnerId.ToString(), aborted, unprocessed);
- }
- }
- }
|