|
@@ -387,22 +387,22 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// </summary>
|
|
|
/// <param name="condition"></param>
|
|
|
/// <returns></returns>
|
|
|
- public int GetCountOfMergedPsrticles(string condition)
|
|
|
+ public int GetCountOfMergedParticles(string condition)
|
|
|
{
|
|
|
- string sqliteString = "select count(*) from MergedParticleInfo " + condition;
|
|
|
+ string sqliteString = "select count(*) from MergedParticleInfo where 1=1 " + condition;
|
|
|
DataTable DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
- int Count = int.Parse(DT.Rows[0]["Count"].ToString());
|
|
|
+ int Count = int.Parse(DT.Rows[0][0].ToString());
|
|
|
return Count;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 获取正常颗粒总数,包含组成合并颗粒的几个部分
|
|
|
+ /// 获取正常颗粒总数,去除组成合并颗粒的几个部分
|
|
|
/// </summary>
|
|
|
/// <param name="condition"></param>
|
|
|
/// <returns></returns>
|
|
|
- public int GetCountOfPsrticles(string condition)
|
|
|
+ public int GetCountOfParticles(string condition)
|
|
|
{
|
|
|
- string sqliteString = "select count(*) from INcAData where 1=1 " + condition;
|
|
|
+ string sqliteString = "select count ( * ) from INcAData where xrayid > -1"+condition+" and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 ";
|
|
|
DataTable DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
int Count = int.Parse(DT.Rows[0][0].ToString());
|
|
|
return Count;
|
|
@@ -418,7 +418,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
public DataTable GetInfoForPartucleDevidePage(int currentPage, int pagesize, string OrderFunction, string condition)
|
|
|
{
|
|
|
int p = (currentPage - 1) * pagesize;
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,(select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid ) as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, '&'),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition + " order by " + OrderFunction + " limit " + pagesize.ToString() + " offset " + p.ToString();
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,(select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid ) as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition + " order by " + OrderFunction + " limit " + pagesize.ToString() + " offset " + p.ToString();
|
|
|
DataTable DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
return DT;
|
|
|
}
|