Browse Source

Merge branch 'Release2.5' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into zty

zty 2 years ago
parent
commit
ade8c16c72

+ 101 - 8
OTSCPP/OTSClassifyEngine/InclutionEngine/OTSClassifyEng.cpp

@@ -608,23 +608,24 @@ namespace OTSClassifyEngine
 		}
 		}
 		
 		
 	
 	
-		if (dOWeight >= MIN_ELEMENT_SUM && dSWeight< MIN_ELEMENT_SUM )
-		{
-			
-			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
-			
-		}
-		else if ( dSWeight >= MIN_ELEMENT_SUM && dOWeight < MIN_ELEMENT_SUM)
+	
+		if ( dSWeight >= MIN_ELEMENT_SUM && dOWeight < MIN_ELEMENT_SUM && dNWeight <= MIN_ELEMENT_SUM)
 		{
 		{
 			a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE;
 			a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE;
 		}
 		}
-		else if (dOWeight >= MIN_ELEMENT_SUM && dSWeight >= MIN_ELEMENT_SUM )
+		else if (dOWeight >= MIN_ELEMENT_SUM && dSWeight >= MIN_ELEMENT_SUM && dNWeight<=MIN_ELEMENT_SUM)
 		{
 		{
 			a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE_OXIDE;
 			a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE_OXIDE;
 		}
 		}
 		else if ( dNWeight >= MIN_ELEMENT_SUM)
 		else if ( dNWeight >= MIN_ELEMENT_SUM)
 		{
 		{
 			a_GrpId = IDENTIFIED_INC_GRP_ID::CARBONNITRIDE_NITRIDE;
 			a_GrpId = IDENTIFIED_INC_GRP_ID::CARBONNITRIDE_NITRIDE;
+		}else
+		if (dOWeight >= MIN_ELEMENT_SUM && dSWeight < MIN_ELEMENT_SUM)
+		{
+
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+
 		}
 		}
 		else
 		else
 		{
 		{
@@ -636,6 +637,70 @@ namespace OTSClassifyEngine
 		return TRUE;
 		return TRUE;
 		
 		
 	
 	
+	}
+	BOOL COTSClassifyEng::GroupClassify1(CElementChemistriesList& a_listElChemsIncNoFe, int incId, IDENTIFIED_INC_GRP_ID& a_GrpId)
+	{
+
+		double dOWeight = 0;
+		double dSWeight = 0;
+		double dNWeight = 0;
+		for (auto pElChem : a_listElChemsIncNoFe)
+		{
+
+			if (pElChem->GetName().CompareNoCase(STR_O) == 0)
+			{
+
+				dOWeight = pElChem->GetPercentage();
+
+			}
+			else if (pElChem->GetName().CompareNoCase(STR_SUL) == 0)
+			{
+
+				dSWeight = pElChem->GetPercentage();
+
+			}
+			else if (pElChem->GetName().CompareNoCase(STR_N) == 0)
+			{
+				dNWeight = pElChem->GetPercentage();
+			}
+
+
+
+		}
+
+		auto stdItm = pPartSTDData->GetSTDItemById(incId);
+		INC_CLASSIFY_TYPE claType = INC_CLASSIFY_TYPE::INVALID;
+		this->GetClassifyTypeOfSTDItem(incId, claType);
+
+		if (claType == INC_CLASSIFY_TYPE::COMPLEX_OXIDE || claType == INC_CLASSIFY_TYPE::OXIDE || claType == INC_CLASSIFY_TYPE::SIMPLE_OXIDE)
+		{
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+			return true;
+		}
+		else if (claType == INC_CLASSIFY_TYPE::SUL)
+		{
+
+			 if (dOWeight >= MIN_ELEMENT_SUM && dSWeight <= 1)
+			{
+				a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE_OXIDE;
+			 }
+			 else
+			 {
+				 a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE;
+			 }
+		}
+		else if (claType == INC_CLASSIFY_TYPE::NITR)
+		{
+			a_GrpId = IDENTIFIED_INC_GRP_ID::CARBONNITRIDE_NITRIDE;
+		}
+		else
+		{
+			a_GrpId = IDENTIFIED_INC_GRP_ID::Others;
+		}
+
+		return TRUE;
+
+
 	}
 	}
 
 
 	BOOL COTSClassifyEng::GetGroupNameAndColorById(int grpId,std::string& grpName,std::string& grpColor)
 	BOOL COTSClassifyEng::GetGroupNameAndColorById(int grpId,std::string& grpName,std::string& grpColor)
