Browse Source

Modify the graph product algorithm for measuring surface frames

cxs 3 days ago
parent
commit
b2289239ac

+ 2 - 2
OTSIncAMeasureApp/1-OTSMeasure/Measure/ParamData/COTSMsrPrjResultData.cs

@@ -354,7 +354,7 @@ namespace OTSModelSharp
 
                       
                     }
-                    msrFldsArea += aFieldArea;
+                    //msrFldsArea += aFieldArea;
 
 
                 }
@@ -362,7 +362,7 @@ namespace OTSModelSharp
 
             var fielddb = incAFileMgr.GetFieldDB();
             var fielddata = fielddb.GetTableQueryForDataTable();
-
+            msrFldsArea = aFieldArea * fielddata.Rows.Count;
             foreach (DataRow r in fielddata.Rows)
             {
                 var p = new Point(Convert.ToInt32(r[(int)CFieldTable.ColumnID.N_FIELDPOS_X]), Convert.ToInt32(r[(int)CFieldTable.ColumnID.N_FIELDPOS_Y]));

+ 2 - 2
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/FieldData.cs

@@ -132,7 +132,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         public DataTable GetAllParticle_DataTable()
         {
             DataTable DT = null;
-            string sql = "select * from IncAData where typeid > 9";
+            string sql = "select * from IncAData where typeid > 9 and FieldId > -1";
             DT = dbHelper.ExecuteDataTable(sql, null);
             return DT;
         }
@@ -145,7 +145,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         public double GetparticleArea()
         {
             DataTable DT = null;
-            string sql = "select sum(Area) from IncAData";
+            string sql = "select sum(Area) from IncAData where FieldId > -1";
             DT = dbHelper.ExecuteDataTable(sql, null);
             if (DT == null) return 0;
             double particleArea = 0;

+ 2 - 2
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -114,7 +114,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             string sqlp = @"select TypeId,TypeName,TypeColor,count(1) as con,sum(Area) as Area,avg(" + con
                 + ") as av,max(" + con
                 + ") as max ";
-            sqlp = sqlp + "from IncAData where typeid !=-1 and typeid !=4 group by TypeId";
+            sqlp = sqlp + "from IncAData where typeid !=-1 and typeid !=4 and fieldid !=-1 group by TypeId";
 
             DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
             return DT;
@@ -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 and ParticleId !=-1";
+            sqlp = sqlp + " from IncAData where typeid !=-1 and fieldid!=-1 and typeid !=4 and ParticleId !=-1";
             if (fieldAndPartic != "")
             {
                 sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";