Browse Source

Merge branch 'OTSRelease3_2' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_2

gsp 9 months ago
parent
commit
782ba1d079

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

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData RunMode="ProfessionalMode" SysType="TCCleannessA">
+<XMLData RunMode="ProfessionalMode" SysType="IncA">
   <Member RegName="GenParam" DefaultArea="100" DefaultSampleName="Sample" DefaultShape="0" EngineType="0:InclustionEngine" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="MineralSpectrumSTDLib" SteelTechnology="0" />
   <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="0:AUTO" MatrixStep="50" OverlapParam="0" ParticleSelectionCondition="">
     <Member RegName="BGGray" end="50" start="0" />
     <Member RegName="IncArea" end="2000" start="3" />
     <Member RegName="ParticleGray" end="255" start="0" />
   </Member>
-  <Member RegName="ImageScanParam" ImageResolution="3:_1024_768" SatrtImageMode="1:Snake" ScanImageSpeed="0:low" StopMode="0:CoverMode" StopParamArea="10" StopParamFields="100" StopParamMeasTime="360" StopParamParticles="5000" />
+  <Member RegName="ImageScanParam" ImageResolution="4:_1536_1024" SatrtImageMode="1:Snake" ScanImageSpeed="0:low" StopMode="0:CoverMode,4:AreaMode" StopParamArea="30" StopParamFields="100" StopParamMeasTime="360" StopParamParticles="5000" />
   <Member RegName="StageData" ControlDelay="2000" MinMag="65" scanFieldSize="1270" xAxisDir="1:RIGHT_TOWARD" yAxisDir="0:UP_TOWARD">
     <Member RegName="XAxis" end="55000" start="-55000" />
     <Member RegName="YAxis" end="55000" start="-55000" />

+ 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="IncA">
   <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" />

+ 2 - 0
Bin/x64/Debug/Resources/XMLData/AppResource_EN.xml

@@ -997,6 +997,7 @@ field of view(%)" />
 	  <Control name="ChineseStandard2" text="GB30834Function2"/>
 	  <Control name="AmericanStandard" text="American Standard"/>
 	  <Control name="GermanStandard" text="German standard"/>
+	  <Control name="yb6156" text="YB/T 6156-2023"/>
 	  <Control name="CommonClassification" text="Common classification"/>
 	  <Control name="ParticlesAnalyzed" text="ParticlesAnalyzed" />
 	  <Control name="SelectParticles" text="SelectParticles" />
@@ -1005,6 +1006,7 @@ field of view(%)" />
 	  <Control name="DataSourceType" text="DataSourceType" />
 	  <Control name="InclusionAreaRatio" text="ParticleAreaRatio" />
 	  <Control name="IncaArea scale" text="ParticleAreaRatio" />
+	  <Control name="InitialRatingLevel" text="InitialRatingLevel" />
     </Controls>
  </Form>
   <Form>

+ 2 - 1
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -933,6 +933,7 @@
 	  <Control name="ChineseStandard2" text="GB30834方法二" />
 	  <Control name="AmericanStandard" text="美标" />
 	  <Control name="GermanStandard" text="德标" />
+	  <Control name="yb6156" text="YB/T 6156-2023" />
 	  <Control name="CommonClassification" text="颗粒成分分类" />
 	  <Control name="ParticlesAnalyzed" text="已分析颗粒" />
 	  <Control name="SelectParticles" text="选择颗粒" />
@@ -941,7 +942,7 @@
 	  <Control name="DataSourceType" text="数据源类型" />
 	  <Control name="InclusionAreaRatio" text="颗粒面积比" />
 	  <Control name="IncaAreascale" text="颗粒面积比" />
-	  
+	  <Control name="InitialRatingLevel" text="起评级别" />
     </Controls>
  </Form>
  <Form>

+ 2 - 1
OTSCPP/OTSData/otsdataconst.h

@@ -309,7 +309,8 @@ namespace OTSDATA
 		METHODE_1 = 0,
 		METHODE_2 = 1,
 		ASTM=2,
-		MAX = 2
+		YB6156K = 3,
+		MAX = 3
 	} GB_METHODE_TYPE;
 
 	typedef enum class __declspec(dllexport) GB_CHEMICAL_TYPE

+ 129 - 1
OTSCPP/OTSRptCalculate/GBCal/CGBCalculate.cpp

@@ -73,6 +73,19 @@ namespace OTSGBCalculate
 
 				listGridData = this->GetGridDataListForOneDataSourceDIN(DINFld);//express these result data by grid
 			}
+			else if (tableType == CALCULATE_TABLE_TYPE::YB6156)
+			{
+				CGBFieldList listRawGBFields = CalGBFields(rstFileMgrPrt, GB_METHODE_TYPE::YB6156K);
+
+				CategoryGBInclutions(listRawGBFields, tableType);
+
+				listCGBField = listRawGBFields;
+
+				//CGBGradeData gradeData = CGBGradeData(listCGBField);
+
+				listGridData = this->GetGridDataListForOneDataSourceYB6156(listRawGBFields);
+				
+			}
 			else
 			{
 				GB_METHODE_TYPE t;
@@ -87,6 +100,9 @@ namespace OTSGBCalculate
 				case CALCULATE_TABLE_TYPE::ASTM:
 					t = GB_METHODE_TYPE::ASTM;
 					break;
+				/*case CALCULATE_TABLE_TYPE::YB6156:
+					t = GB_METHODE_TYPE::YB6156K;
+					break;*/
 				default:
 					t = GB_METHODE_TYPE::METHODE_1;
 					break;
@@ -122,6 +138,9 @@ namespace OTSGBCalculate
 			case CALCULATE_TABLE_TYPE::ASTM:
 				GBFld->CategoryByASTM();
 				break;
+			case CALCULATE_TABLE_TYPE::YB6156:
+				GBFld->CategoryByYB6156K();
+				break;
 			default:
 				break;
 
@@ -360,7 +379,14 @@ namespace OTSGBCalculate
 
 
 	}
-
+	CGridDatasList CGBCalculate::GetGridDataListForOneDataSourceYB6156(CGBFieldList listRawGBFields)
+	{
+		CGridDatasList listGridData;
+		CGridDataPtr AGrid;
+		AGrid = GetGridYB6156(listRawGBFields);
+		listGridData.push_back(AGrid);
+		return listGridData;
+	}
 	
 	//get grid with level ABCD
 	CGridDataPtr CGBCalculate::GetGridLevel(CString GridType, GBGradeCell a_nLevel[], GBGradeCell a_nLevel_w[], GBGradeCell a_nLevel_s[])
@@ -787,8 +813,110 @@ namespace OTSGBCalculate
 
 		return pGridData;
 	}
