浏览代码

更新合并报告代码,并修复BUG

zhangjiaxin 10 月之前
父节点
当前提交
43b4022572

+ 7 - 5
Bin/x64/Debug/Config/ReportTemplate/CleannessA_Template/ReportTemplateConfig.xml

@@ -12,8 +12,7 @@
     <str_xzkl>全部颗粒</str_xzkl>
     <int_xzkl>0</int_xzkl>
     <LOGName>ReportIdentification.bmp</LOGName>
-    <StandardLibraryName>
-    </StandardLibraryName>
+    <StandardLibraryName>OTSCleanlinessSTD1.db</StandardLibraryName>
   </M_SY>
   <M_YMYJ>
     <str_tb_ymwb>锂电异物分析报告</str_tb_ymwb>
@@ -135,14 +134,17 @@
     <b_ck_chart>False</b_ck_chart>
   </M_JZWZB>
   <whole>
-    <list_str_MainPriority>System.Collections.Generic.List`1[System.String]</list_str_MainPriority>
+    <list_str_MainPriority>System.Collections.Generic.List`1[System.String]<YS0>Corundum Al2O3</YS0><YS1>Corundum Al2O3</YS1><YS2>Al Alloy Si&lt;5</YS2><YS3>Zr</YS3><YS4>Al Alloy Si&lt;5</YS4><YS5>Al Alloy Si&gt;5</YS5><YS6>Mineral Blasting</YS6><YS7>F Rich, PTFE</YS7><YS8>Other Particles</YS8><YS9>Other Particles</YS9><YS10>Non-Ferrous Metals</YS10><YS11>SiO2</YS11><YS12>Si/Si-C/Si-N</YS12><YS13>Mineral Fibre</YS13><YS14>Mineral Si-Al-O</YS14><YS15>Mineral Si-Al-Ca-O</YS15><YS16>Mineral Si-Al-K-O</YS16><YS17>Talc Si-Mg-(Al)-O</YS17><YS18>Calcium Carbonate</YS18><YS19>Calcium Compounds</YS19><YS20>Mineral With Na</YS20><YS21>Other Mineral</YS21><YS22>Mineral With Na</YS22><YS23>Other Mineral</YS23><YS24>Iron Rich</YS24><YS25>Steel</YS25><YS26>Steel</YS26><YS27>Low-Alloy St. Other</YS27><YS28>Low-Mn Steel</YS28><YS29>Low-Cr Steel</YS29><YS30>Low-Mn Steel</YS30><YS31>Low-Alloy St. Other</YS31><YS32>Ferrous Blasting</YS32><YS33>High-Alloy Steel</YS33><YS34>Coating Mn-P</YS34><YS35>Coating Cr</YS35><YS36>Coating Zn-Cr</YS36><YS37>Coating Zn-Ni</YS37><YS38>Coating Zn</YS38><YS39>Coating Zn-P</YS39><YS40>Ferrous Blasting</YS40><YS41>Iron Rich</YS41><YS42>Coating V</YS42><YS43>Brass Cu-Zn</YS43><YS44>Bronze Cu-Sn</YS44><YS45>Titanium</YS45><YS46>Non-Ferrous Metals</YS46><YS47>Cl Rich, PVC</YS47><YS48>Salts</YS48><YS49>Cl Rich, PVC</YS49><YS50>Cl Rich, PVC</YS50><YS51>Salts</YS51><YS52>Lubricants Mo/Ba-S</YS52><YS53>Calcium Carbonate</YS53><YS54>Al Alloy Si&gt;5</YS54><YS55>Al Alloy Si&lt;5</YS55><YS56>Salts</YS56><YS57>Mineral Si-Al-Ca-O</YS57><YS58>Mineral with Na</YS58><YS59>Other Mineral</YS59><YS60>Coating Zn-Cr</YS60><YS61>Coating Zn</YS61><YS62>Coating Zn-P</YS62><YS63>F Rich, PTFE</YS63><YS64>Lubricants Mo/Ba-S</YS64><YS65>Other Particles</YS65><YS66>Other Particles</YS66></list_str_MainPriority>
     <list_str_SecondaryPriority>System.Collections.Generic.List`1[System.String]<YS0>Nialloy</YS0><YS1>Fe-O</YS1><YS2>Fe-Cr</YS2><YS3>Fe-alloy</YS3></list_str_SecondaryPriority>
-    <str_MainPriority>
-    </str_MainPriority>
+    <str_MainPriority>Corundum Al2O3 , Corundum Al2O3 , Al Alloy Si&lt;5 , Zr , Al Alloy Si&lt;5 , Al Alloy Si&gt;5 , Mineral Blasting , F Rich, PTFE , Other Particles , Other Particles , Non-Ferrous Metals , SiO2 , Si/Si-C/Si-N , Mineral Fibre , Mineral Si-Al-O , Mineral Si-Al-Ca-O , Mineral Si-Al-K-O , Talc Si-Mg-(Al)-O , Calcium Carbonate , Calcium Compounds , Mineral With Na , Other Mineral , Mineral With Na , Other Mineral , Iron Rich , Steel , Steel , Low-Alloy St. Other , Low-Mn Steel , Low-Cr Steel , Low-Mn Steel , Low-Alloy St. Other , Ferrous Blasting , High-Alloy Steel , Coating Mn-P , Coating Cr , Coating Zn-Cr , Coating Zn-Ni , Coating Zn , Coating Zn-P , Ferrous Blasting , Iron Rich , Coating V , Brass Cu-Zn , Bronze Cu-Sn , Titanium , Non-Ferrous Metals , Cl Rich, PVC , Salts , Cl Rich, PVC , Cl Rich, PVC , Salts , Lubricants Mo/Ba-S , Calcium Carbonate , Al Alloy Si&gt;5 , Al Alloy Si&lt;5 , Salts , Mineral Si-Al-Ca-O , Mineral with Na , Other Mineral , Coating Zn-Cr , Coating Zn , Coating Zn-P , F Rich, PTFE , Lubricants Mo/Ba-S , Other Particles , Other Particles</str_MainPriority>
     <str_SecondaryPriority>Nialloy,Fe-O,Fe-Cr,Fe-alloy</str_SecondaryPriority>
+    <list_str_MainPriority_Serial>System.Collections.Generic.List`1[System.String]<YS0>40001</YS0><YS1>40002</YS1><YS2>40003</YS2><YS3>40004</YS3><YS4>40005</YS4><YS5>40006</YS5><YS6>40007</YS6><YS7>40008</YS7><YS8>40009</YS8><YS9>40010</YS9><YS10>40011</YS10><YS11>40012</YS11><YS12>40013</YS12><YS13>40014</YS13><YS14>40015</YS14><YS15>40016</YS15><YS16>40017</YS16><YS17>40018</YS17><YS18>40019</YS18><YS19>40020</YS19><YS20>40021</YS20><YS21>40022</YS21><YS22>40023</YS22><YS23>40024</YS23><YS24>40025</YS24><YS25>40026</YS25><YS26>40027</YS26><YS27>40028</YS27><YS28>40029</YS28><YS29>40030</YS29><YS30>40031</YS30><YS31>40032</YS31><YS32>40033</YS32><YS33>40034</YS33><YS34>40035</YS34><YS35>40036</YS35><YS36>40037</YS36><YS37>40038</YS37><YS38>40039</YS38><YS39>40040</YS39><YS40>40041</YS40><YS41>40042</YS41><YS42>40043</YS42><YS43>40044</YS43><YS44>40045</YS44><YS45>40046</YS45><YS46>40047</YS46><YS47>40048</YS47><YS48>40049</YS48><YS49>40050</YS49><YS50>40051</YS50><YS51>40052</YS51><YS52>40053</YS52><YS53>40054</YS53><YS54>40055</YS54><YS55>40056</YS55><YS56>40057</YS56><YS57>40058</YS57><YS58>40059</YS58><YS59>40060</YS59><YS60>40061</YS60><YS61>40062</YS61><YS62>40063</YS62><YS63>40064</YS63><YS64>40065</YS64><YS65>40066</YS65><YS66>40067</YS66></list_str_MainPriority_Serial>
   </whole>
   <M_DZ>
     <Notes>
     </Notes>
   </M_DZ>