@@ -1502,7 +1567,35 @@ namespace OTSClassifyEngine
 		// ok, return TRUE
 		// ok, return TRUE
 		return TRUE;
 		return TRUE;
 	}
 	}
+	BOOL COTSClassifyEng::GetClassifyTypeOfSTDItem(int a_nIncId, INC_CLASSIFY_TYPE& a_nClassifyType)
+	{
+
+
+		a_nClassifyType = INC_CLASSIFY_TYPE::INVALID;
+		if (a_nIncId >=(int) OTS_STD_ITEM_VALUE::SYS_SIMPLE_OXIDE_MIN && a_nIncId < (int)OTS_STD_ITEM_VALUE::SYS_SIMPLE_OXIDE_MAX)
+		{
+			a_nClassifyType = INC_CLASSIFY_TYPE::SIMPLE_OXIDE;
+		}else if(a_nIncId >= (int) OTS_STD_ITEM_VALUE::SYS_COMPLEX_OXIDE_MIN && a_nIncId < (int)OTS_STD_ITEM_VALUE::SYS_COMPLEX_OXIDE_MAX)
+		{
+		
+			a_nClassifyType = INC_CLASSIFY_TYPE::COMPLEX_OXIDE;
+		}
+		else if (a_nIncId >= (int)OTS_STD_ITEM_VALUE::SYS_OXIDE_MIN && a_nIncId < (int)OTS_STD_ITEM_VALUE::SYS_OXIDE_MAX)
+		{
+			a_nClassifyType = INC_CLASSIFY_TYPE::OXIDE;
+		}
+		else if (a_nIncId >= (int)OTS_STD_ITEM_VALUE::SYS_SUL_MIN && a_nIncId < (int)OTS_STD_ITEM_VALUE::SYS_SUL_MAX)
+		{
+			a_nClassifyType = INC_CLASSIFY_TYPE::SUL;
+		}
+		else if (a_nIncId >= (int)OTS_STD_ITEM_VALUE::SYS_NITRIDE_MIN && a_nIncId < (int)OTS_STD_ITEM_VALUE::SYS_NITRIDE_MAX)
+		{
+			a_nClassifyType = INC_CLASSIFY_TYPE::NITR;
+		}
+		return true;
 
 
+		
+	}
 	BOOL COTSClassifyEng::GetSulfildeOxideComplexItemId(CElementChemistriesList& a_listElChemsIncNoFe, double a_dMolarSumNoFe, CString strSulfideBaseName, int& a_nIncId)
 	BOOL COTSClassifyEng::GetSulfildeOxideComplexItemId(CElementChemistriesList& a_listElChemsIncNoFe, double a_dMolarSumNoFe, CString strSulfideBaseName, int& a_nIncId)
 	{
 	{
 		int nIncId;
 		int nIncId;

+ 3 - 0
OTSCPP/OTSClassifyEngine/InclutionEngine/OTSClassifyEng.h

@@ -42,6 +42,8 @@ namespace OTSClassifyEngine
 
 
 		 BOOL GroupClassify(CElementChemistriesList& a_listElChemsIncNoFe,int incId, IDENTIFIED_INC_GRP_ID& a_GrpId);
 		 BOOL GroupClassify(CElementChemistriesList& a_listElChemsIncNoFe,int incId, IDENTIFIED_INC_GRP_ID& a_GrpId);
 
 
+		 BOOL GroupClassify1(CElementChemistriesList& a_listElChemsIncNoFe, int incId, IDENTIFIED_INC_GRP_ID& a_GrpId);
+
 		 BOOL GetGroupNameAndColorById(int grpId, std::string& grpName, std::string& grpColor);
 		 BOOL GetGroupNameAndColorById(int grpId, std::string& grpName, std::string& grpColor);
 
 
 		// sulfides classification 
 		// sulfides classification 
@@ -123,6 +125,7 @@ namespace OTSClassifyEngine
 			CElementChemistriesList& a_listNomiElChemsInc);
 			CElementChemistriesList& a_listNomiElChemsInc);
 		// get classify STD items
 		// get classify STD items
 		BOOL GetClassifySTDItem(CInclutionSTDDataPtr a_pPartSTDDataPtr, INC_CLASSIFY_TYPE a_nClassifyType, CSTDItemsList& a_listSTDItems);
 		BOOL GetClassifySTDItem(CInclutionSTDDataPtr a_pPartSTDDataPtr, INC_CLASSIFY_TYPE a_nClassifyType, CSTDItemsList& a_listSTDItems);
