示例#1
0
文件: Cycle.cs 项目: radtek/INCC6
        public bool HasEntry(Multiplicity key)
        {
            QCStatus val = null;
            bool     ok  = qcstatus.TryGetValue(key, out val);

            return(ok);
        }
示例#2
0
文件: Cycle.cs 项目: radtek/INCC6
        public QCStatus QCStatus(Multiplicity key)
        {
            QCStatus val = new QCStatus();
            bool     ok  = qcstatus.TryGetValue(key, out val);

            return(val);
        }
示例#3
0
文件: Cycle.cs 项目: radtek/INCC6
        public void SetQCStatus(Multiplicity key, QCTestStatus newval, double voltage = -1)
        {
            QCStatus val = new QCStatus();
            bool     ok  = qcstatus.TryGetValue(key, out val);

            if (!ok)
            {
                qcstatus.Add(key, new QCStatus(newval, voltage));
            }
            else
            {
                qcstatus[key] = new QCStatus(newval, voltage);
            }
        }
示例#4
0
文件: Cycle.cs 项目: hnordquist/INCC6
 public void SetQCStatus(Multiplicity key, QCTestStatus newval, double voltage = -1)
 {
     QCStatus val = new QCStatus();
     bool ok = qcstatus.TryGetValue(key, out val);
     if (!ok)
         qcstatus.Add(key, new QCStatus(newval, voltage));
     else
         qcstatus[key] = new QCStatus(newval, voltage);
 }
示例#5
0
文件: Cycle.cs 项目: hnordquist/INCC6
 public QCStatus QCStatus(Multiplicity key)
 {
     QCStatus val = new QCStatus();
     bool ok = qcstatus.TryGetValue(key, out val);
     return val;
 }
示例#6
0
        public static void SaveQCData(string InspectionNo, QCType qcType, LotNonActiveInfo lot, EquipmentInfo equipment, string batchID, QCStatus status, string objectType, TransactionStamp txnStamp)
        {
            QCInspectionInfoEx inspection = null;

            var lotNonActiveInfoEx = lot.ChangeTo <LotNonActiveInfoEx>();

            #region 產生檢驗單
            inspection = InfoCenter.Create <QCInspectionInfo>().ChangeTo <QCInspectionInfoEx>();
            inspection.InspectionNo  = InspectionNo;
            inspection.QCTYPE        = qcType.ToCimesString();
            inspection.OperationName = lotNonActiveInfoEx.OperationName;
            inspection.EquipmentName = equipment.EquipmentName;
            inspection.DeviceName    = lotNonActiveInfoEx.DeviceName;
            inspection.BatchID       = batchID;
            inspection.Status        = status.ToCimesString();
            inspection.CreateUser    = txnStamp.UserID;
            inspection.CreateTime    = txnStamp.RecordTime;
            inspection.InsertToDB(txnStamp.UserID, txnStamp.RecordTime);
            #endregion

            if (inspection == null)
            {
                //檢驗單主檔沒有資料
                throw new Exception(TextMessage.Error.T00060("QCData"));
            }
            #region 產生檢驗單對象
            //新增一筆資料到MES_QC_INSP_OBJ
            var inspectionObject = InfoCenter.Create <QCInspectionObjectInfo>();
            if (inspectionObject.InfoState == InfoState.NewCreate)
            {
                inspectionObject.QC_INSP_SID = inspection.QC_INSP_SID;
                inspectionObject.ObjectType  = objectType;
                inspectionObject.OBJECTSID   = lotNonActiveInfoEx.ID;
                inspectionObject.ObjectName  = lotNonActiveInfoEx.Lot;
                //COMPLOT
                inspectionObject.ItemName1 = lotNonActiveInfoEx.ComponentLot;
                //WOLOT
                inspectionObject.ItemName2 = lotNonActiveInfoEx.WorkOrderLot;
                //MATERIALLOT
                inspectionObject.ItemName3 = lotNonActiveInfoEx.MaterialLot;
                //OP1機台
                inspectionObject.ItemName5 = lotNonActiveInfoEx.ProcessEquipment;
                inspectionObject.Quantity  = 1;
                inspectionObject.Unit      = lotNonActiveInfoEx.Unit;
                inspectionObject.InsertToDB(txnStamp.UserID, txnStamp.RecordTime);
            }
            #endregion
        }