+	CGridDataPtr CGBCalculate::GetGridYB6156(CGBFieldList listCGBField)
+	{
+		CGridDataPtr pGridData = CGridDataPtr(new CGridData());
+		std::vector<CString> listDataSource;
+		listDataSource.clear();
+		listDataSource = m_rptMgrPtr->GetPropertyParamForGrid()->GetDataSourceList();
+		pGridData->SetDataSourceList(listDataSource);
 
+		int nDataSourceId = m_rptMgrPtr->GetPropertyParamForGrid()->GetDataSourceId();
+		pGridData->SetDataSourceId(nDataSourceId);
 
+		CGridColumnsList listCol;
+		listCol.clear();
+		CGridColumnPtr pColumn;
+		CString strName;
+		CGridRowsList listRows;
+		CGridRowPtr pRow;
+		pColumn = CGridColumnPtr(new CGridColumn());
+		strName = "AreaA";
+		pColumn->SetName(strName);
+		listRows.clear();
+		for (CGBFieldDataPtr GBFld : listCGBField)
+		{
+			float totalArea = 0;
+			auto dsparticles = GBFld->listAParticles;
+			for (auto pParticle : dsparticles)
+			{
+				double area = pParticle->GetActualArea();
+				totalArea += area;
+			}
+			pRow = CGridRowPtr(new CGridRow());
+
+			pRow->SetDataType(REPORT_GRID_DATA_TYPE::FLOAT);
+			pRow->SetDoubleValue(totalArea);
+		    listRows.push_back(pRow);
+		}
+		pColumn->SetGridRowsList(listRows);
+		listCol.push_back(pColumn);
+		pColumn = CGridColumnPtr(new CGridColumn());
+		strName = "AreaB";
+		pColumn->SetName(strName);
+
+
+		listRows.clear(); 
+		for (CGBFieldDataPtr GBFld : listCGBField)
+		{
+			float totalArea = 0;
+			auto dsparticles = GBFld->listBParticles;
+			for (auto pParticle : dsparticles)
+			{
+				double area = pParticle->GetActualArea();
+				totalArea += area;
+			}
+			pRow = CGridRowPtr(new CGridRow());
+			pRow->SetDataType(REPORT_GRID_DATA_TYPE::FLOAT);
+			pRow->SetDoubleValue(totalArea);
+		    listRows.push_back(pRow);
+		}
+		pColumn->SetGridRowsList(listRows);
+		listCol.push_back(pColumn);
+		pColumn = CGridColumnPtr(new CGridColumn());
+		strName = "AreaC";
+		listRows.clear();
+		pColumn->SetName(strName);
+		for (CGBFieldDataPtr GBFld : listCGBField)
+		{
+			float totalArea = 0;
+			auto dsparticles = GBFld->listCParticles;
+			for (auto pParticle : dsparticles)
+			{
+				double area = pParticle->GetActualArea();
+				totalArea += area;
+			}
+			pRow = CGridRowPtr(new CGridRow());
+			pRow->SetDataType(REPORT_GRID_DATA_TYPE::FLOAT);
+			
+			pRow->SetDoubleValue(totalArea);
+		    listRows.push_back(pRow);
+		}
+		pColumn->SetGridRowsList(listRows);
+		listCol.push_back(pColumn);
+		pColumn = CGridColumnPtr(new CGridColumn());
+		strName = "AreaD";
+		listRows.clear();
+		pColumn->SetName(strName);
+		for (CGBFieldDataPtr GBFld : listCGBField)
+		{
+			float totalArea = 0;
+			auto dsparticles = GBFld->listDParticles;
+			for (auto pParticle : dsparticles)
+			{
+				double area = pParticle->GetActualArea();
+				totalArea += area;
+			}
+			pRow = CGridRowPtr(new CGridRow());
+			pRow->SetDataType(REPORT_GRID_DATA_TYPE::FLOAT);
+			pRow->SetDoubleValue(totalArea);
+		    listRows.push_back(pRow);
+		}
+		pColumn->SetGridRowsList(listRows);
+		listCol.push_back(pColumn);
+		pGridData->SetGridColumnList(listCol);
+		return pGridData;
+	}
 	void CGBCalculate::SetFrameLevelNo(GB_GRADE_TYPE a_level, int a_nLevel[])
 	{
 		a_nLevel[(int)a_level] += 1;

+ 3 - 0
OTSCPP/OTSRptCalculate/GBCal/CGBCalculate.h

@@ -47,10 +47,13 @@ namespace OTSGBCalculate
 		CGridDatasList GetGridDataListForOneDataSource(CGBGradeData* gradeData, CALCULATE_TABLE_TYPE tableType);
 		//计算一个数据源中所获得的GBFields转化的统计数据德标
 		CGridDatasList GetGridDataListForOneDataSourceDIN(CGBFieldDataPtr DINFld);
+
+		CGridDatasList GetGridDataListForOneDataSourceYB6156(CGBFieldList  YB6156Fld);
 	
 
 		CGridDataPtr GetGridLevel(CString GridType, GBGradeCell a_nLevel[], GBGradeCell a_nLevel_w[], GBGradeCell a_nLevel_s[]);
 		CGridDataPtr GetGridDIN(CGBParticleList cotsparticlelistA, CGBParticleList cotsparticlelistB, CGBParticleList cotsparticlelistC, CGBParticleList cotsparticlelistD);
+		CGridDataPtr GetGridYB6156(CGBFieldList listCGBField);
 		CGridDataPtr GetGridDSLevel(CGBGradeData* gradeData);
 		void SetFrameLevelNo(GB_GRADE_TYPE levela, int nALevel[]);
 									

+ 128 - 0
OTSCPP/OTSRptCalculate/GBCal/GBFieldData.cpp

@@ -936,7 +936,135 @@ namespace OTSGBCalculate
 
 		
 	}