+		BOOL GetClassifyTypeOfSTDItem(int a_nIncId, INC_CLASSIFY_TYPE& a_nClassifyType);
 		BOOL GetSulfildeOxideComplexItemId(CElementChemistriesList& a_listElChemsIncNoFe,
 		BOOL GetSulfildeOxideComplexItemId(CElementChemistriesList& a_listElChemsIncNoFe,
 			double a_dMolarSumNoFe, CString strSulfideBaseName,
 			double a_dMolarSumNoFe, CString strSulfideBaseName,
 			int& nIncId);
 			int& nIncId);

+ 42 - 0
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -973,6 +973,27 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
 
             }
             }
 
 
+            //去除物质分类(非夹杂物分类)
+
+            for (int a = 0; a < m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Count; a++)
+            {
+                for (int i = dt.Rows.Count-1; i >=0; i--)
+                {
+                    if (dt.Rows[i]["TypeName"].ToString() == m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass[a].ToString())
+                    {
+                        dt.Rows.RemoveAt(i);
+                    
+                    }
+                }
+            }
+
+
+
+
+
+
+
+
             //将颗粒大小排序(从大到小)
             //将颗粒大小排序(从大到小)
             DataView dv = dt.DefaultView;
             DataView dv = dt.DefaultView;
             dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
             dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
@@ -1213,6 +1234,27 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     }
                     }
                 }
                 }
             }
             }
+
+
+
+            //去除物质分类(非夹杂物分类)
+
+            for (int a = 0; a < m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Count; a++)
+            {
+                for (int i = dt.Rows.Count - 1; i >= 0; i--)
+                {
+                    if (dt.Rows[i]["TypeName"].ToString() == m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass[a].ToString())
+                    {
+                        dt.Rows.RemoveAt(i);
+
+                    }
+                }
+            }
+
+
+
+
+
             //将颗粒大小排序(从大到小)
             //将颗粒大小排序(从大到小)
             DataView dv = dt.DefaultView;
             DataView dv = dt.DefaultView;
             dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
             dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";

+ 24 - 0
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_Export.cs

@@ -135,6 +135,7 @@ namespace OTSIncAReportApp
                 M_JZWZB = new JZWZB();
                 M_JZWZB = new JZWZB();
                 M_KLLBXX.list_str_tb_lllb_sxys = new List<string>();
                 M_KLLBXX.list_str_tb_lllb_sxys = new List<string>();
                 M_KLLBXX.list_str_kllb_qcys = new List<string>();
                 M_KLLBXX.list_str_kllb_qcys = new List<string>();
+                M_KLLBXX.list_str_kllb_DeleteClass = new List<string>();
                 M_DZ = new DZ();
                 M_DZ = new DZ();
             }
             }
             #endregion
             #endregion
@@ -568,6 +569,14 @@ namespace OTSIncAReportApp
                 /// </summary>
                 /// </summary>
                 public List<string> list_str_kllb_qcys { get; set; }
                 public List<string> list_str_kllb_qcys { get; set; }
 
 
