浏览代码

报告导出颗粒列表增加ECD排序

zhangjiaxin 1 月之前
父节点
当前提交
9860cc0a76

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

@@ -181,7 +181,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                         string d2;
                         if (a == colid.Count - 1)
                         {
-                            d2 = "999";
+                            d2 = "9999999999999";
                         }
                         else
                         {
@@ -624,7 +624,16 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         #region 内部函数
         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) * Convert.ToDouble(min) * Math.PI).ToString() + " and " + col + "<" + (Convert.ToDouble(max) * Convert.ToDouble(max) * Math.PI).ToString() + " and TypeId=" + partic;
+
+			}
+            else
+            {
+				return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
+			}
+                
         }
         private DataTable InvalidRemoval(DataTable dt)
         {

+ 5 - 0
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/ParticleList.cs

@@ -592,6 +592,11 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 return Math.Round(Convert.ToDouble(dt.Rows[it][str]), 2).ToString();
             }
             else
+            if (str == "ECD")
+            {
+				return Math.Round(Convert.ToDouble(dt.Rows[it][str]), 2).ToString();
+			}
+            else
             {
                 return dt.Rows[it][str].ToString();
             }

+ 2 - 2
OTSIncAReportApp/2-CommonFunction/OTSRstMgrFunction/ResultDataMgr.cs

@@ -344,12 +344,12 @@ namespace OTSIncAReportApp.OTSRstMgrFunction
         }
         public List<string> getTableData_INCA()
         {
-            List<string> strlist = new List<string>() { "Area", "DMAX", "AveGray" };
+            List<string> strlist = new List<string>() { "Area", "DMAX", "AveGray","ECD" };
             return strlist;
         }
         public List<string> getTableData_CleannessA()
         {
-            List<string> strlist = new List<string>() { "Area", "DMAX", "Hardness", "AveGray" };
+            List<string> strlist = new List<string>() { "Area", "DMAX", "Hardness", "AveGray","ECD" };
             return strlist;
         }
 

+ 5 - 4
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -225,11 +225,12 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
             }
             DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
-            //for (int i = 0; i < DT.Rows.Count; i++)
-            //{
-            //    DT.Rows[i]["Area"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
-            //}
+            DT.Columns.Add("ECD");
 
+            for (int i = 0; i < DT.Rows.Count; i++)
+            {
+                DT.Rows[i]["ECD"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
+            }
 
             return DT;
         }

+ 0 - 18
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -622,12 +622,6 @@
     <Compile Include="1-UI\OTSReportExport\RuleGroupSelector.Designer.cs">
       <DependentUpon>RuleGroupSelector.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSReportExport\RuleSelector.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="1-UI\OTSReportExport\RuleSelector.Designer.cs">
-      <DependentUpon>RuleSelector.cs</DependentUpon>
-    </Compile>
     <Compile Include="1-UI\OTSReportExport\XtraReport_yb6156.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -926,12 +920,6 @@
     <Compile Include="1-UI\OTSReportExport\OTSReport_Export.Designer.cs">
       <DependentUpon>OTSReport_Export.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSReportExport\OTSReport_GetEChartImage.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="1-UI\OTSReportExport\OTSReport_GetEChartImage.Designer.cs">
-      <DependentUpon>OTSReport_GetEChartImage.cs</DependentUpon>
-    </Compile>
     <Compile Include="1-UI\OTSRibbon\OTSRibbonFun.cs" />
     <Compile Include="1-UI\OTSDisplaySourceGridData\OTSSampleReportInfo\OTSSampleReportInfo.cs" />
     <Compile Include="1-UI\OTSReportExport\INCA\OTSReport_Template_INCA.cs">
@@ -1039,9 +1027,6 @@
     <EmbeddedResource Include="1-UI\OTSReportExport\RuleGroupSelector.resx">
       <DependentUpon>RuleGroupSelector.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="1-UI\OTSReportExport\RuleSelector.resx">
-      <DependentUpon>RuleSelector.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="1-UI\OTSReportExport\XtraReport_yb6156.resx">
       <DependentUpon>XtraReport_yb6156.cs</DependentUpon>
     </EmbeddedResource>
@@ -1124,9 +1109,6 @@
     <EmbeddedResource Include="1-UI\OTSReportExport\OTSReport_Export.resx">
       <DependentUpon>OTSReport_Export.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="1-UI\OTSReportExport\OTSReport_GetEChartImage.resx">
-      <DependentUpon>OTSReport_GetEChartImage.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="1-UI\OTSReportExport\Cleanness\OTSReport_Template_CleannessA.resx">
       <DependentUpon>OTSReport_Template_CleannessA.cs</DependentUpon>
     </EmbeddedResource>