+	// caculate Level by yb6156K
+	void CGBFieldData::CategoryByYB6156K()
+	{
+		// according to the shape
+		if (m_listOTSParticles.empty())
+		{
+			return;
+		}
+		COTSParticleList listBAndDParticles;//
+		COTSParticleList listAparts;
+		COTSParticleList listCparts;
+		COTSParticleList listBparts;
+		COTSParticleList listDparts;
+		// get all the all particles for each level	
+		for (auto pParticle : m_listOTSParticles)
+		{	// compute length width ratio
+			if (pParticle->GetType() == OTS_PARTICLE_TYPE::INVALID)//here we take all the particles except Invalid.
+			{
+				continue;
+			}
+			if (pParticle->GetClassifyName() == _T("FeO"))//here we take all the particles except Invalid.
+			{
+				continue;
+			}
+			if (pParticle->GetClassifyName() == _T("SiC"))//here we take all the particles except Invalid.
+			{
+				continue;
+			}
+			auto w = pParticle->GetDMin();
+			if (w == 0)
+			{
+				continue;
+			}
+			//获取最大长度和最小宽度
+			double h = pParticle->GetDMax();
+			double dLengthWidthRatio = h / w;
+			if (dLengthWidthRatio < 1)
+			{
+				dLengthWidthRatio = 1 / dLengthWidthRatio;
+			}
+			GB_CHEMICAL_TYPE nChemicalType = GBParticle::IdentifyPartChemicalType(pParticle);
+			if (dLengthWidthRatio >= 3)//长宽比大于3的颗粒,根据化学元素不同,分为A类和C类
+			{
+				//A or C class
+				if (nChemicalType == GB_CHEMICAL_TYPE::CHE_S)
+				{
+					listAparts.push_back(pParticle);
+				}
 
+				else if (nChemicalType == GB_CHEMICAL_TYPE::CHE_O || nChemicalType == GB_CHEMICAL_TYPE::CHE_Si || nChemicalType == GB_CHEMICAL_TYPE::CHE_Al)
+				{
+					// C
+					listCparts.push_back(pParticle);
+				}
+
+			}
+			else//长宽比小于3的颗粒,有3种情况,一种是串条状的B类颗粒,一种是单独的D类颗粒,如果费雷特直径大于13则为DS类颗粒
+			{
+
+				// B, or D or DS				
+
+				if (nChemicalType == GB_CHEMICAL_TYPE::CHE_S)//if it contains sulfide then it is a A particle.
+				{
+					listAparts.push_back(pParticle);
+
+				}
+				else
+				{
+					// B or D
+					listBAndDParticles.push_back(pParticle);
+				}
+			}
+		}
+
+		//process A class
+		CGBParticleList listAGBparts;
+		ConnectStringParts(listAparts, listAGBparts);
+		for (auto gbp : listAGBparts)
+		{
+			gbp->myType = GB_CLASSIFY_TYPE::A_TYPE;
+			listAParticles.push_back(gbp);
+		}
+		//process C class
+		CGBParticleList listCGBparts;
+		ConnectStringParts(listCparts, listCGBparts);
+		for (auto gbp : listCGBparts)
+		{
+			gbp->myType = GB_CLASSIFY_TYPE::C_TYPE;
+			listCParticles.push_back(gbp);
+		}
+		//process B and D class
+		CGBParticleList listBorDGBparts;
+		ConnectStringParts(listBAndDParticles, listBorDGBparts);
+
+
+		for (auto pGBParticle : listBorDGBparts)
+		{
+
+			if (pGBParticle->myOTSParts.size() == 1)//there's only one part ,it's a D part
+			{
+				/*if (pGBParticle.myPart->GetChemicalType() == GB_CHEMICAL_TYPE::CHE_O)
+				{*/
+				pGBParticle->myType = GB_CLASSIFY_TYPE::D_TYPE;//no matter what chemical it contains,as long as the aspect ratio is less than 3,then it's a D type.
+				listDParticles.push_back(pGBParticle);
+
+
+
+
+
+				double dFeretDiameter = pGBParticle->GetFeretDiameter();
+			}
+			else if (pGBParticle->myOTSParts.size() == 2)//there's only two parts,it's still  D part
+			{
+				// split it into two GB D part
+				for (auto p : pGBParticle->myOTSParts)
+				{
+					CGBParticlePtr gbp = CGBParticlePtr(new GBParticle());
+					gbp->myType = GB_CLASSIFY_TYPE::D_TYPE;
+					gbp->myOTSParts.push_back(p);
+					listDParticles.push_back(gbp);
+				}
+			}
+			else if (pGBParticle->myOTSParts.size() >= 3)
+			{
+				pGBParticle->myType = GB_CLASSIFY_TYPE::B_TYPE;
+				listBParticles.push_back(pGBParticle);
+			}
+		}
+	}
 	void CGBFieldData::ConnectStringParts(COTSParticleList listParticle, CGBParticleList& listGBParticle)
 	{
 		class StringPart;

+ 9 - 1
OTSCPP/OTSRptCalculate/GBCal/GBFieldData.h

@@ -80,7 +80,7 @@ namespace OTSGBCalculate
 		void CategoryByASTM();
 
 		void CaculateLevelDIN(COTSParticleList listParticle);
-
+		void CategoryByYB6156K();
 		void ConnectStringParts(COTSParticleList listParticle, CGBParticleList& listGBParticle);
 
 		std::string GetGBGradeString();
@@ -88,6 +88,14 @@ namespace OTSGBCalculate
 		std::string GetGBGradeDetail();
 
 		GB_GRADE_TYPE GetGBTopGrade();
+
+        #pragma region YB/T 6165-2023
+		CGBParticleList listAParticles;
+		CGBParticleList listBParticles;
+		CGBParticleList listCParticles;
+		CGBParticleList listDParticles;
+        #pragma endregion
+
 	protected:
 
 		// cleanup 

+ 2 - 1
OTSCPP/OTSRptCalculate/Model/PropParam.h

@@ -64,7 +64,8 @@ namespace OTSMODEL {
 		GB_Method2 = 6,
 		ASTM = 7,
 		DIN = 8,
-		MAX = 8
+		YB6156 = 9,
+		MAX = 9
 	}CALCULATE_TABLE_TYPE;
 
 	

+ 765 - 0
OTSIncAReportApp/1-UI/GBCalculate/YB6156ABCD.Designer.cs

@@ -0,0 +1,765 @@
+namespace OTSIncAReportGB
+{
+    partial class YB6156ABCD
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.gridControl_YB6156 = new DevExpress.XtraGrid.GridControl();
+            this.bandedGridView1 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();
+            this.gridBand27 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn1 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand2 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn8 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand3 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn3 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridColumn4 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand1 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand5 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand29 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand28 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand7 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand4 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand6 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn5 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand8 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand16 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn6 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand9 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand17 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn7 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand10 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand18 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn2 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand11 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand19 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn9 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand12 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand20 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn10 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand13 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand21 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn11 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand14 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand22 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn12 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand15 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand23 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn13 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand24 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand25 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn14 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand26 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridBand30 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn15 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.gridBand31 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();
+            this.gridColumn16 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();
+            this.treeListBand1 = new DevExpress.XtraTreeList.Columns.TreeListBand();
+            this.treeListBand2 = new DevExpress.XtraTreeList.Columns.TreeListBand();
+            this.treeListBand6 = new DevExpress.XtraTreeList.Columns.TreeListBand();
+            this.treeListBand3 = new DevExpress.XtraTreeList.Columns.TreeListBand();
+            this.treeListBand4 = new DevExpress.XtraTreeList.Columns.TreeListBand();
+            this.treeListBand5 = new DevExpress.XtraTreeList.Columns.TreeListBand();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.comboBox_InitialRatingLevel = new System.Windows.Forms.ComboBox();
+            ((System.ComponentModel.ISupportInitialize)(this.gridControl_YB6156)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bandedGridView1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // gridControl_YB6156
+            // 
+            this.gridControl_YB6156.Location = new System.Drawing.Point(0, 33);
+            this.gridControl_YB6156.MainView = this.bandedGridView1;
+            this.gridControl_YB6156.Name = "gridControl_YB6156";
+            this.gridControl_YB6156.Size = new System.Drawing.Size(1300, 797);
+            this.gridControl_YB6156.TabIndex = 4;
+            this.gridControl_YB6156.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.bandedGridView1});
+            // 
+            // bandedGridView1
+            // 
+            this.bandedGridView1.Appearance.BandPanel.BackColor = System.Drawing.Color.Transparent;
+            this.bandedGridView1.Appearance.BandPanel.Options.UseBackColor = true;
+            this.bandedGridView1.Appearance.BandPanel.Options.UseTextOptions = true;
+            this.bandedGridView1.Appearance.BandPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
+            this.bandedGridView1.Appearance.BandPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
+            this.bandedGridView1.Appearance.BandPanelBackground.BackColor = System.Drawing.SystemColors.Window;
+            this.bandedGridView1.Appearance.BandPanelBackground.Options.UseBackColor = true;
+            this.bandedGridView1.Appearance.BandPanelBackground.Options.UseTextOptions = true;
+            this.bandedGridView1.Appearance.BandPanelBackground.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
+            this.bandedGridView1.Appearance.HeaderPanel.Options.UseTextOptions = true;
+            this.bandedGridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
+            this.bandedGridView1.Appearance.HeaderPanel.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
+            this.bandedGridView1.Appearance.Row.Options.UseTextOptions = true;
+            this.bandedGridView1.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
+            this.bandedGridView1.Bands.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand27,
+            this.gridBand2,
+            this.gridBand3,
+            this.gridBand1,
+            this.gridBand26});
+            this.bandedGridView1.Columns.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn[] {
+            this.gridColumn1,
+            this.gridColumn2,
+            this.gridColumn3,
+            this.gridColumn4,
+            this.gridColumn5,
+            this.gridColumn6,
+            this.gridColumn7,
+            this.gridColumn8,
+            this.gridColumn9,
+            this.gridColumn10,
+            this.gridColumn11,
+            this.gridColumn12,
+            this.gridColumn13,
+            this.gridColumn14,
+            this.gridColumn15,
+            this.gridColumn16});
+            this.bandedGridView1.GridControl = this.gridControl_YB6156;
+            this.bandedGridView1.Name = "bandedGridView1";
+            this.bandedGridView1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False;
+            this.bandedGridView1.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.False;
+            this.bandedGridView1.OptionsBehavior.ReadOnly = true;
+            this.bandedGridView1.OptionsCustomization.AllowBandMoving = false;
+            this.bandedGridView1.OptionsView.AllowCellMerge = true;
+            this.bandedGridView1.OptionsView.ColumnHeaderAutoHeight = DevExpress.Utils.DefaultBoolean.True;
+            this.bandedGridView1.OptionsView.ShowColumnHeaders = false;
+            this.bandedGridView1.OptionsView.ShowGroupPanel = false;
+            this.bandedGridView1.OptionsView.ShowHorizontalLines = DevExpress.Utils.DefaultBoolean.True;
+            this.bandedGridView1.OptionsView.ShowIndicator = false;
+            this.bandedGridView1.CellMerge += new DevExpress.XtraGrid.Views.Grid.CellMergeEventHandler(this.gridView1_CellMerge);
+            // 
+            // gridBand27
+            // 
+            this.gridBand27.Caption = "试样编号";
+            this.gridBand27.Columns.Add(this.gridColumn1);
+            this.gridBand27.Name = "gridBand27";
+            this.gridBand27.VisibleIndex = 0;
+            this.gridBand27.Width = 114;
+            // 
+            // gridColumn1
+            // 
+            this.gridColumn1.Caption = "gridColumn1";
+            this.gridColumn1.FieldName = "gridColumn1";
+            this.gridColumn1.Name = "gridColumn1";
+            this.gridColumn1.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
+            this.gridColumn1.OptionsColumn.ReadOnly = true;
+            this.gridColumn1.UnboundDataType = typeof(string);
+            this.gridColumn1.UnboundExpression = "SampleId";
+            this.gridColumn1.Visible = true;
+            this.gridColumn1.Width = 114;
+            // 
+            // gridBand2
+            // 
+            this.gridBand2.Caption = "检测面积/平方毫米";
+            this.gridBand2.Columns.Add(this.gridColumn8);
+            this.gridBand2.Name = "gridBand2";
+            this.gridBand2.VisibleIndex = 1;
+            this.gridBand2.Width = 111;
+            // 
+            // gridColumn8
+            // 
+            this.gridColumn8.Caption = "gridColumn8";
+            this.gridColumn8.FieldName = "gridColumn8";
+            this.gridColumn8.Name = "gridColumn8";
+            this.gridColumn8.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
+            this.gridColumn8.OptionsColumn.ReadOnly = true;
+            this.gridColumn8.UnboundDataType = typeof(string);
+            this.gridColumn8.UnboundExpression = "Area";
+            this.gridColumn8.Visible = true;
+            this.gridColumn8.Width = 111;
+            // 
+            // gridBand3
+            // 
+            this.gridBand3.Caption = "夹杂物类别";
+            this.gridBand3.Columns.Add(this.gridColumn3);
+            this.gridBand3.Columns.Add(this.gridColumn4);
+            this.gridBand3.Name = "gridBand3";
+            this.gridBand3.VisibleIndex = 2;
+            this.gridBand3.Width = 147;
+            // 
+            // gridColumn3
+            // 
+            this.gridColumn3.Caption = "gridColumn3";
+            this.gridColumn3.FieldName = "gridColumn3";
+            this.gridColumn3.Name = "gridColumn3";
+            this.gridColumn3.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
+            this.gridColumn3.OptionsColumn.ReadOnly = true;
+            this.gridColumn3.UnboundDataType = typeof(string);
+            this.gridColumn3.UnboundExpression = "InclusionType";
+            this.gridColumn3.Visible = true;
+            this.gridColumn3.Width = 81;
+            // 
+            // gridColumn4
+            // 
+            this.gridColumn4.Caption = "gridColumn4";
+            this.gridColumn4.FieldName = "gridColumn4";
+            this.gridColumn4.Name = "gridColumn4";
+            this.gridColumn4.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
+            this.gridColumn4.OptionsColumn.ReadOnly = true;
+            this.gridColumn4.UnboundDataType = typeof(string);
+            this.gridColumn4.UnboundExpression = "TypeLevel";
+            this.gridColumn4.Visible = true;
+            this.gridColumn4.Width = 66;
+            // 
+            // gridBand1
+            // 
+            this.gridBand1.Caption = "夹杂物级别/权重系数";
+            this.gridBand1.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand5,
+            this.gridBand4,
+            this.gridBand8,
+            this.gridBand9,
+            this.gridBand10,
+            this.gridBand11,
+            this.gridBand12,
+            this.gridBand13,
+            this.gridBand14,
+            this.gridBand15,
+            this.gridBand24});
+            this.gridBand1.Name = "gridBand1";
+            this.gridBand1.VisibleIndex = 3;
+            this.gridBand1.Width = 643;
+            // 
+            // gridBand5
+            // 
+            this.gridBand5.Caption = "0";
+            this.gridBand5.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand29});
+            this.gridBand5.Name = "gridBand5";
+            this.gridBand5.Visible = false;
+            this.gridBand5.VisibleIndex = -1;
+            this.gridBand5.Width = 136;
+            // 
+            // gridBand29
+            // 
+            this.gridBand29.Caption = "gridBand29";
+            this.gridBand29.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand28});
+            this.gridBand29.Name = "gridBand29";
+            this.gridBand29.VisibleIndex = 0;
+            this.gridBand29.Width = 136;
+            // 
+            // gridBand28
+            // 
+            this.gridBand28.Caption = "0.01";
+            this.gridBand28.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand7});
+            this.gridBand28.Name = "gridBand28";
+            this.gridBand28.Visible = false;
+            this.gridBand28.VisibleIndex = -1;
+            // 
+            // gridBand7
+            // 
+            this.gridBand7.Caption = "gridBand1";
+            this.gridBand7.Name = "gridBand7";
+            this.gridBand7.Visible = false;
+            this.gridBand7.VisibleIndex = -1;
+            // 
+            // gridBand4
+            // 
+            this.gridBand4.Caption = "0";
+            this.gridBand4.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand6});
+            this.gridBand4.Name = "gridBand4";
+            this.gridBand4.VisibleIndex = 0;
+            this.gridBand4.Width = 68;
+            // 
+            // gridBand6
+            // 
+            this.gridBand6.Caption = "0.05";
+            this.gridBand6.Columns.Add(this.gridColumn5);
+            this.gridBand6.Name = "gridBand6";
+            this.gridBand6.VisibleIndex = 0;
+            this.gridBand6.Width = 68;
+            // 
+            // gridColumn5
+            // 
+            this.gridColumn5.Caption = "gridColumn5";
+            this.gridColumn5.FieldName = "gridColumn5";
+            this.gridColumn5.Name = "gridColumn5";
+            this.gridColumn5.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn5.OptionsColumn.ReadOnly = true;
+            this.gridColumn5.UnboundDataType = typeof(string);
+            this.gridColumn5.UnboundExpression = "Gride0Count";
+            this.gridColumn5.Visible = true;
+            this.gridColumn5.Width = 68;
+            // 
+            // gridBand8
+            // 
+            this.gridBand8.Caption = "1";
+            this.gridBand8.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand16});
+            this.gridBand8.Name = "gridBand8";
+            this.gridBand8.VisibleIndex = 1;
+            this.gridBand8.Width = 65;
+            // 
+            // gridBand16
+            // 
+            this.gridBand16.Caption = "0.1";
+            this.gridBand16.Columns.Add(this.gridColumn6);
+            this.gridBand16.Name = "gridBand16";
+            this.gridBand16.VisibleIndex = 0;
+            this.gridBand16.Width = 65;
+            // 
+            // gridColumn6
+            // 
+            this.gridColumn6.Caption = "gridColumn6";
+            this.gridColumn6.FieldName = "gridColumn6";
+            this.gridColumn6.Name = "gridColumn6";
+            this.gridColumn6.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn6.OptionsColumn.ReadOnly = true;
+            this.gridColumn6.UnboundDataType = typeof(string);
+            this.gridColumn6.UnboundExpression = "Gride1Count";
+            this.gridColumn6.Visible = true;
+            this.gridColumn6.Width = 65;
+            // 
+            // gridBand9
+            // 
+            this.gridBand9.Caption = "2";
+            this.gridBand9.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand17});
+            this.gridBand9.Name = "gridBand9";
+            this.gridBand9.VisibleIndex = 2;
+            this.gridBand9.Width = 67;
+            // 
+            // gridBand17
+            // 
+            this.gridBand17.Caption = "0.2";
+            this.gridBand17.Columns.Add(this.gridColumn7);
+            this.gridBand17.Name = "gridBand17";
+            this.gridBand17.VisibleIndex = 0;
+            this.gridBand17.Width = 67;
+            // 
+            // gridColumn7
+            // 
+            this.gridColumn7.Caption = "gridColumn7";
+            this.gridColumn7.FieldName = "gridColumn7";
+            this.gridColumn7.Name = "gridColumn7";
+            this.gridColumn7.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn7.OptionsColumn.ReadOnly = true;
+            this.gridColumn7.UnboundDataType = typeof(string);
+            this.gridColumn7.UnboundExpression = "Gride2Count";
+            this.gridColumn7.Visible = true;
+            this.gridColumn7.Width = 67;
+            // 
+            // gridBand10
+            // 
+            this.gridBand10.Caption = "3";
+            this.gridBand10.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand18});
+            this.gridBand10.Name = "gridBand10";
+            this.gridBand10.VisibleIndex = 3;
+            this.gridBand10.Width = 63;
+            // 
+            // gridBand18
+            // 
+            this.gridBand18.Caption = "0.5";
+            this.gridBand18.Columns.Add(this.gridColumn2);
+            this.gridBand18.Name = "gridBand18";
+            this.gridBand18.VisibleIndex = 0;
+            this.gridBand18.Width = 63;
+            // 
+            // gridColumn2
+            // 
+            this.gridColumn2.Caption = "gridColumn2";
+            this.gridColumn2.FieldName = "gridColumn2";
+            this.gridColumn2.Name = "gridColumn2";
+            this.gridColumn2.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn2.OptionsColumn.ReadOnly = true;
+            this.gridColumn2.UnboundDataType = typeof(string);
+            this.gridColumn2.UnboundExpression = "Gride3Count";
+            this.gridColumn2.Visible = true;
+            this.gridColumn2.Width = 63;
+            // 
+            // gridBand11
+            // 
+            this.gridBand11.Caption = "4";
+            this.gridBand11.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand19});
+            this.gridBand11.Name = "gridBand11";
+            this.gridBand11.VisibleIndex = 4;
+            this.gridBand11.Width = 64;
+            // 
+            // gridBand19
+            // 
+            this.gridBand19.Caption = "1";
+            this.gridBand19.Columns.Add(this.gridColumn9);
+            this.gridBand19.Name = "gridBand19";
+            this.gridBand19.VisibleIndex = 0;
+            this.gridBand19.Width = 64;
+            // 
+            // gridColumn9
+            // 
+            this.gridColumn9.Caption = "gridColumn9";
+            this.gridColumn9.FieldName = "gridColumn9";
+            this.gridColumn9.Name = "gridColumn9";
+            this.gridColumn9.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn9.OptionsColumn.ReadOnly = true;
+            this.gridColumn9.UnboundDataType = typeof(string);
+            this.gridColumn9.UnboundExpression = "Gride4Count";
+            this.gridColumn9.Visible = true;
+            this.gridColumn9.Width = 64;
+            // 
+            // gridBand12
+            // 
+            this.gridBand12.Caption = "5";
+            this.gridBand12.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand20});
+            this.gridBand12.Name = "gridBand12";
+            this.gridBand12.VisibleIndex = 5;
+            this.gridBand12.Width = 59;
+            // 
+            // gridBand20
+            // 
+            this.gridBand20.Caption = "2";
+            this.gridBand20.Columns.Add(this.gridColumn10);
+            this.gridBand20.Name = "gridBand20";
+            this.gridBand20.VisibleIndex = 0;
+            this.gridBand20.Width = 59;
+            // 
+            // gridColumn10
+            // 
+            this.gridColumn10.Caption = "gridColumn10";
+            this.gridColumn10.FieldName = "gridColumn10";
+            this.gridColumn10.Name = "gridColumn10";
+            this.gridColumn10.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn10.OptionsColumn.ReadOnly = true;
+            this.gridColumn10.UnboundDataType = typeof(string);
+            this.gridColumn10.UnboundExpression = "Gride5Count";
+            this.gridColumn10.Visible = true;
+            this.gridColumn10.Width = 59;
+            // 
+            // gridBand13
+            // 
+            this.gridBand13.Caption = "6";
+            this.gridBand13.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand21});
+            this.gridBand13.Name = "gridBand13";
+            this.gridBand13.VisibleIndex = 6;
+            this.gridBand13.Width = 59;
+            // 
+            // gridBand21
+            // 
+            this.gridBand21.Caption = "5";
+            this.gridBand21.Columns.Add(this.gridColumn11);
+            this.gridBand21.Name = "gridBand21";
+            this.gridBand21.VisibleIndex = 0;
+            this.gridBand21.Width = 59;
+            // 
+            // gridColumn11
+            // 
+            this.gridColumn11.Caption = "gridColumn11";
+            this.gridColumn11.FieldName = "gridColumn11";
+            this.gridColumn11.Name = "gridColumn11";
+            this.gridColumn11.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn11.OptionsColumn.ReadOnly = true;
+            this.gridColumn11.UnboundDataType = typeof(string);
+            this.gridColumn11.UnboundExpression = "Gride6Count";
+            this.gridColumn11.Visible = true;
+            this.gridColumn11.Width = 59;
+            // 
+            // gridBand14
+            // 
+            this.gridBand14.Caption = "7";
+            this.gridBand14.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand22});
+            this.gridBand14.Name = "gridBand14";
+            this.gridBand14.VisibleIndex = 7;
+            this.gridBand14.Width = 59;
+            // 
+            // gridBand22
+            // 
+            this.gridBand22.Caption = "10";
+            this.gridBand22.Columns.Add(this.gridColumn12);
+            this.gridBand22.Name = "gridBand22";
+            this.gridBand22.VisibleIndex = 0;
+            this.gridBand22.Width = 59;
+            // 
+            // gridColumn12
+            // 
+            this.gridColumn12.Caption = "gridColumn12";
+            this.gridColumn12.FieldName = "gridColumn12";
+            this.gridColumn12.Name = "gridColumn12";
+            this.gridColumn12.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn12.OptionsColumn.ReadOnly = true;
+            this.gridColumn12.UnboundDataType = typeof(string);
+            this.gridColumn12.UnboundExpression = "Gride7Count";
+            this.gridColumn12.Visible = true;
+            this.gridColumn12.Width = 59;
+            // 
+            // gridBand15
+            // 
+            this.gridBand15.Caption = "8";
+            this.gridBand15.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand23});
+            this.gridBand15.Name = "gridBand15";
+            this.gridBand15.VisibleIndex = 8;
+            this.gridBand15.Width = 59;
+            // 
+            // gridBand23
+            // 
+            this.gridBand23.Caption = "20";
+            this.gridBand23.Columns.Add(this.gridColumn13);
+            this.gridBand23.Name = "gridBand23";
+            this.gridBand23.VisibleIndex = 0;
+            this.gridBand23.Width = 59;
+            // 
+            // gridColumn13
+            // 
+            this.gridColumn13.Caption = "gridColumn13";
+            this.gridColumn13.FieldName = "gridColumn13";
+            this.gridColumn13.Name = "gridColumn13";
+            this.gridColumn13.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn13.OptionsColumn.ReadOnly = true;
+            this.gridColumn13.UnboundDataType = typeof(string);
+            this.gridColumn13.UnboundExpression = "Gride8Count";
+            this.gridColumn13.Visible = true;
+            this.gridColumn13.Width = 59;
+            // 
+            // gridBand24
+            // 
+            this.gridBand24.Caption = "9";
+            this.gridBand24.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand25});
+            this.gridBand24.Name = "gridBand24";
+            this.gridBand24.VisibleIndex = 9;
+            this.gridBand24.Width = 80;
+            // 
+            // gridBand25
+            // 
+            this.gridBand25.Caption = "50";
+            this.gridBand25.Columns.Add(this.gridColumn14);
+            this.gridBand25.Name = "gridBand25";
+            this.gridBand25.VisibleIndex = 0;
+            this.gridBand25.Width = 80;
+            // 
+            // gridColumn14
+            // 
+            this.gridColumn14.Caption = "gridColumn14";
+            this.gridColumn14.FieldName = "gridColumn14";
+            this.gridColumn14.Name = "gridColumn14";
+            this.gridColumn14.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
+            this.gridColumn14.OptionsColumn.ReadOnly = true;
+            this.gridColumn14.UnboundDataType = typeof(string);
+            this.gridColumn14.UnboundExpression = "Gride9Count";
+            this.gridColumn14.Visible = true;
+            this.gridColumn14.Width = 80;
+            // 
+            // gridBand26
+            // 
+            this.gridBand26.Caption = "硫化物类夹杂物和氧化物类夹杂物第一次求和";
+            this.gridBand26.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
+            this.gridBand30,
+            this.gridBand31});
+            this.gridBand26.Name = "gridBand26";
+            this.gridBand26.RowCount = 2;
+            this.gridBand26.ToolTip = "硫化物类夹杂物和氧化物类夹杂物第一次求和";
+            this.gridBand26.VisibleIndex = 4;
+            this.gridBand26.Width = 280;
+            // 
+            // gridBand30
+            // 
+            this.gridBand30.Caption = "S";
+            this.gridBand30.Columns.Add(this.gridColumn15);
+            this.gridBand30.Name = "gridBand30";
+            this.gridBand30.VisibleIndex = 0;
+            this.gridBand30.Width = 131;
+            // 
+            // gridColumn15
+            // 
+            this.gridColumn15.Caption = "gridColumn15";
+            this.gridColumn15.FieldName = "gridColumn15";
+            this.gridColumn15.Name = "gridColumn15";
+            this.gridColumn15.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
+            this.gridColumn15.OptionsColumn.ReadOnly = true;
+            this.gridColumn15.UnboundDataType = typeof(string);
+            this.gridColumn15.UnboundExpression = "TotalS";
+            this.gridColumn15.Visible = true;
+            this.gridColumn15.Width = 131;
+            // 
+            // gridBand31
+            // 
+            this.gridBand31.Caption = "O";
+            this.gridBand31.Columns.Add(this.gridColumn16);
+            this.gridBand31.Name = "gridBand31";
+            this.gridBand31.VisibleIndex = 1;
+            this.gridBand31.Width = 149;
+            // 
+            // gridColumn16
+            // 
+            this.gridColumn16.Caption = "gridColumn16";
+            this.gridColumn16.FieldName = "gridColumn16";
+            this.gridColumn16.Name = "gridColumn16";
+            this.gridColumn16.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
+            this.gridColumn16.OptionsColumn.ReadOnly = true;
+            this.gridColumn16.UnboundDataType = typeof(string);
+            this.gridColumn16.UnboundExpression = "TotalO";
+            this.gridColumn16.Visible = true;
+            this.gridColumn16.Width = 149;
+            // 
+            // treeListBand1
+            // 
+            this.treeListBand1.Caption = "treeListBand1";
+            this.treeListBand1.Name = "treeListBand1";
+            this.treeListBand1.Width = 99;
+            // 
+            // treeListBand2
+            // 
+            this.treeListBand2.Bands.AddRange(new DevExpress.XtraTreeList.Columns.TreeListBand[] {
+            this.treeListBand6});
+            this.treeListBand2.Caption = "treeListBand2";
+            this.treeListBand2.Name = "treeListBand2";
+            this.treeListBand2.Width = 91;
+            // 
+            // treeListBand6
+            // 
+            this.treeListBand6.Caption = "treeListBand6";
+            this.treeListBand6.Name = "treeListBand6";
+            // 
+            // treeListBand3
+            // 
+            this.treeListBand3.Caption = "treeListBand3";
+            this.treeListBand3.Name = "treeListBand3";
+            // 
+            // treeListBand4
+            // 
+            this.treeListBand4.Caption = "treeListBand4";
+            this.treeListBand4.Name = "treeListBand4";
+            // 
+            // treeListBand5
+            // 
+            this.treeListBand5.Caption = "treeListBand5";
+            this.treeListBand5.Name = "treeListBand5";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(3, 7);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(329, 12);
+            this.label1.TabIndex = 5;
+            this.label1.Text = "备注:YB/T6156-2023 规定总检测面积应不小于1000平方毫米";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(1152, 10);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(59, 12);
+            this.label2.TabIndex = 6;
+            this.label2.Text = "起评级别:";
+            // 
+            // comboBox_InitialRatingLevel
+            // 
+            this.comboBox_InitialRatingLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_InitialRatingLevel.FormattingEnabled = true;
+            this.comboBox_InitialRatingLevel.Location = new System.Drawing.Point(1217, 7);
+            this.comboBox_InitialRatingLevel.Name = "comboBox_InitialRatingLevel";
+            this.comboBox_InitialRatingLevel.Size = new System.Drawing.Size(83, 20);
+            this.comboBox_InitialRatingLevel.TabIndex = 7;
+            //this.comboBox_InitialRatingLevel.SelectedIndexChanged += new System.EventHandler(this.comboBox_InitialRatingLevel_SelectedIndexChanged);
+            // 
+            // YB6156ABCD
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.comboBox_InitialRatingLevel);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.gridControl_YB6156);
+            this.Name = "YB6156ABCD";
+            this.Size = new System.Drawing.Size(1303, 832);
+            this.Load += new System.EventHandler(this.YB6156ABCD_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.gridControl_YB6156)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bandedGridView1)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private DevExpress.XtraGrid.GridControl gridControl_YB6156;
+        private DevExpress.XtraTreeList.Columns.TreeListBand treeListBand1;
+        private DevExpress.XtraTreeList.Columns.TreeListBand treeListBand2;
+        private DevExpress.XtraTreeList.Columns.TreeListBand treeListBand6;
+        private DevExpress.XtraTreeList.Columns.TreeListBand treeListBand3;
+        private DevExpress.XtraTreeList.Columns.TreeListBand treeListBand4;
+        private DevExpress.XtraTreeList.Columns.TreeListBand treeListBand5;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridView bandedGridView1;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn1;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn2;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn3;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn4;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn16;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn5;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn6;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn7;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn9;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn8;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn10;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn11;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn12;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn13;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn14;
+        private DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn gridColumn15;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.ComboBox comboBox_InitialRatingLevel;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand27;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand2;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand3;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand1;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand5;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand29;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand28;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand7;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand4;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand6;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand8;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand16;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand9;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand17;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand10;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand18;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand11;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand19;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand12;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand20;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand13;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand21;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand14;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand22;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand15;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand23;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand24;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand25;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand26;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand30;
+        private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand31;
+    }
+}