+                /// <summary>
+                /// 颗粒列表去除不要的物质分类
+                /// </summary>
+                public string str_kllb_DeleteClass { get; set; }
+                /// <summary>
+                /// 颗粒列表去除不要的物质分类
+                /// </summary>
+                public List<string> list_str_kllb_DeleteClass { get; set; }
             }
             }
             #endregion
             #endregion
             #region 夹杂物占比
             #region 夹杂物占比
@@ -785,6 +794,21 @@ namespace OTSIncAReportApp
                     m_mbszclass.M_KLLBXX.list_str_kllb_qcys.Add(str);
                     m_mbszclass.M_KLLBXX.list_str_kllb_qcys.Add(str);
                 }
                 }
             }
             }
+            m_mbszclass.M_KLLBXX.str_kllb_DeleteClass = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_kllb_DeleteClass"));
+            m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Clear();
+            for (int i = 0; i < 100; i++)                              //取得所有元素列表
+            {
+                string str = xmlutil2.Read("M_KLLBXX", "list_str_kllb_DeleteClass", "YS" + i.ToString());
+                if (str == null)
+                {
+                    break;
+                }
+                else
+                {
+                    m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Add(str);
+                }
+            }
+
 
 
             //夹杂物占比
             //夹杂物占比
             m_mbszclass.M_JZWZB.b_ck_surface = Convert.ToBoolean(xmlutil2.Read("M_JZWZB", "b_ck_surface"));//夹杂物占比表
             m_mbszclass.M_JZWZB.b_ck_surface = Convert.ToBoolean(xmlutil2.Read("M_JZWZB", "b_ck_surface"));//夹杂物占比表

+ 52 - 30
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.Designer.cs

@@ -76,6 +76,9 @@
             this.label33 = new System.Windows.Forms.Label();
             this.label33 = new System.Windows.Forms.Label();
             this.label42 = new System.Windows.Forms.Label();
             this.label42 = new System.Windows.Forms.Label();
             this.groupBox8 = new System.Windows.Forms.GroupBox();
             this.groupBox8 = new System.Windows.Forms.GroupBox();
+            this.label11111 = new System.Windows.Forms.Label();
+            this.button5 = new System.Windows.Forms.Button();
+            this.tb_RemoveElements = new System.Windows.Forms.TextBox();
             this.ck_kllb_fjzt = new System.Windows.Forms.CheckBox();
             this.ck_kllb_fjzt = new System.Windows.Forms.CheckBox();
             this.label111 = new System.Windows.Forms.Label();
             this.label111 = new System.Windows.Forms.Label();
             this.groupBox_zt = new System.Windows.Forms.GroupBox();
             this.groupBox_zt = new System.Windows.Forms.GroupBox();
@@ -118,9 +121,8 @@
             this.groupBox9 = new System.Windows.Forms.GroupBox();
             this.groupBox9 = new System.Windows.Forms.GroupBox();
             this.label39 = new System.Windows.Forms.Label();
             this.label39 = new System.Windows.Forms.Label();
             this.cb_ParticleRange = new System.Windows.Forms.ComboBox();
             this.cb_ParticleRange = new System.Windows.Forms.ComboBox();
-            this.tb_RemoveElements = new System.Windows.Forms.TextBox();
-            this.button5 = new System.Windows.Forms.Button();
-            this.label11111 = new System.Windows.Forms.Label();
+            this.delete_Class = new System.Windows.Forms.TextBox();
+            this.label_delete_Class = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.groupBox1.SuspendLayout();
             this.groupBox4.SuspendLayout();
             this.groupBox4.SuspendLayout();
             this.groupBox6.SuspendLayout();
             this.groupBox6.SuspendLayout();
@@ -634,6 +636,8 @@
             // 
             // 
             // groupBox8
             // groupBox8
             // 
             // 