+  <M_VDA19>
+    <IsVDA19>False</IsVDA19>
+  </M_VDA19>
 </XmlConfig>

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSProgMgrParam.pmf

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData RunMode="ProfessionalMode" SysType="TCCleannessA">
+<XMLData RunMode="ProfessionalMode" SysType="BatteryCleannessA">
   <Member RegName="GenParam" DefaultArea="100" DefaultSampleName="Sample" DefaultShape="0" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="NoSTDDB" SteelTechnology="0" UseSysSTD="true" />
   <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="1:MANUAL" OverlapParam="0" ParticleSelectionCondition="">
     <Member RegName="BGGray" end="255" start="153" />

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSReportMgrParam.rpf

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData systype="TCCleannessA">
+<XMLData systype="BatteryCleannessA">
   <Member RegName="Scale" strValue="1000" />
   <Member RegName="DefaultComputedColName" strValue="Area,EquivalentCircleDiameter,MaxDiameter,MinDiameter,DiameterRatio,FerretDiameter,PERP,PERI,INSCR,MEAN,ELONG,ASPECT_ELONG,Orientation" />
   <Member RegName="ElementsColName" strValue="C,O,Al,Fe,F,Ti,Na,Mn,Mg" />

+ 9 - 9
OTSIncAReportApp/1-UI/OTSReportExport/Category.Designer.cs

