public static string GetWaferArray(string wafernum) { var productfm = GetProductFamilyFromAllen(wafernum); if (string.IsNullOrEmpty(productfm)) { return("1"); } var dict = new Dictionary <string, string>(); dict.Add("@productfm", productfm); var sql = @"select na.Array_Length from [EngrData].[dbo].[NeoMAP_MWR_Arrays] na with (nolock) where na.product_out = @productfm"; var dbret = DBUtility.ExeAllenSqlWithRes(sql, dict); foreach (var line in dbret) { if (line[0] != System.DBNull.Value) { return(UT.O2S(line[0])); } } return("1"); }
public static bool AllenHasData(string WaferNum) { var sql = @"select top 1 [Xcoord],[Ycoord],[Ith],[SeriesR],[SlopEff] from [EngrData].[dbo].[Wuxi_WAT_VR_Report] where [WaferID] = @WaferID and [Ith] is not null and [SeriesR] is not null and [SlopEff] is not null"; var dict = new Dictionary <string, string>(); dict.Add("@WaferID", WaferNum); var dbret = DBUtility.ExeAllenSqlWithRes(sql, dict); if (dbret.Count > 0) { return(true); } else { return(false); } }
public static List <ProbeTestData> GetIthFromAllen(string WaferNum) { var ret = new List <ProbeTestData>(); var sql = @"select distinct [WaferID],[Xcoord],[Ycoord],[Ith] from [EngrData].[dbo].[Wuxi_WAT_VR_Report] where [WaferID] = @WaferNum and [Ith] is not null "; var dict = new Dictionary <string, string>(); dict.Add("@WaferNum", WaferNum); var dbret = DBUtility.ExeAllenSqlWithRes(sql, dict); foreach (var line in dbret) { var tempvm = new ProbeTestData(); tempvm.Wafer = UT.O2S(line[0]); tempvm.X = UT.O2S(line[1]); tempvm.Y = UT.O2S(line[2]); tempvm.APVal2 = UT.O2S(line[3]); ret.Add(tempvm); } return(ret); }
private static string GetProductFamilyFromAllen(string wafernum) { var sql = @"select distinct left(pf.productfamilyname,4) from insite.insite.container c with (nolock) inner join [Insite].[insite].[ProductBase] pb ON pb.[RevOfRcdId] = c.[ProductId] inner join insite.insite.Product p with(nolock) on p.[ProductBaseId] = pb.[ProductBaseId] inner join insite.insite.ProductFamily pf with(nolock) on p.ProductFamilyID = pf.ProductFamilyID where containername = @wafernum"; var dict = new Dictionary <string, string>(); dict.Add("@wafernum", wafernum); var dbret = DBUtility.ExeAllenSqlWithRes(sql, dict); foreach (var line in dbret) { return(UT.O2S(line[0])); } return(string.Empty); }
private static string GetAPConst2162FromAllen(string WaferNum) { var ConstList = new List <double>(); var dict = new Dictionary <string, string>(); dict.Add("@WaferNum", WaferNum); var sql = "SELECT [ApCalc2162],[Ith] FROM [EngrData].[dbo].[VR_Ox_Pts_Data] where WaferID = @WaferNum"; var dbret = DBUtility.ExeAllenSqlWithRes(sql, dict); if (dbret.Count == 0) { sql = @"select distinct m.Value as APSIZE_Meas,v.Ith from EngrData.dbo.Ox_meas_view m left join AllenDataSQL.AllenData.dbo.Legacy_Oxide_Coordinates_View x on m.product = x.product and x.Fieldname = m.Location left join EngrData.dbo.Wuxi_WAT_VR_Report v on v.WaferID = m.container and v.Xcoord= x.X_coord and v.Ycoord= x.Y_coord where m.container = @WaferNum and v.Ith is not null"; dbret = DBUtility.ExeAllenSqlWithRes(sql, dict); } foreach (var line in dbret) { var apm = UT.O2D(line[0]); var ith = UT.O2D(line[1]); if (apm != 0 && ith != 0) { var c = apm - 7996.8 * ith; ConstList.Add(c); } } if (ConstList.Count > 0) { return(MathNet.Numerics.Statistics.Statistics.Median(ConstList).ToString()); } return(string.Empty); }