+            this.groupBox8.Controls.Add(this.label_delete_Class);
+            this.groupBox8.Controls.Add(this.delete_Class);
             this.groupBox8.Controls.Add(this.label11111);
             this.groupBox8.Controls.Add(this.label11111);
             this.groupBox8.Controls.Add(this.button5);
             this.groupBox8.Controls.Add(this.button5);
             this.groupBox8.Controls.Add(this.tb_RemoveElements);
             this.groupBox8.Controls.Add(this.tb_RemoveElements);
@@ -653,11 +657,39 @@
             this.groupBox8.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox8.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox8.Name = "groupBox8";
             this.groupBox8.Name = "groupBox8";
             this.groupBox8.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox8.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox8.Size = new System.Drawing.Size(263, 464);
+            this.groupBox8.Size = new System.Drawing.Size(263, 501);
             this.groupBox8.TabIndex = 6;
             this.groupBox8.TabIndex = 6;
             this.groupBox8.TabStop = false;
             this.groupBox8.TabStop = false;
             this.groupBox8.Text = "颗粒列表";
             this.groupBox8.Text = "颗粒列表";
             // 
             // 
+            // label11111
+            // 
+            this.label11111.AutoSize = true;
+            this.label11111.Location = new System.Drawing.Point(14, 382);
+            this.label11111.Name = "label11111";
+            this.label11111.Size = new System.Drawing.Size(77, 12);
+            this.label11111.TabIndex = 61;
+            this.label11111.Text = "去除元素信息";
+            // 
+            // button5
+            // 
+            this.button5.Location = new System.Drawing.Point(202, 403);
+            this.button5.Name = "button5";
+            this.button5.Size = new System.Drawing.Size(55, 23);
+            this.button5.TabIndex = 60;
+            this.button5.Text = "选取";
+            this.button5.UseVisualStyleBackColor = true;
+            this.button5.Click += new System.EventHandler(this.button5_Click);
+            // 
+            // tb_RemoveElements
+            // 
+            this.tb_RemoveElements.Location = new System.Drawing.Point(11, 405);
+            this.tb_RemoveElements.Margin = new System.Windows.Forms.Padding(2);
+            this.tb_RemoveElements.Name = "tb_RemoveElements";
+            this.tb_RemoveElements.ReadOnly = true;
+            this.tb_RemoveElements.Size = new System.Drawing.Size(181, 21);
+            this.tb_RemoveElements.TabIndex = 59;
+            // 
             // ck_kllb_fjzt
             // ck_kllb_fjzt
             // 
             // 
             this.ck_kllb_fjzt.AutoSize = true;
             this.ck_kllb_fjzt.AutoSize = true;
@@ -1002,7 +1034,7 @@
             this.groupBox211.Controls.Add(this.label1311);
             this.groupBox211.Controls.Add(this.label1311);
             this.groupBox211.Controls.Add(this.label1211);
             this.groupBox211.Controls.Add(this.label1211);
             this.groupBox211.Controls.Add(this.ck_jzwzb_surface);
             this.groupBox211.Controls.Add(this.ck_jzwzb_surface);
-            this.groupBox211.Location = new System.Drawing.Point(3, 1706);
+            this.groupBox211.Location = new System.Drawing.Point(3, 1749);
             this.groupBox211.Name = "groupBox211";
             this.groupBox211.Name = "groupBox211";
             this.groupBox211.Size = new System.Drawing.Size(263, 81);
             this.groupBox211.Size = new System.Drawing.Size(263, 81);
             this.groupBox211.TabIndex = 8;
             this.groupBox211.TabIndex = 8;
@@ -1049,7 +1081,7 @@
             // groupBZ
             // groupBZ
             // 
             // 
             this.groupBZ.Controls.Add(this.textBox_strBZ);
             this.groupBZ.Controls.Add(this.textBox_strBZ);
