Kaynağa Gözat

颗粒尺寸分类部分BUG修复

zhangjiaxin 2 ay önce
ebeveyn
işleme
c6c8387478

+ 10 - 1
OTSIncAReportApp/1-UI/Control_DEVCharts/DEVChart_ParticlesComposition.cs

@@ -273,7 +273,16 @@ namespace OTSIncAReportApp.Control_ECharts
 
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<" + max;
+             if (col == "Area")
+            {
+                return col + ">=" + ((Convert.ToDouble(min) / 2) * (Convert.ToDouble(min) / 2) * Math.PI).ToString() + " and " + col + "<" + ((Convert.ToDouble(max) / 2) * (Convert.ToDouble(max) / 2) * Math.PI).ToString();
+
+			}
+            else
+            {
+				return col + ">=" + min + " and " + col + "<" + max;
+			}
+           
         }
         #endregion
 

+ 9 - 1
OTSIncAReportApp/1-UI/Control_DEVCharts/DEVChart_Trianglediagram.cs

@@ -598,7 +598,15 @@ namespace OTSIncAReportApp.Control_ECharts
         }
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<=" + max;
+             if (col == "Area")
+            {
+                return col + ">=" + ((Convert.ToDouble(min) / 2) * (Convert.ToDouble(min) / 2) * Math.PI).ToString() + " and " + col + "<=" + ((Convert.ToDouble(max) / 2) * (Convert.ToDouble(max) / 2) * Math.PI).ToString();
+
+			}
+            else
+            {
+				return col + ">=" + min + " and " + col + "<=" + max; ;
+			}
         }
         private string getStrRet(List<string> template, string element)
         {

+ 10 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesSizeGrid.cs

@@ -40,8 +40,16 @@ namespace OTSIncAReportGrids
 
         private string getWhere(string max, string min, string col, string partic)
         {
-            return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
-        }
+			if (col == "Area")
+			{
+				return col + ">=" + ((Convert.ToDouble(min)/2) * (Convert.ToDouble(min)/2) * Math.PI).ToString() + " and " + col + "<" + ((Convert.ToDouble(max)/2) * (Convert.ToDouble(max)/2) * Math.PI).ToString() + " and TypeId=" + partic;
+
+			}
+			else
+			{
+				return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
+			}
+		}
 
         /// <summary>
         /// 绑定datagridview数据

+ 1 - 1
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/BasicData.cs

@@ -626,7 +626,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         {
             if (col == "Area")
             {
-                return col + ">=" + (Convert.ToDouble(min) * Convert.ToDouble(min) * Math.PI).ToString() + " and " + col + "<" + (Convert.ToDouble(max) * Convert.ToDouble(max) * Math.PI).ToString() + " and TypeId=" + partic;
+                return col + ">=" + ((Convert.ToDouble(min) / 2) * (Convert.ToDouble(min) / 2) * Math.PI).ToString() + " and " + col + "<" + ((Convert.ToDouble(max) / 2) * (Convert.ToDouble(max) / 2) * Math.PI).ToString() + " and TypeId=" + partic;
 
 			}
             else

+ 11 - 2
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/TernaryDiagram.cs

@@ -8,6 +8,7 @@ using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
+using System.IO.Ports;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -367,8 +368,16 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         }
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<=" + max;
-        }
+			if (col == "Area")
+			{
+				return col + ">=" + (Convert.ToDouble(min) * Convert.ToDouble(min) * Math.PI).ToString() + " and " + col + "<=" + (Convert.ToDouble(max) * Convert.ToDouble(max) * Math.PI).ToString();
+
+			}
+			else
+			{
+				return col + ">=" + min + " and " + col + "<=" + max ;
+			}
+		}
         private string getStrRet(List<string> template, string element)
         {
             List<string> name = new List<string>()

+ 1 - 0
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -1672,6 +1672,7 @@
     <EmbeddedResource Include="Help.resx">
       <DependentUpon>Help.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>PublicResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>