+ 469 - 0
OTSIncAReportApp/1-UI/GBCalculate/YB6156ABCD.cs

@@ -0,0 +1,469 @@
+using DevExpress.XtraGrid.Views.Base;
+using DevExpress.XtraGrid.Views.Grid;
+using NPOI.XWPF.UserModel;
+using OTSCLRINTERFACE;
+using OTSIncAReportApp.SysMgrTools;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using static DevExpress.Utils.Drawing.Helpers.NativeMethods;
+
+namespace OTSIncAReportGB
+{
+    public partial class YB6156ABCD : UserControl
+    {
+        //设置数据表
+        public DataTable m_dt = new DataTable();
+        //底层相关,项目操作管理类
+        CReportMgrClr m_ReportMgrClr = null;
+        //获取从框架得到的底层计算结果,国标表A
+        List<CGridDataClr> in_list_cgriddataclr = null;
+        //接收底层数据
+        public List<CGridDataClr> DataAll;
+        Language lan;
+        Hashtable table;
+        DataTable dt_yb6156 = new DataTable();
+        Dictionary<int,double> Level_Coefficient=new Dictionary<int,double>();
+        Dictionary<string, InclusionGradeInfo> SamplesInclusionGradeInfo;
+        public struct InclusionGradeInfo
+        {
+            public int[] GradeACount;
+            public int[] GradeBCount;
+            public int[] GradeCCount;
+            public int[] GradeDCount;
+
+            public double S;
+            public double O;
+            public double Area;
+        }
+        public Dictionary<int,List<InclusionGradeInfo>> InclusionGradeInfos=new Dictionary<int, List<InclusionGradeInfo>>();
+
+
+        public YB6156ABCD(CReportMgrClr in_Cotsreportprojfilemgrclr, List<CGridDataClr> in_list_CGridDataClrAll)
+        {
+            DataAll = in_list_CGridDataClrAll;
+            m_ReportMgrClr = in_Cotsreportprojfilemgrclr;
+            in_list_cgriddataclr = in_list_CGridDataClrAll.GetRange(0, in_list_CGridDataClrAll.Count);
+            InitializeComponent();
+            #region 国际化语言
+            lan = new Language(this);
+            table = lan.GetNameTable(this.Name);
+            #endregion
+        }
+        private void YB6156ABCD_Load(object sender, EventArgs e)
+        {
+            Level_Coefficient.Clear();
+            Level_Coefficient.Add(0,0.05);
+            Level_Coefficient.Add(1, 0.1);
+            Level_Coefficient.Add(2, 0.2);
+            Level_Coefficient.Add(3, 0.5);
+            Level_Coefficient.Add(4, 1);
+            Level_Coefficient.Add(5, 2);
+            Level_Coefficient.Add(6, 5);
+            Level_Coefficient.Add(7, 10);
+            Level_Coefficient.Add(8, 20);
+            Level_Coefficient.Add(9, 50);
+            comboBox_InitialRatingLevel.Items.Clear();
+            comboBox_InitialRatingLevel.Items.Add("0");
+            comboBox_InitialRatingLevel.Items.Add("1");
+            comboBox_InitialRatingLevel.Items.Add("2");
+            comboBox_InitialRatingLevel.Items.Add("3");
+            comboBox_InitialRatingLevel.Items.Add("4");
+            comboBox_InitialRatingLevel.Items.Add("5");
+            comboBox_InitialRatingLevel.Items.Add("6");
+            comboBox_InitialRatingLevel.Items.Add("7");
+            comboBox_InitialRatingLevel.Items.Add("8");
+            comboBox_InitialRatingLevel.Items.Add("9");
+            comboBox_InitialRatingLevel.SelectedIndex = 0;
+            this.comboBox_InitialRatingLevel.SelectedIndexChanged += new System.EventHandler(this.comboBox_InitialRatingLevel_SelectedIndexChanged);
+
+
+
+            List<DataTable> dts = GetDataTable(in_list_cgriddataclr);
+            SamplesInclusionGradeInfo=new Dictionary<string, InclusionGradeInfo>();
+            int t = 1;
+            foreach (DataTable dt in dts)
+            {
+                InclusionGradeInfo inclusionGradeInfo = CalInclusionGradeInfo(dt);
+                SamplesInclusionGradeInfo.Add(t.ToString(),inclusionGradeInfo);
+                t++;
+            }
+            dt_yb6156 = CreateTheDatatable(SamplesInclusionGradeInfo);
+            FillTheDataToTheTable(dt_yb6156);
+        }
+
+
+
+        List<DataTable> GetDataTable(List<CGridDataClr> in_list_cgriddataclr) 
+        {
+            List<DataTable> dataTables = new List<DataTable>();
+            //判断传入的数据对象是否为空
+            if (in_list_cgriddataclr == null)
+            {
+                string str1 = "传入分解表格数据的CGridDataClr对象为空!";
+                str1 = table["str1"].ToString();
+                //log.Error("(OTSIncAReportGridsFun.ChineseStandardABCD_GetDataTable_Total)" + str1);
+            }
+            #region 根据返回的结构创建DataTable的结构---------------------------------------------
+            for (int i = 0; i < in_list_cgriddataclr.Count(); i++)
+            {
+                DataTable ret_dt = new DataTable(in_list_cgriddataclr[i].GetDataSourceList()[Convert.ToInt32(in_list_cgriddataclr[i].GetDataSourceId())].ToString());
+                List<CGridColumnClr> list_cgridcolumnclrs = new List<CGridColumnClr>();
+                list_cgridcolumnclrs = in_list_cgriddataclr[i].GetGridColumnList();    //获取各列
+
+                foreach (CGridColumnClr ls_cgridcolumnclr in list_cgridcolumnclrs)
+                {
+                    string ls_fl_strName = ls_cgridcolumnclr.GetName();
+                    ret_dt.Columns.Add(ls_fl_strName);
+                }
+
+                //取最大的rowlistcount,要不然,不知道这底层返回的数据居然还有2,2,3这样的行数据
+                int maxrownumber = 0;
+                //创建DT的行
+                if (list_cgridcolumnclrs != null)
+                {
+                    foreach (CGridColumnClr ls_cgridcolumnclr in list_cgridcolumnclrs)
+                    {
+                        if (maxrownumber < ls_cgridcolumnclr.GetRowList().Count())
+                        {
+                            maxrownumber = ls_cgridcolumnclr.GetRowList().Count();
+                        }
+                    }
+                }
+                for (int k = 0; k < maxrownumber; k++)
+                {
+                    DataRow dr = ret_dt.NewRow();
+                    ret_dt.Rows.Add(dr);
+                }
+                for (int k = 0; k < list_cgridcolumnclrs.Count(); k++)
+                {
+                    string ls_fl_strName = list_cgridcolumnclrs[k].GetName();
+                    List<CGridRowClr> ls_list_cgridrowclr = new List<CGridRowClr>();
+                    ls_list_cgridrowclr = list_cgridcolumnclrs[k].GetRowList();
+
+                    for (int j = 0; j < ls_list_cgridrowclr.Count(); j++)
+                    {
+                        //先判断该行该单元格的数据类型
+                        string str_value = "";//因为显示只需要对字符串进行操作就可以了,所以将底层获取到的数据,除了颗粒类型外的都转成string
+
+                        switch (ls_list_cgridrowclr[j].GetDataType())
+                        {
+                            case 0:
+                                //string
+                                str_value = ls_list_cgridrowclr[j].GetStringValue();
+                                ret_dt.Rows[j][k] = str_value;
+                                break;
+                            case 1:
+                                //该元素含量表没有需要显示的颗粒图像
+                                //ret_dt.Rows[j][k+i*oneresult_columncount] = GetBitmapByParticleList(ls_list_cgridrowclr[k].GetParticle());
+                                break;
+                            case 2:
+                                //int
+                                str_value = ls_list_cgridrowclr[j].GetIntValue().ToString();
+                                ret_dt.Rows[j][k] = str_value;
+                                break;
+                            case 3:
+                                //float
+                                str_value = ls_list_cgridrowclr[j].GetDoubleValue().ToString("0.00");
+                                ret_dt.Rows[j][k] = str_value;
+                                break;
+                            default:
+                                str_value = "";
+                                ret_dt.Rows[j][k] = str_value;
+                                break;
+                        }
+                    }
+                }
+                dataTables.Add(ret_dt);
+            }
+            #endregion
+
+
+            return dataTables;
+        }
+
+
+
+
+        void FillTheDataToTheTable(DataTable dataTable)
+        {
+
+
+            gridControl_YB6156.DataSource = dataTable;
+            //gridControl_YB6156.
+        }
+        DataTable CreateTheDatatable(Dictionary<string, InclusionGradeInfo> SamplesInclusionGradeInfo)
+        {
+            DataTable dt = new DataTable("yb6156");
+            DataColumn SampleId = new DataColumn("SampleId", Type.GetType("System.String"));
+            DataColumn Area = new DataColumn("Area", Type.GetType("System.String"));
+            DataColumn InclusionType = new DataColumn("InclusionType", Type.GetType("System.String"));
+            DataColumn TypeLevel = new DataColumn("TypeLevel", Type.GetType("System.String"));
+            DataColumn Gride0Count = new DataColumn("Gride0Count", Type.GetType("System.String"));
+            DataColumn Gride1Count = new DataColumn("Gride1Count", Type.GetType("System.String"));
+            DataColumn Gride2Count = new DataColumn("Gride2Count", Type.GetType("System.String"));
+            DataColumn Gride3Count = new DataColumn("Gride3Count", Type.GetType("System.String"));
+            DataColumn Gride4Count = new DataColumn("Gride4Count", Type.GetType("System.String"));
+            DataColumn Gride5Count = new DataColumn("Gride5Count", Type.GetType("System.String"));
+            DataColumn Gride6Count = new DataColumn("Gride6Count", Type.GetType("System.String"));
+            DataColumn Gride7Count = new DataColumn("Gride7Count", Type.GetType("System.String"));
+            DataColumn Gride8Count = new DataColumn("Gride8Count", Type.GetType("System.String"));
+            DataColumn Gride9Count = new DataColumn("Gride9Count", Type.GetType("System.String"));
+            DataColumn TotalS = new DataColumn("TotalS", Type.GetType("System.String"));
+            DataColumn TotalO = new DataColumn("TotalO", Type.GetType("System.String"));
+
+            dt.Columns.Add(SampleId);
+            dt.Columns.Add(Area);
+            dt.Columns.Add(InclusionType);
+            dt.Columns.Add(TypeLevel);
+            dt.Columns.Add(Gride0Count);
+            dt.Columns.Add(Gride1Count);
+            dt.Columns.Add(Gride2Count);
+            dt.Columns.Add(Gride3Count);
+            dt.Columns.Add(Gride4Count);
+            dt.Columns.Add(Gride5Count);
+            dt.Columns.Add(Gride6Count);
+            dt.Columns.Add(Gride7Count);
+            dt.Columns.Add(Gride8Count);
+            dt.Columns.Add(Gride9Count);
+            dt.Columns.Add(TotalS);
+            dt.Columns.Add(TotalO);
+            double TotalArea = 0;
+            double TotalS2 = 0;
+            double TotalO2 = 0;
+            foreach (KeyValuePair<string, InclusionGradeInfo> InclusionGradeInfo in SamplesInclusionGradeInfo)
+            {
+                TotalArea += Convert.ToDouble(InclusionGradeInfo.Value.Area);
+                double ToO = 0;
+                for (int i = Convert.ToInt32(comboBox_InitialRatingLevel.SelectedItem); i < 10; i++)
+                {
+                    int GradeCount = Convert.ToInt32(InclusionGradeInfo.Value.GradeBCount[i]);
+                    ToO += GradeCount * Level_Coefficient[i];
+                    GradeCount = Convert.ToInt32(InclusionGradeInfo.Value.GradeCCount[i]);
+                    ToO += GradeCount * Level_Coefficient[i];
+                    GradeCount = Convert.ToInt32(InclusionGradeInfo.Value.GradeDCount[i]);
+                    ToO += GradeCount * Level_Coefficient[i];
+                }
+                TotalO2 += ToO;
+                for (int k=0;k<4;k++)
+                {
+                    DataRow dr = dt.NewRow();
+                    dr["SampleId"] = InclusionGradeInfo.Key;
+                    dr["Area"] = InclusionGradeInfo.Value.Area;
+                    switch (k)
+                    {
+                        case 0:
+                            double toS = 0;
+                            dr["InclusionType"] = "硫化物";
+                            dr["TypeLevel"] = "A";
+                            for (int i = 0; i < 10; i++)
+                            {
+                                if (i < Convert.ToInt32(comboBox_InitialRatingLevel.SelectedItem))
+                                {
+                                    dr["Gride" + i + "Count"] = "-";
+                                }
+                                else
+                                {
+                                    dr["Gride" + i + "Count"] = InclusionGradeInfo.Value.GradeACount[i];
+                                    int GradeCount = Convert.ToInt32(InclusionGradeInfo.Value.GradeACount[i]);
+                                    toS += GradeCount * Level_Coefficient[i];
+                                }
+                            }
+                            dr["TotalS"] = toS;
+                            dr["TotalO"] = "-";
+                            TotalS2 += toS;
+                            dt.Rows.Add(dr);
+                            break;
+                        case 1:
+                            dr["InclusionType"] = "氧化物";
+                            dr["TypeLevel"] = "B";
+                            for (int i = 0; i < 10; i++)
+                            {
+                                if (i < Convert.ToInt32(comboBox_InitialRatingLevel.SelectedItem))
+                                {
+                                    dr["Gride" + i + "Count"] = "-";
+                                }
+                                else
+                                {
+                                    dr["Gride" + i + "Count"] = InclusionGradeInfo.Value.GradeBCount[i];
+                                }
+                            }
+                            dr["TotalS"] = "-";
+                            dr["TotalO"] = ToO;
+                            dt.Rows.Add(dr);
+                            break;
+                        case 2:
+                            dr["InclusionType"] = "氧化物";
+                            dr["TypeLevel"] = "C";
+                            for (int i = 0; i < 10; i++)
+                            {
+                                if (i < Convert.ToInt32(comboBox_InitialRatingLevel.SelectedItem))
+                                {
+                                    dr["Gride" + i + "Count"] = "-";
+                                }
+                                else
+                                {
+                                    dr["Gride" + i + "Count"] = InclusionGradeInfo.Value.GradeCCount[i];
+                                }
+                            }
+                            dr["TotalS"] = "-";
+                            dr["TotalO"] = ToO;
+                            dt.Rows.Add(dr);
+                            break;
+                        case 3:
+                            dr["InclusionType"] = "氧化物";
+                            dr["TypeLevel"] = "D";
+                            for (int i = 0; i < 10; i++)
+                            {
+                                if (i < Convert.ToInt32(comboBox_InitialRatingLevel.SelectedItem))
+                                {
+                                    dr["Gride" + i + "Count"] = "-";
+                                }
+                                else
+                                {
+                                    dr["Gride" + i + "Count"] = InclusionGradeInfo.Value.GradeDCount[i];
+                                }
+                            }
+                            dr["TotalS"] = "-";
+                            dr["TotalO"] = ToO;
+                            dt.Rows.Add(dr);
+                            break;
+                        default:
+                            break;
+                    }
+                }
+            }
+            DataRow dr1 = dt.NewRow();
+            dr1["SampleId"] = "Total";
+            dr1["Area"] = "TotalArea:"+ TotalArea.ToString();
+            dr1["Gride9Count"] = "第二次求和值t";
+            dr1["TotalS"] = TotalS2;
+            dr1["TotalO"] = TotalO2;
+            dt.Rows.Add(dr1);
+
+            DataRow dr2 = dt.NewRow();
+            dr2["SampleId"] = "Total";
+            dr2["Area"] = "TotalArea:" + TotalArea.ToString();
+            dr2["Gride9Count"] = "特征值K4";
+            dr2["TotalS"] = (TotalS2 *1000/ TotalArea).ToString("F2");
+            dr2["TotalO"] = (TotalO2 * 1000 / TotalArea).ToString("F2");
+            dt.Rows.Add(dr2);
+
+            DataRow dr3 = dt.NewRow();
+            dr3["SampleId"] = "Total";
+            dr3["Area"] = "TotalArea:" + TotalArea;
+
+            dr3["Gride9Count"] = "总特征值";
+            dr3["TotalO"] = (TotalS2 * 1000 / TotalArea + TotalO2 * 1000 / TotalArea).ToString("F2");
+            dt.Rows.Add(dr3);
+
+            return dt;
+        }
+        InclusionGradeInfo CalInclusionGradeInfo(DataTable dt)
+        {
+            InclusionGradeInfo inclusionGradeInfo= new InclusionGradeInfo();
+            inclusionGradeInfo.GradeACount = new int[10] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+            inclusionGradeInfo.GradeBCount = new int[10] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+            inclusionGradeInfo.GradeCCount = new int[10] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+            inclusionGradeInfo.GradeDCount = new int[10] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+            foreach (DataRow dr in dt.Rows) {
+                int ret = CalInclusionGradeByArea(Convert.ToDouble(dr[0]));
+                if (ret != -1)
+                {
+                    inclusionGradeInfo.GradeACount[ret] += 1;
+                }
+                ret = CalInclusionGradeByArea(Convert.ToDouble(dr[1]));
+                if (ret != -1)
+                {
+                    inclusionGradeInfo.GradeBCount[ret] += 1;
+                }
+                ret = CalInclusionGradeByArea(Convert.ToDouble(dr[2]));
+                if (ret != -1)
+                {
+                    inclusionGradeInfo.GradeCCount[ret] += 1;
+                }
+                ret = CalInclusionGradeByArea(Convert.ToDouble(dr[3]));
+                if (ret != -1)
+                {
+                    inclusionGradeInfo.GradeDCount[ret] += 1;
+                }
+            }
+            inclusionGradeInfo.Area= dt.Rows.Count*0.5;
+            return inclusionGradeInfo;
+        }
+
+        int CalInclusionGradeByArea(double Area)
+        {
+            if (Area < 71)
+            {
+                return -1;
+            }
+            else if (Area < 141)
+            {
+                return 0;
+            }
+            else if (Area < 283)
+            {
+                return 1;
+            }
+            else if (Area < 566)
+            { return 2; }
+            else if (Area < 1131)
+            { return 3; }
+            else if (Area < 2263)
+            { return 4; }
+            else if (Area < 4525)
+            { return 5; }
+            else if (Area < 9051)
+            { return 6; }
+            else if (Area < 18102)
+            { return 7; }
+            else if (Area < 36204)
+            { return 8; }
+            else
+            { return 9; }
+        }
+        private void gridView1_CellMerge(object sender, CellMergeEventArgs e)
+        {
+            GridView gridView1 = sender as GridView;
+            if (e.Column != gridView1.Columns["gridColumn15"] && e.Column != gridView1.Columns["gridColumn16"]) return;
+            DataRow dataRow = gridView1.GetDataRow(e.RowHandle1);
+            if (dataRow["Gride0Count"].ToString() == "")
+            {
+                e.Merge = false;
+                e.Handled = true;
+            }
+             dataRow = gridView1.GetDataRow(e.RowHandle2);
+            if (dataRow["Gride0Count"].ToString() == "")
+            {
+                e.Merge = false;
+                e.Handled = true;
+            }
+        }
+
+
+
+
+
+
+
+
+
+
+
+        private void comboBox_InitialRatingLevel_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            dt_yb6156 = CreateTheDatatable(SamplesInclusionGradeInfo);
+            gridControl_YB6156.DataSource= dt_yb6156;
+            this.Refresh();
+        }
+    }
+}

