Esempio n. 1
0
        private void Button2_Click(object sender, EventArgs e)
        {
            ServiceReference1.ServiceControlCenterClient serviceClient = new ServiceControlCenterClient();
            AfterLotEndEventArgs endEventArgs = new AfterLotEndEventArgs();

            endEventArgs.LotNo    = "1940A4125V";
            endEventArgs.McNo     = "FT-RAS-001";
            endEventArgs.LotJudge = "FT_BIN19_AUTO3";
            AfterLotEndResult result = serviceClient.AfterLotEnd(endEventArgs);
        }
Esempio n. 2
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="e"></param>
    /// <returns></returns>
    public AfterLotEndResult AfterLotEnd(AfterLotEndEventArgs e)
    {
        AfterLotEndResult afterLotEndResult = new AfterLotEndResult();

        afterLotEndResult.HasError       = false;
        afterLotEndResult.WarningMessage = "";
        SaveLogFile(e.McNo, e.LotNo, "AfterLotEnd", "NULL", "NULL");
        if (e != null)
        {
            switch (e.LotJudge)
            {
            case "FT_BIN19_AUTO3":
                if (!string.IsNullOrEmpty(e.LotNo) && !string.IsNullOrEmpty(e.McNo))
                {
                    int?      lotId             = null;
                    int?      currentFlowId     = null;
                    string    currentFlowName   = "";
                    string    currentAssyDevice = "";
                    DataTable currentDataTable  = GetCurrentTranLot(e.LotNo, out lotId, out currentFlowName, out currentFlowId, out currentAssyDevice);
                    if (IsGDICDevice(currentAssyDevice))
                    {
                        //3:Hold
                        //afterLotEndResult = SetQualityState(3, e.LotNo);
                        // Flow pattern = 1500
                        DataRow row           = currentDataTable.Rows[0];
                        int     currentStepNo = (int)row["StepNo"];
                        afterLotEndResult = AddFtInspSpecialFlow(e.McNo, e.LotNo, e.LotJudge, currentFlowId, lotId, currentStepNo);
                    }
                    else
                    {
                        SaveLogFile(e.McNo, e.LotNo, e.LotJudge, "Fail", "Device : " + currentAssyDevice + " not GDIC");
                    }
                }
                break;

            case "LOW YIELD":   //1501
            case "IC BURN":     //1502
                if (!string.IsNullOrEmpty(e.LotNo) && !string.IsNullOrEmpty(e.McNo))
                {
                    int?      lotId             = null;
                    int?      currentFlowId     = null;
                    string    currentFlowName   = "";
                    string    currentAssyDevice = "";
                    DataTable currentDataTable  = GetCurrentTranLot(e.LotNo, out lotId, out currentFlowName, out currentFlowId, out currentAssyDevice);
                    //3:Hold
                    //afterLotEndResult = SetQualityState(3, e.LotNo);
                    // Flow pattern = 1500
                    DataRow row           = currentDataTable.Rows[0];
                    int     currentStepNo = (int)row["StepNo"];
                    afterLotEndResult = AddFtInspSpecialFlow(e.McNo, e.LotNo, e.LotJudge, currentFlowId, lotId, currentStepNo);
                }
                break;

            case "ASIMode":     //1666
                if (!string.IsNullOrEmpty(e.LotNo) && !string.IsNullOrEmpty(e.McNo))
                {
                    int?      lotId             = null;
                    int?      currentFlowId     = null;
                    string    currentFlowName   = "";
                    string    currentAssyDevice = "";
                    DataTable currentDataTable  = GetCurrentTranLot(e.LotNo, out lotId, out currentFlowName, out currentFlowId, out currentAssyDevice);
                    //3:Hold
                    //afterLotEndResult = SetQualityState(3, e.LotNo);
                    // Flow pattern = 1500
                    DataRow row = currentDataTable.Rows[0];
                    if (currentFlowName.Trim() == "AUTO(2)ASISAMPLE")
                    {
                        SaveLogFile(e.McNo, e.LotNo, "AfterLotEnd", "Fail", "This lot already in job[" + currentFlowId.ToString() + "] : " + currentFlowName);
                    }
                    else
                    {
                        int currentStepNo = (int)row["StepNo"];
                        afterLotEndResult = AddFtInspSpecialFlow(e.McNo, e.LotNo, e.LotJudge, currentFlowId, lotId, currentStepNo);
                    }
                }
                break;

            case "INSP_ICBURN":
            case "INSP_LowYield":
                if (!string.IsNullOrEmpty(e.LotNo) && !string.IsNullOrEmpty(e.McNo))
                {
                    int?      lotId             = null;
                    int?      currentFlowId     = null;
                    string    currentFlowName   = "";
                    string    currentAssyDevice = "";
                    DataTable currentDataTable  = GetCurrentTranLot(e.LotNo, out lotId, out currentFlowName, out currentFlowId, out currentAssyDevice);

                    DataRow row           = currentDataTable.Rows[0];
                    int     currentStepNo = (int)row["StepNo"];
                    afterLotEndResult = AddFtInspSpecialFlow(e.McNo, e.LotNo, e.LotJudge, currentFlowId, lotId, currentStepNo);
                }
                break;

            default:
                if (e.JobSpecialFlowId != null && !string.IsNullOrEmpty(e.LotNo) && !string.IsNullOrEmpty(e.McNo))
                {
                    if (e.McNo.Substring(0, 2) == "FT")
                    {
                        int?      lotId             = null;
                        int?      currentFlowId     = null;
                        string    currentFlowName   = "";
                        string    currentAssyDevice = "";
                        DataTable currentDataTable  = GetCurrentTranLot(e.LotNo, out lotId, out currentFlowName, out currentFlowId, out currentAssyDevice);

                        if (currentFlowId != null)
                        {
                            if (IsGDICDevice(currentAssyDevice))
                            {
                                if (currentFlowId != 142 && currentFlowId != 11 && currentFlowId != 266)
                                {
                                    afterLotEndResult = AddFtInspSpecialFlow(e.McNo, e.LotNo, e.LotJudge, currentFlowId, lotId);
                                }
                                else
                                {
                                    SaveLogFile(e.McNo, e.LotNo, "AfterLotEnd", "Fail", "This lot already in job[" + currentFlowId.ToString() + "] : " + currentFlowName);
                                }
                            }
                            else
                            {
                                SaveLogFile(e.McNo, e.LotNo, "IsGDICDevice", "Fail", "Device : " + currentAssyDevice + " not GDIC");
                            }
                        }
                        else
                        {
                            SaveLogFile(e.McNo, e.LotNo, "AfterLotEnd", "Fail", "Notfound current flow");
                        }
                    }
                }
                break;
            }
        }
        return(afterLotEndResult);
    }