예제 #1
0
        /// <summary>
        /// 读取数据文件
        /// </summary>
        /// <param name="filePath">数据文件路径</param>
        public override void GetData()
        {
            WATFileUtil      util     = new WATFileUtil(FilePath);
            SpecDataFileUtil specUtil = new SpecDataFileUtil(specPath + "\\" + util.Wat.LimitFile);

            lot_run = new Etest_Lot_Run();
            lot_run.GetData(util.Wat, specUtil.datalist);
        }
예제 #2
0
        /// <summary>
        /// 获取Hlcm数据文件中的数据
        /// </summary>
        /// <param name="filePath">数据文件全路径</param>
        /// <param name="specPath">SpecFile文件全路径</param>
        public override void GetData()
        {
            ParameterList = new List <string>();
            //  ExcelOper excelOper = new ExcelOper(filePath);
            //  DataTable dt = excelOper.GetContentFromExcel();
            NPOIExcelHelper excelHelper = new NPOIExcelHelper(FilePath);
            DataTable       dt          = excelHelper.ExcelToDataTable("Raw data", true);
            int             j           = dt.Columns.Count;

            if (dt.Columns.Count < 8 || dt.Columns[0].ColumnName != "LOT ID" || dt.Columns[1].ColumnName != "PRODUCT NAME" || dt.Columns[5].ColumnName != "SITE" || dt.Rows.Count < 3)
            {
                throw new Exception(FilePath + "文件格式错误");
            }
            lot_run = new Etest_Lot_Run
            {
                etest_limits = new List <Etest_Limit>()
            };

            //参数列表赋值
            for (int i = 7; i < dt.Columns.Count; i++)
            {
                if (dt.Columns[i].ColumnName.Substring(0, 1) == "F" && dt.Columns[i].ColumnName.Length < 4)
                {
                    break;
                }
                else
                {
                    ParameterList.Add(dt.Columns[i].ColumnName);
                }
            }

            for (int i = 0; i < 2; i++)
            {
                lot_run.etest_limits = GetEtestLimits(dt.Rows[i], lot_run.etest_limits);
            }

            for (int i = 2; i < dt.Rows.Count; i++)
            {
                SetLotRun(dt.Rows[i]);
            }
        }