+ 120 - 0
OTSIncAReportApp/1-UI/GBCalculate/YB6156ABCD.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 2 - 1
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/OTSSampleReportInfo/OTSSampleReportInfo.cs

@@ -63,7 +63,8 @@ namespace OTSIncAReportApp.OTSSampleReportInfo
         GB_Method1 = 5,
         GB_Method2 =6,
         ASTM = 7,
-        DIN = 8
+        DIN = 8,
+        YB6156=9
     }
     public enum CALCULATE_CHART_TYPE
     {

+ 42 - 1
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/frmReportConditionChoose.cs

@@ -10,6 +10,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using System.Windows.Forms;
+using System.Windows.Media;
 using static OTSDataType.otsdataconst;
 
 namespace OTSIncAReportApp
@@ -134,6 +135,7 @@ namespace OTSIncAReportApp
             string chineseStandard2 = resTable["chinesestandard2"].ToString();//国标方法二
             string americanStandard = resTable["americanstandard"].ToString();//美标
             string germanStandard = resTable["germanstandard"].ToString();//德标
+            string yb6156 = resTable["yb6156"].ToString();//行标6156
             string commonClassification = resTable["commonclassification"].ToString();//常用夹杂物分类
             string allParticles = resTable["sscaptionname23"].ToString();//全部颗粒
             string selectParticles = resTable["selectparticles"].ToString();//选择颗粒
@@ -141,6 +143,7 @@ namespace OTSIncAReportApp
             string MergeParticles = resTable["mergeparticles"].ToString(); ;//合成颗粒
             string dataSourceType = resTable["datasourcetype"].ToString();//数据源类型
             string InclusionAreaRatio = resTable["inclusionarearatio"].ToString();//夹杂物面积比
+            string InitialRatingLevel = resTable["initialratinglevel"].ToString();//起评级别
             #endregion
 
             //测量结果数据源
@@ -202,7 +205,7 @@ namespace OTSIncAReportApp
             if (Systype == OTS_SysType_ID.IncA)
             {
                 string[] aa = m_ReportApp.Text.Split('-');
-                List<string> listStd = new List<string>() { chineseStandard1, chineseStandard2, americanStandard, germanStandard };
+                List<string> listStd = new List<string>() { chineseStandard1, chineseStandard2, americanStandard, germanStandard, yb6156 };
                 list2.AddRange(listStd);
             }
                 
@@ -233,6 +236,9 @@ namespace OTSIncAReportApp
             //颗粒列表数据类型
             List<string> list_PARTICE_LIST = new List<string>() { analyticalParticle, otherParticles, MergeParticles, allParticles };
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST, dataSourceType, OTS_ITEM_TYPES.COMBO, false, "data source type", list_PARTICE_LIST[0], list_PARTICE_LIST, 0);
+
+            //List<string> list_InitialRatingLevel = new List<string>() { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", };
+            //AddGridData(OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST, dataSourceType, OTS_ITEM_TYPES.COMBO, false, "InitialRatingLevel", list_InitialRatingLevel[0], list_InitialRatingLevel, 0);
         }
         #region 属性Grid相关方法
         public void ShowsTheDefaultPic()