-            this.groupBZ.Location = new System.Drawing.Point(5, 1793);
+            this.groupBZ.Location = new System.Drawing.Point(5, 1838);
             this.groupBZ.Name = "groupBZ";
             this.groupBZ.Name = "groupBZ";
             this.groupBZ.Size = new System.Drawing.Size(263, 139);
             this.groupBZ.Size = new System.Drawing.Size(263, 139);
             this.groupBZ.TabIndex = 7;
             this.groupBZ.TabIndex = 7;
@@ -1106,33 +1138,21 @@
             this.cb_ParticleRange.Size = new System.Drawing.Size(121, 20);
             this.cb_ParticleRange.Size = new System.Drawing.Size(121, 20);
             this.cb_ParticleRange.TabIndex = 76;
             this.cb_ParticleRange.TabIndex = 76;
             // 
             // 
-            // tb_RemoveElements
+            // delete_Class
             // 
             // 
-            this.tb_RemoveElements.Location = new System.Drawing.Point(11, 405);
-            this.tb_RemoveElements.Margin = new System.Windows.Forms.Padding(2);
-            this.tb_RemoveElements.Name = "tb_RemoveElements";
-            this.tb_RemoveElements.ReadOnly = true;
-            this.tb_RemoveElements.Size = new System.Drawing.Size(181, 21);
-            this.tb_RemoveElements.TabIndex = 59;
+            this.delete_Class.Location = new System.Drawing.Point(11, 464);
+            this.delete_Class.Name = "delete_Class";
+            this.delete_Class.Size = new System.Drawing.Size(181, 21);
+            this.delete_Class.TabIndex = 62;
             // 
             // 
-            // button5
+            // label_delete_Class
             // 
             // 
-            this.button5.Location = new System.Drawing.Point(202, 403);
-            this.button5.Name = "button5";
-            this.button5.Size = new System.Drawing.Size(55, 23);
-            this.button5.TabIndex = 60;
-            this.button5.Text = "选取";
-            this.button5.UseVisualStyleBackColor = true;
-            this.button5.Click += new System.EventHandler(this.button5_Click);
-            // 
-            // label11111
-            // 
-            this.label11111.AutoSize = true;
-            this.label11111.Location = new System.Drawing.Point(14, 382);
-            this.label11111.Name = "label11111";
-            this.label11111.Size = new System.Drawing.Size(77, 12);
-            this.label11111.TabIndex = 61;
-            this.label11111.Text = "去除元素信息";
+            this.label_delete_Class.AutoSize = true;
+            this.label_delete_Class.Location = new System.Drawing.Point(12, 440);
+            this.label_delete_Class.Name = "label_delete_Class";
+            this.label_delete_Class.Size = new System.Drawing.Size(101, 12);
+            this.label_delete_Class.TabIndex = 63;
+            this.label_delete_Class.Text = "去除指定物质分类";
             // 
             // 
             // OTSReport_TemplateDesignerRM
             // OTSReport_TemplateDesignerRM
             // 
             // 
@@ -1282,5 +1302,7 @@
         private System.Windows.Forms.Button button5;
         private System.Windows.Forms.Button button5;
         private System.Windows.Forms.TextBox tb_RemoveElements;
         private System.Windows.Forms.TextBox tb_RemoveElements;
         private System.Windows.Forms.Label label11111;
         private System.Windows.Forms.Label label11111;
+        private System.Windows.Forms.Label label_delete_Class;
+        private System.Windows.Forms.TextBox delete_Class;
     }
     }
 }
 }

+ 38 - 1
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.cs

