|
@@ -201,6 +201,50 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
return DT;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取所有Particle
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public DataTable GetParticleAllHaveXray(string fieldAndPartic)
|
|
|
+ {
|
|
|
+ string incaSql = @"select * from IncAData";
|
|
|
+
|
|
|
+ if (fieldAndPartic != "")
|
|
|
+ {
|
|
|
+ incaSql = incaSql + " where '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
+ }
|
|
|
+ DataTable incaDT = dbHelper.ExecuteDataTable(incaSql, null);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ incaDT.Columns.Add("Element");
|
|
|
+
|
|
|
+ DataTable dt_element = GetElementChemistry();
|
|
|
+ DataTable elementchemistry = dt_element.Clone();
|
|
|
+ for (int i = 0; i < dt_element.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (dt_element.Rows[i]["Name"].ToString() != "Fe")
|
|
|
+ {
|
|
|
+ elementchemistry.Rows.Add(dt_element.Rows[i].ItemArray);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int i = 0; i < incaDT.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ string str = "XRayId = " + incaDT.Rows[i]["particleId"].ToString() + " and fieldid = " + incaDT.Rows[i]["fieldid"].ToString();
|
|
|
+ DataRow[] drs = elementchemistry.Select(str);
|
|
|
+ string ConcatenatedString = "";
|
|
|
+ for (int j = 0; j < drs.Length; j++)
|
|
|
+ {
|
|
|
+ ConcatenatedString += drs[j]["name"] + "-" + ChangeDataToD(drs[j]["Percentage"].ToString()) + ';';
|
|
|
+ }
|
|
|
+ incaDT.Rows[i]["Element"] = ConcatenatedString;
|
|
|
+ }
|
|
|
+ return incaDT;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取所有Particle
|
|
|
/// </summary>
|
|
@@ -496,7 +540,13 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
}
|
|
|
public DataTable GetInfoForPartucleDevidePage2(string condition)
|
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,SubParticles, (select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = MergedParticleInfo.XRayId and fieldid = MergedParticleInfo.fieldid) as Element from MergedParticleInfo where 1=1 " + condition + " union select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,'' as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition;
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,FieldPosX " +
|
|
|
+ "as 'SEMPosX',FieldPosY as 'SEMPosY',XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,SubParticles," +
|
|
|
+ " (select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = MergedParticleInfo.XRayId and fieldid = MergedParticleInfo.fieldid) " +
|
|
|
+ "as Element from MergedParticleInfo where 1=1 " + condition + " union select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId," +
|
|
|
+ "SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,'' " +
|
|
|
+ "as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " +
|
|
|
+ condition;
|
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
return DT;
|