@@ -942,6 +948,41 @@ namespace OTSIncAReportApp
                             m_ReportApp.im_DINStandardABCDDS = new DINStandardABCDDS(m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr4);
                             m_ReportApp.im_DINStandardABCDDS.Dock = DockStyle.Fill;
                             m_ReportApp.m_TablesWindow.Controls.Add(m_ReportApp.im_DINStandardABCDDS);
+                            Cursor.Current = Cursors.Default;
+                              m_ReportApp.m_TablesWindow.Activate();
+                            break;
+                        case CALCULATE_TABLE_TYPE.YB6156:
+                            var eve = m_ReportApp.m_conditionChoose.m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE].itemDisplayVal.ToString();
+                            //if (!eve.Contains("+"))
+                            //{
+                            //    MessageBox.Show("This standard requires at least 6 measurements!");
+                            //    return;
+                            //}
+                            //德标
+                            Cursor.Current = Cursors.WaitCursor;
+                            int index5 = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+
+                            for (int i = 0; i < m_ReportApp.m_rstDataMgr.ResultFilesList.Count; i++)
+                            {
+                                string anothername = m_ReportApp.m_rstDataMgr.ResultFilesList[i].anotherFileName.ToString();
+                                string resultfile5 = m_ReportApp.m_rstDataMgr.ResultFilesList[i].FilePath.ToString() + "\\" + m_ReportApp.m_rstDataMgr.ResultFilesList[i].FileName_real.ToString();
+                                m_ReportApp.m_rstDataMgr.m_ReportMgr.AddASmplMsrResultMgr(resultfile5, anothername);
+                            }
+
+                            OTSCLRINTERFACE.CPropParamClr clr_prop5 = m_ReportApp.m_rstDataMgr.m_ReportMgr.GetPropertyParamTable();
+                            List<string> datasourcelist5 = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+
+                            clr_prop5.SetDataSourceList(datasourcelist5);
+                            clr_prop5.SetDataSourceId(index5);//
+
+                            clr_prop5.SetType((int)DisplayPicutureType.AnalyzeDataTable);//table
+                            clr_prop5.SetCalTableType((int)CALCULATE_TABLE_TYPE.YB6156);
+                            List<OTSCLRINTERFACE.CGridDataClr> listGriddataclr5 = m_ReportApp.m_rstDataMgr.m_ReportMgr.GridDataTransfer(clr_prop5);
+
+                            m_ReportApp.m_TablesWindow.Controls.Clear();
+                            m_ReportApp.im_YB6156ABCD = new YB6156ABCD(m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr5);
+                            m_ReportApp.im_YB6156ABCD.Dock = DockStyle.Fill;
+                            m_ReportApp.m_TablesWindow.Controls.Add(m_ReportApp.im_YB6156ABCD);
                             Cursor.Current = Cursors.Default;
                             m_ReportApp.m_TablesWindow.Activate();
                             break;