@@ -595,6 +595,29 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 }
                 }
 
 
 
 
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass.ToString(), "M_KLLBXX", "str_kllb_DeleteClass");
+
+                for (int i = 0; i < m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Count; i++)                              //去除元素列表
+                {
+                    xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass[i].ToString(), "M_KLLBXX", "list_str_kllb_DeleteClass", "YS" + i.ToString());
+                }
+
+                //然后判断一下xml中是否还存在之前比现有长度长的节点存在,存在则删除,防止后面再进行读取
+                for (int i = m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Count; i < 1000; i++)
+                {
+                    string strxh = i.ToString();
+                    if (null != xmlutil.Read("M_KLLBXX", "list_str_kllb_DeleteClass", "YS" + strxh))
+                    {
+                        //删除该节点
+                        xmlutil.RemoveNode("M_KLLBXX", "list_str_kllb_DeleteClass", "YS" + strxh);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+
+
                 //夹杂物占比
                 //夹杂物占比
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface.ToString(), "M_JZWZB", "b_ck_surface");//夹杂物占比表
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface.ToString(), "M_JZWZB", "b_ck_surface");//夹杂物占比表
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_chart.ToString(), "M_JZWZB", "b_ck_chart");//夹杂物占比图
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_chart.ToString(), "M_JZWZB", "b_ck_chart");//夹杂物占比图
@@ -671,7 +694,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2 = cb_FrameChart_p2.Text;//颗粒帧图表行第二个字段的可选参数
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2 = cb_FrameChart_p2.Text;//颗粒帧图表行第二个字段的可选参数
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2 = cb_FrameChart_p2.SelectedIndex;
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2 = cb_FrameChart_p2.SelectedIndex;
 
 
-            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_qcys = tb_RemoveElements.Text;
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_qcys = tb_RemoveElements.Text;//去除不要的物质元素
+
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass = delete_Class.Text;//去除不要的物质分类
 
 
             if (ck_kllb_xsmk.Checked)
             if (ck_kllb_xsmk.Checked)
             {
             {
@@ -682,6 +707,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32("1");
                 m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32("1");
             }
             }
 
 
+
             //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_tb_kllb_sxys = tb_kllb_sxys.Text;//显示元素
             //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_tb_kllb_sxys = tb_kllb_sxys.Text;//显示元素
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_ystx = ck_kllb_ystx.Checked;//原始图像
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_ystx = ck_kllb_ystx.Checked;//原始图像
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx = ck_kllb_fdtx.Checked;//放大图像
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx = ck_kllb_fdtx.Checked;//放大图像
@@ -771,6 +797,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             cb_FrameChart_p2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2;
             cb_FrameChart_p2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2;
             //cb_FrameChart_p3.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3;
             //cb_FrameChart_p3.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3;
 
 
+            delete_Class.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass;
+
             //夹杂物占比
             //夹杂物占比
             ck_jzwzb_surface.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface;//夹杂物占比表
             ck_jzwzb_surface.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface;//夹杂物占比表
             ck_jzwzb_chart.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_chart;//夹杂物占比图
             ck_jzwzb_chart.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_chart;//夹杂物占比图
@@ -890,6 +918,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             {
             {
                 m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Add(after[i]);
                 m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Add(after[i]);
             }
             }
+            //拆分,物质分类
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Clear();
+            for (int i=0;i< delete_Class.Text.Split(',').Length;i++)
+            {
+                if (delete_Class.Text.Split(',')[i]!="")
+                m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Add(delete_Class.Text.Split(',')[i]);
+            }
+            
+
 
 
             SaveTemplateParameters();
             SaveTemplateParameters();
 
 

+ 4 - 1
OTSIncAReportApp/ReportTemplate/OTS_DEVReport.cs

@@ -652,7 +652,10 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             //     Export_ReportTemplate export_ReportTemplate = new Export_ReportTemplate(m_otsreport_export);
             //     Export_ReportTemplate export_ReportTemplate = new Export_ReportTemplate(m_otsreport_export);
             DataTable dataTable = export_ReportTemplate.Get_dev_kllb_data(TemplateClass);
             DataTable dataTable = export_ReportTemplate.Get_dev_kllb_data(TemplateClass);
 
 
-            for (int i=0;i<dataTable.Rows.Count;i++)
+           
+
+
+            for (int i = 0; i < dataTable.Rows.Count; i++)
             {
             {
                 dataTable.Rows[i]["Class"] = subscript.Getsubscriptstring(dataTable.Rows[i]["Class"].ToString());
                 dataTable.Rows[i]["Class"] = subscript.Getsubscriptstring(dataTable.Rows[i]["Class"].ToString());
             }
             }