Selaa lähdekoodia

Merge branch 'OTSRelease3_2' of http://36.129.169.60:30080/gogsadmin/OTS into OTSRelease3_2

cxs 1 viikko sitten
vanhempi
commit
8d2f99d0ae

+ 20 - 8
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -131,7 +131,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             string sqlp = @"select TypeId,TypeName,GroupId ,TypeColor,count(1) as con,avg(" + con
                 + ") as av,max(" + con
                 + ") as max ,GroupName";
-            sqlp = sqlp + " from IncAData where typeid !=-1 and typeid !=4";
+            sqlp = sqlp + " from IncAData where typeid !=-1 and typeid !=4 and ParticleId !=-1";
             if (fieldAndPartic != "")
             {
                 sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
@@ -232,7 +232,19 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 DT.Rows[i]["ECD"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
             }
 
-            return DT;
+            DataTable data = DT.Clone();
+
+			for (int i = 0; i < DT.Rows.Count; i++)
+            {
+                if (Convert.ToInt32(DT.Rows[i]["ParticleId"]) > -1)
+                {
+                    data.Rows.Add(DT.Rows[i].ItemArray);
+				}
+
+			}
+
+
+            return data;
         }
 
         public DataTable GetParticleAllforparticlelist(string fieldAndPartic)
@@ -688,7 +700,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
 		public DataTable GetInfoForPartucleDevidePage_analyticalParticle(string condition)
         {
-            string sqliteString = "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 Element from INcAData where (xrayid > -1  and typeid !=9 and typeid !=-1 and typeid !=4)" +
+            string sqliteString = "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 Element from INcAData where (xrayid > -1 and typeid !=9 and typeid !=-1 and typeid !=4)" +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -698,7 +710,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
         public DataTable GetInfoForPartucleDevidePage_otherParticle(string condition)
         {
-            string sqliteString = "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 Element from INcAData where (typeid =9 or typeid =-1 or typeid =4) " +
+            string sqliteString = "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 Element from INcAData where (xrayid > -1 and typeid =9 or typeid =-1 or typeid =4) " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -723,7 +735,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
         public DataTable GetInfoForPartucleDevidePage_allParticles(string condition)
         {
-            string sqliteString = "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 Element from INcAData where 1=1 " +
+            string sqliteString = "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 Element from INcAData  where xrayid > -1 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -731,7 +743,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         public DataTable GetInfoForPartucleDevidePage_NotIdentifyParticle(string condition)
         {
-            string sqliteString = "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 Element from INcAData where typeid =9 " +
+            string sqliteString = "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 Element from INcAData where xrayid > -1 and typeid =9 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -739,7 +751,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         public DataTable GetInfoForPartucleDevidePage_InvalidParticle(string condition)
         {
-            string sqliteString = "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 Element from INcAData where typeid =-1 " +
+            string sqliteString = "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 Element from INcAData where xrayid > -1 and typeid =-1 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -747,7 +759,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         public DataTable GetInfoForPartucleDevidePage_LowCountsParticle(string condition)
         {
-            string sqliteString = "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 Element from INcAData where typeid =4 " +
+            string sqliteString = "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 Element from INcAData where xrayid > -1 typeid =4 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);