+ 4 - 0
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -166,6 +166,10 @@ namespace OTSIncAReportApp
         /// 德标
         /// </summary>
         public OTSIncAReportGB.DINStandardABCDDS im_DINStandardABCDDS = null;
+        /// <summary>
+        /// yb/t 6156-2023
+        /// </summary>
+        public OTSIncAReportGB.YB6156ABCD im_YB6156ABCD = null;
         public List<Particle> GetSelectedParticles()
         {
             List<Particle> Particles = new List<Particle>();

+ 9 - 0
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -588,6 +588,12 @@
     <Compile Include="1-UI\frmReMeasure.Designer.cs">
       <DependentUpon>frmReMeasure.cs</DependentUpon>
     </Compile>
+    <Compile Include="1-UI\GBCalculate\YB6156ABCD.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="1-UI\GBCalculate\YB6156ABCD.Designer.cs">
+      <DependentUpon>YB6156ABCD.cs</DependentUpon>
+    </Compile>
     <Compile Include="1-UI\OTSReportExport\ClassificationOrderAdjuster.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -987,6 +993,9 @@
     <EmbeddedResource Include="1-UI\frmReMeasure.resx">
       <DependentUpon>frmReMeasure.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="1-UI\GBCalculate\YB6156ABCD.resx">
+      <DependentUpon>YB6156ABCD.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="1-UI\OTSReportExport\ClassificationOrderAdjuster.resx">
       <DependentUpon>ClassificationOrderAdjuster.cs</DependentUpon>
     </EmbeddedResource>

+ 3 - 1
OTSIncAReportApp/Properties/licenses.licx

@@ -1,2 +1,4 @@
-DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v24.1.UI, Version=24.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v24.1, Version=24.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v24.1, Version=24.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v24.1, Version=24.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v24.1.UI, Version=24.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a