@@ -30,9 +30,9 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
         private void InitializeComponent()
         {
             this.panel1 = new System.Windows.Forms.Panel();
+            this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
             this.button4 = new System.Windows.Forms.Button();
             this.button3 = new System.Windows.Forms.Button();
-            this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
             this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -48,6 +48,14 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
             this.panel1.Size = new System.Drawing.Size(244, 413);
             this.panel1.TabIndex = 13;
             // 
+            // checkedListBox1
+            // 
+            this.checkedListBox1.FormattingEnabled = true;
+            this.checkedListBox1.Location = new System.Drawing.Point(12, 12);
+            this.checkedListBox1.Name = "checkedListBox1";
+            this.checkedListBox1.Size = new System.Drawing.Size(217, 356);
+            this.checkedListBox1.TabIndex = 82;
+            // 
             // button4
             // 
             this.button4.Location = new System.Drawing.Point(154, 374);
@@ -68,14 +76,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
             this.button3.UseVisualStyleBackColor = true;
             this.button3.Click += new System.EventHandler(this.button3_Click);
             // 
-            // checkedListBox1
-            // 
-            this.checkedListBox1.FormattingEnabled = true;
-            this.checkedListBox1.Location = new System.Drawing.Point(12, 12);
-            this.checkedListBox1.Name = "checkedListBox1";
-            this.checkedListBox1.Size = new System.Drawing.Size(217, 356);
-            this.checkedListBox1.TabIndex = 82;
-            // 
             // Category
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 6 - 9
OTSIncAReportApp/1-UI/OTSReportExport/Category.cs

@@ -15,7 +15,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
     public partial class Category : Form
     {
         List<string> CheckTheOptions = new List<string>();
-        List<string> ElementList = new List<string>();
+        DataTable ElementList = new DataTable();
         public List<string> OutElementList = new List<string>();
         /// <summary>
         /// 窗体是否修改
@@ -24,7 +24,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
         public List<string> vs = new List<string>();
         Hashtable table;
      
-        public Category(List<string> a_ElementList, List<string> AllList)
+        public Category(List<string> a_ElementList,DataTable AllList)
         {
             InitializeComponent();
             ElementList = AllList;
@@ -38,9 +38,9 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
 
         private void Category_Load(object sender, EventArgs e)
         {
-            for (int i = 0; i < ElementList.Count; i++)
+            for (int i = 0; i < ElementList.Rows.Count; i++)
             {
-                checkedListBox1.Items.Add(ElementList[i]);
+                checkedListBox1.Items.Add(ElementList.Rows[i]["StrName"].ToString());
             }
             for (int i = 0; i < checkedListBox1.Items.Count; i++)
             {
@@ -73,12 +73,9 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport
                 if (checkedListBox1.GetItemChecked(i))
                 {
                     OutElementList.Add(checkedListBox1.Items[i].ToString());
-                    vs.Add("1");
-                }
-                else
-                {
-                    vs.Add("0");
+                    vs.Add(ElementList.Rows[i]["STDId"].ToString());
                 }
+               
             }
             IsModify = true;
             

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

@@ -184,7 +184,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 bool bl = false;
                 for (int a = 0; a < m_bt_DBData.Rows.Count; a++)
                 {
-                    if (m_bt_DBData.Rows[a]["TypeName"].ToString() == m_mbszclass.list_str_MainPriority[i])
+                    if (m_bt_DBData.Rows[a]["TypeId"].ToString() == m_mbszclass.list_str_MainPriority_Serial[i])
                     {
                         datass.Rows.Add(m_bt_DBData.Rows[a].ItemArray);
                         bl = true;
@@ -215,6 +215,11 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                             }
                         }
                         else
+                        if (dta.Columns[b].ColumnName == "TypeId")
+                        {
+                            dta.Rows[0][b] = m_mbszclass.list_str_MainPriority_Serial[i];
+                        }
+                        else
                         {
                             dta.Rows[0][b] = 0;
                         }

+ 4 - 2
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/TCCleannessA.cs

@@ -95,7 +95,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr2["hardnes"] = "0";
                 for (int a=0;a< table.Rows.Count;a++)
                 {
-                    if(data.Rows[i]["TypeName"].ToString()== table.Rows[a]["TypeId"].ToString())
+                    if(data.Rows[i]["TypeId"].ToString()== table.Rows[a]["TypeId"].ToString())
                     {
                         dr2["hardness"] = table.Rows[a]["Hardness_detailed"].ToString();
                         dr2["metal"]= table.Rows[a]["metal"].ToString();
@@ -146,6 +146,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                  data = new DataTable();
             }
             DataTable dt = new DataTable();
+            dt.Columns.Add("Name");
             dt.Columns.Add("TypeId");
             dt.Columns.Add("Hardness", typeof(double));
             dt.Columns.Add("Hardness_detailed");
@@ -174,7 +175,8 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             {
                 double DAGroupId;
                 DataRow dr = dt.NewRow();
-                dr["TypeId"] = dt_stl.Rows[i]["StrName"].ToString();
+                dr["Name"] = dt_stl.Rows[i]["StrName"].ToString();
+                dr["TypeId"]= dt_stl.Rows[i]["STDId"].ToString();
                 dr["Hardness_detailed"] = dt_stl.Rows[i]["Hardness"].ToString();
                 if (System.Text.RegularExpressions.Regex.Replace(dt_stl.Rows[i]["Hardness"].ToString(), @"[^\d.\d]", "").ToString() != "")
                 {

+ 6 - 9
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_CleannessA.cs

@@ -788,20 +788,17 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 textBox_zypxss.Text = str;
             }
         }
-        private List<string> ReadClassification(int position)
+        private DataTable ReadClassification(int position)
         {
-            List<string> vs = new List<string>();
+            DataTable dt_stl = new DataTable();
             if (comboBox1.Text == "")
             {
-                return vs;
+                return dt_stl;
             }
             SqLiteHelper sh = new SqLiteHelper("data source='" + m_OTSReport_Export.LibraryName[position][1] + "'");
-            DataTable dt_stl = sh.ExecuteQuery("select * from ClassifySTD");
-            for (int i = 0; i < dt_stl.Rows.Count; i++)
-            {
-                vs.Add(dt_stl.Rows[i]["StrName"].ToString());
-            }
-            return vs;
+             dt_stl = sh.ExecuteQuery("select * from ClassifySTD");
+         
+            return dt_stl;
         }
 
         private void button7_Click(object sender, EventArgs e)

+ 9 - 1
OTSIncAReportApp/1-UI/OTSReportExport/Template/DataTemplate.cs

@@ -953,7 +953,15 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrChart_ParticelSizeSubdivision.Visible = false;
             if (a_pieSeries && surface_dt2.Rows.Count>0)
             {
-                DataView dv2 = surface_dt2.DefaultView;
+                DataTable data = surface_dt2.Clone();
+                for (int i=0;i< surface_dt2.Rows.Count;i++)
+                {
+                    if (Convert.ToInt32(surface_dt2.Rows[i]["total"])>0 )
+                    {
+                        data.Rows.Add(surface_dt2.Rows[i].ItemArray);
+                    }
+                }
+                DataView dv2 = data.DefaultView;
                 dv2.Sort = "total DESC";
                 DataTable dt_subdivde_dt = dv2.ToTable();
                 xrChart_ParticelSizeSubdivision.Visible = true;