Browse Source

Fix the bug where the synthesis of spliced particle images fails

cxs 3 months ago
parent
commit
3398c42dad

+ 28 - 1
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -242,8 +242,35 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 				}
 
 			}
+            return data;
+        }
+
 
+        public DataTable GetParticleAllForBig(string fieldAndPartic)
+        {
+            string sqlp = @"select * from INcAData where";
+            if (fieldAndPartic != "")
+            {
+                sqlp = sqlp + " '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
+            }
+            DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
+            DT.Columns.Add("ECD", typeof(double));
 
+            for (int i = 0; i < DT.Rows.Count; i++)
+            {
+                DT.Rows[i]["ECD"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
+            }
+
+            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;
         }
 
@@ -804,7 +831,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         {
             string vs = "," + sub.Replace(':', '-') + ",";
 
-            DataTable dataTable = GetParticleAll(vs);
+            DataTable dataTable = GetParticleAllForBig(vs);
             if (dataTable.Rows.Count == 0)
             {
                 return null;