Browse Source

报告新增国标优化建议功能

zhangjiaxin 10 months ago
parent
commit
bbef3c409a

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

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

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

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData systype="TCCleannessA">
+<XMLData systype="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" />

+ 89 - 1
OTSIncAReportApp/1-UI/GBCalculate/ASTMStandardABCDDS.cs

@@ -253,6 +253,10 @@ namespace OTSIncAReportGB
         /// <param name="in_list_CGridDataClrAll"></param>   //all  代表A、B、C、D、DS按顺序得表
         public string ColumnName;
         public string RowName;
+        /// <summary>
+        /// 洁净度提示
+        /// </summary>
+        private string IsCleanliness = "";
         #region 国际化语言
         Language lan;
         Hashtable table;
@@ -278,6 +282,12 @@ namespace OTSIncAReportGB
             lan = new Language(this);
             table = lan.GetNameTable(this.Name);
             #endregion
+
+            log_1.Text = "";
+            log_2.Text = "";
+            log_3.Text = "";
+            log_4.Text = "";
+            log_5.Text = "";
         }
 
         private void ASTMStandardABCDDS_Load(object sender, EventArgs e)
@@ -391,12 +401,90 @@ namespace OTSIncAReportGB
                 Gview_gzC.Width = panel1.Width;
                 Gview_gzD.Width = panel1.Width;
                 Gview_gzDS.Width = panel1.Width;
-
+                int it = 0;
+                it = DetermineWhetherImprovementIsNeeded("A类", m_dt_A,  it);
+                it = DetermineWhetherImprovementIsNeeded("B类", m_dt_B,  it);
+                it = DetermineWhetherImprovementIsNeeded("C类", m_dt_C,  it);
+                it = DetermineWhetherImprovementIsNeeded("D类", m_dt_D,  it);
+
+                bool bl = false;
+                if (log_1.Text!=""|| log_2.Text != "" || log_3.Text != "" || log_4.Text != "" )
+                {
+                    bl = true;
+                }
+                if(bl)
+                {
+                    if (it == 0)
+                    {
+                        log_1.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 1)
+                    {
+                        log_2.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 2)
+                    {
+                        log_3.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 3)
+                    {
+                        log_4.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 4)
+                    {
+                        log_5.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                }
             }
 
             Invalidate();
 
         }
+        private int  DetermineWhetherImprovementIsNeeded(string str, DataTable data, int it)
+        {
+            
+            string Thin = ""; string  Thick = ""; string  OverSize = "";
+            for (int i=6;i< data.Columns.Count;i++)
+            {
+                if (Convert.ToInt32(data.Rows[0][i])>0)
+                {
+                    Thin = "细系";
+                }
+                if (Convert.ToInt32(data.Rows[1][i]) > 0)
+                {
+                    Thick = "粗系";
+                }
+                if (Convert.ToInt32(data.Rows[2][i]) > 0)
+                {
+                    OverSize = "超尺寸";
+                }
+            }
+            string str_result = "";
+            if (Thin != "" || Thick != "" || OverSize != "")
+            {
+                str_result = str + "的" + Thin + Thick + OverSize + "指标超过国标2.0,则存在优化的空间。"/*如需了解更多详情,请咨询我司专业的售后专家服务系统。"*/;
+
+                if (it == 0)
+                {
+                    log_1.Text = str_result;
+                }else if(it == 1)
+                {
+                    log_2.Text = str_result;
+                }
+                else if (it == 2)
+                {
+                    log_3.Text = str_result;
+                }
+                else if (it == 3)
+                {
+                    log_4.Text = str_result;
+                }
+
+                it++;
+               
+            }
+            return it;
+        }
 
         #endregion
 

+ 122 - 51
OTSIncAReportApp/1-UI/GBCalculate/ASTMStandardABCDDS.designer.cs

@@ -66,6 +66,11 @@
             this.label5 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.pictureBox5 = new System.Windows.Forms.PictureBox();
+            this.log_1 = new System.Windows.Forms.Label();
+            this.log_2 = new System.Windows.Forms.Label();
+            this.log_3 = new System.Windows.Forms.Label();
+            this.log_4 = new System.Windows.Forms.Label();
+            this.log_5 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).BeginInit();
             this.contextMenuStrip_A.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).BeginInit();
@@ -88,13 +93,14 @@
             this.Gview_gzA.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
             this.Gview_gzA.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Gview_gzA.ContextMenuStrip = this.contextMenuStrip_A;
-            this.Gview_gzA.Location = new System.Drawing.Point(80, 24);
+            this.Gview_gzA.Location = new System.Drawing.Point(53, 16);
+            this.Gview_gzA.Margin = new System.Windows.Forms.Padding(2);
             this.Gview_gzA.Name = "Gview_gzA";
             this.Gview_gzA.ReadOnly = true;
             this.Gview_gzA.RowHeadersVisible = false;
             this.Gview_gzA.RowHeadersWidth = 40;
             this.Gview_gzA.RowTemplate.Height = 30;
-            this.Gview_gzA.Size = new System.Drawing.Size(1311, 206);
+            this.Gview_gzA.Size = new System.Drawing.Size(874, 137);
             this.Gview_gzA.TabIndex = 1;
             // 
             // contextMenuStrip_A
@@ -106,31 +112,31 @@
             this.toolStripSeparator1,
             this.ToolStripMenuItem3});
             this.contextMenuStrip_A.Name = "contextMenuStrip1";
-            this.contextMenuStrip_A.Size = new System.Drawing.Size(207, 94);
+            this.contextMenuStrip_A.Size = new System.Drawing.Size(161, 76);
             // 
             // ToolStripMenuItem1
             // 
             this.ToolStripMenuItem1.Name = "ToolStripMenuItem1";
-            this.ToolStripMenuItem1.Size = new System.Drawing.Size(206, 28);
+            this.ToolStripMenuItem1.Size = new System.Drawing.Size(160, 22);
             this.ToolStripMenuItem1.Text = "复制整个表";
             this.ToolStripMenuItem1.Click += new System.EventHandler(this.ToolStripMenuItem1_Click);
             // 
             // ToolStripMenuItem2
             // 
             this.ToolStripMenuItem2.Name = "ToolStripMenuItem2";
-            this.ToolStripMenuItem2.Size = new System.Drawing.Size(206, 28);
+            this.ToolStripMenuItem2.Size = new System.Drawing.Size(160, 22);
             this.ToolStripMenuItem2.Text = "复制选择区域";
             this.ToolStripMenuItem2.Click += new System.EventHandler(this.ToolStripMenuItem2_Click);
             // 
             // toolStripSeparator1
             // 
             this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(203, 6);
+            this.toolStripSeparator1.Size = new System.Drawing.Size(157, 6);
             // 
             // ToolStripMenuItem3
             // 
             this.ToolStripMenuItem3.Name = "ToolStripMenuItem3";
-            this.ToolStripMenuItem3.Size = new System.Drawing.Size(206, 28);
+            this.ToolStripMenuItem3.Size = new System.Drawing.Size(160, 22);
             this.ToolStripMenuItem3.Text = "恢复至初始状态";
             // 
             // Gview_gzB
@@ -141,13 +147,14 @@
             this.Gview_gzB.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
             this.Gview_gzB.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Gview_gzB.ContextMenuStrip = this.contextMenuStrip_B;
-            this.Gview_gzB.Location = new System.Drawing.Point(80, 260);
+            this.Gview_gzB.Location = new System.Drawing.Point(53, 173);
+            this.Gview_gzB.Margin = new System.Windows.Forms.Padding(2);
             this.Gview_gzB.Name = "Gview_gzB";
             this.Gview_gzB.ReadOnly = true;
             this.Gview_gzB.RowHeadersVisible = false;
             this.Gview_gzB.RowHeadersWidth = 40;
             this.Gview_gzB.RowTemplate.Height = 30;
-            this.Gview_gzB.Size = new System.Drawing.Size(1311, 206);
+            this.Gview_gzB.Size = new System.Drawing.Size(874, 137);
             this.Gview_gzB.TabIndex = 2;
             // 
             // contextMenuStrip_B
@@ -159,31 +166,31 @@
             this.toolStripSeparator2,
             this.toolStripMenuItem6});
             this.contextMenuStrip_B.Name = "contextMenuStrip1";
-            this.contextMenuStrip_B.Size = new System.Drawing.Size(207, 94);
+            this.contextMenuStrip_B.Size = new System.Drawing.Size(161, 76);
             // 
             // toolStripMenuItem4
             // 
             this.toolStripMenuItem4.Name = "toolStripMenuItem4";
-            this.toolStripMenuItem4.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem4.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem4.Text = "复制整个表";
             this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
             // 
             // toolStripMenuItem5
             // 
             this.toolStripMenuItem5.Name = "toolStripMenuItem5";
-            this.toolStripMenuItem5.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem5.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem5.Text = "复制选择区域";
             this.toolStripMenuItem5.Click += new System.EventHandler(this.toolStripMenuItem5_Click);
             // 
             // toolStripSeparator2
             // 
             this.toolStripSeparator2.Name = "toolStripSeparator2";
-            this.toolStripSeparator2.Size = new System.Drawing.Size(203, 6);
+            this.toolStripSeparator2.Size = new System.Drawing.Size(157, 6);
             // 
             // toolStripMenuItem6
             // 
             this.toolStripMenuItem6.Name = "toolStripMenuItem6";
-            this.toolStripMenuItem6.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem6.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem6.Text = "恢复至初始状态";
             // 
             // Gview_gzC
@@ -194,13 +201,14 @@
             this.Gview_gzC.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
             this.Gview_gzC.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Gview_gzC.ContextMenuStrip = this.contextMenuStrip_C;
-            this.Gview_gzC.Location = new System.Drawing.Point(80, 495);
+            this.Gview_gzC.Location = new System.Drawing.Point(53, 330);
+            this.Gview_gzC.Margin = new System.Windows.Forms.Padding(2);
             this.Gview_gzC.Name = "Gview_gzC";
             this.Gview_gzC.ReadOnly = true;
             this.Gview_gzC.RowHeadersVisible = false;
             this.Gview_gzC.RowHeadersWidth = 40;
             this.Gview_gzC.RowTemplate.Height = 30;
-            this.Gview_gzC.Size = new System.Drawing.Size(1311, 206);
+            this.Gview_gzC.Size = new System.Drawing.Size(874, 137);
             this.Gview_gzC.TabIndex = 3;
             // 
             // contextMenuStrip_C
@@ -212,31 +220,31 @@
             this.toolStripSeparator3,
             this.toolStripMenuItem9});
             this.contextMenuStrip_C.Name = "contextMenuStrip1";
-            this.contextMenuStrip_C.Size = new System.Drawing.Size(207, 94);
+            this.contextMenuStrip_C.Size = new System.Drawing.Size(161, 76);
             // 
             // toolStripMenuItem7
             // 
             this.toolStripMenuItem7.Name = "toolStripMenuItem7";
-            this.toolStripMenuItem7.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem7.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem7.Text = "复制整个表";
             this.toolStripMenuItem7.Click += new System.EventHandler(this.toolStripMenuItem7_Click);
             // 
             // toolStripMenuItem8
             // 
             this.toolStripMenuItem8.Name = "toolStripMenuItem8";
-            this.toolStripMenuItem8.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem8.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem8.Text = "复制选择区域";
             this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
             // 
             // toolStripSeparator3
             // 
             this.toolStripSeparator3.Name = "toolStripSeparator3";
-            this.toolStripSeparator3.Size = new System.Drawing.Size(203, 6);
+            this.toolStripSeparator3.Size = new System.Drawing.Size(157, 6);
             // 
             // toolStripMenuItem9
             // 
             this.toolStripMenuItem9.Name = "toolStripMenuItem9";
-            this.toolStripMenuItem9.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem9.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem9.Text = "恢复至初始状态";
             // 
             // Gview_gzD
@@ -247,13 +255,14 @@
             this.Gview_gzD.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
             this.Gview_gzD.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Gview_gzD.ContextMenuStrip = this.contextMenuStrip_D;
-            this.Gview_gzD.Location = new System.Drawing.Point(80, 730);
+            this.Gview_gzD.Location = new System.Drawing.Point(53, 487);
+            this.Gview_gzD.Margin = new System.Windows.Forms.Padding(2);
             this.Gview_gzD.Name = "Gview_gzD";
             this.Gview_gzD.ReadOnly = true;
             this.Gview_gzD.RowHeadersVisible = false;
             this.Gview_gzD.RowHeadersWidth = 40;
             this.Gview_gzD.RowTemplate.Height = 30;
-            this.Gview_gzD.Size = new System.Drawing.Size(1311, 206);
+            this.Gview_gzD.Size = new System.Drawing.Size(874, 137);
             this.Gview_gzD.TabIndex = 4;
             // 
             // contextMenuStrip_D
@@ -265,31 +274,31 @@
             this.toolStripSeparator4,
             this.toolStripMenuItem12});
             this.contextMenuStrip_D.Name = "contextMenuStrip1";
-            this.contextMenuStrip_D.Size = new System.Drawing.Size(207, 94);
+            this.contextMenuStrip_D.Size = new System.Drawing.Size(161, 76);
             // 
             // toolStripMenuItem10
             // 
             this.toolStripMenuItem10.Name = "toolStripMenuItem10";
-            this.toolStripMenuItem10.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem10.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem10.Text = "复制整个表";
             this.toolStripMenuItem10.Click += new System.EventHandler(this.toolStripMenuItem10_Click);
             // 
             // toolStripMenuItem11
             // 
             this.toolStripMenuItem11.Name = "toolStripMenuItem11";
-            this.toolStripMenuItem11.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem11.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem11.Text = "复制选择区域";
             this.toolStripMenuItem11.Click += new System.EventHandler(this.toolStripMenuItem11_Click);
             // 
             // toolStripSeparator4
             // 
             this.toolStripSeparator4.Name = "toolStripSeparator4";
-            this.toolStripSeparator4.Size = new System.Drawing.Size(203, 6);
+            this.toolStripSeparator4.Size = new System.Drawing.Size(157, 6);
             // 
             // toolStripMenuItem12
             // 
             this.toolStripMenuItem12.Name = "toolStripMenuItem12";
-            this.toolStripMenuItem12.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem12.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem12.Text = "恢复至初始状态";
             // 
             // Gview_gzDS
@@ -300,13 +309,14 @@
             this.Gview_gzDS.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
             this.Gview_gzDS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Gview_gzDS.ContextMenuStrip = this.contextMenuStrip_DS;
-            this.Gview_gzDS.Location = new System.Drawing.Point(80, 980);
+            this.Gview_gzDS.Location = new System.Drawing.Point(53, 653);
+            this.Gview_gzDS.Margin = new System.Windows.Forms.Padding(2);
             this.Gview_gzDS.Name = "Gview_gzDS";
             this.Gview_gzDS.ReadOnly = true;
             this.Gview_gzDS.RowHeadersVisible = false;
             this.Gview_gzDS.RowHeadersWidth = 40;
             this.Gview_gzDS.RowTemplate.Height = 30;
-            this.Gview_gzDS.Size = new System.Drawing.Size(1311, 206);
+            this.Gview_gzDS.Size = new System.Drawing.Size(874, 137);
             this.Gview_gzDS.TabIndex = 5;
             // 
             // contextMenuStrip_DS
@@ -318,40 +328,41 @@
             this.toolStripSeparator5,
             this.toolStripMenuItem15});
             this.contextMenuStrip_DS.Name = "contextMenuStrip1";
-            this.contextMenuStrip_DS.Size = new System.Drawing.Size(207, 94);
+            this.contextMenuStrip_DS.Size = new System.Drawing.Size(161, 76);
             // 
             // toolStripMenuItem13
             // 
             this.toolStripMenuItem13.Name = "toolStripMenuItem13";
-            this.toolStripMenuItem13.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem13.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem13.Text = "复制整个表";
             this.toolStripMenuItem13.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
             // 
             // toolStripMenuItem14
             // 
             this.toolStripMenuItem14.Name = "toolStripMenuItem14";
-            this.toolStripMenuItem14.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem14.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem14.Text = "复制选择区域";
             this.toolStripMenuItem14.Click += new System.EventHandler(this.toolStripMenuItem14_Click);
             // 
             // toolStripSeparator5
             // 
             this.toolStripSeparator5.Name = "toolStripSeparator5";
-            this.toolStripSeparator5.Size = new System.Drawing.Size(203, 6);
+            this.toolStripSeparator5.Size = new System.Drawing.Size(157, 6);
             // 
             // toolStripMenuItem15
             // 
             this.toolStripMenuItem15.Name = "toolStripMenuItem15";
-            this.toolStripMenuItem15.Size = new System.Drawing.Size(206, 28);
+            this.toolStripMenuItem15.Size = new System.Drawing.Size(160, 22);
             this.toolStripMenuItem15.Text = "恢复至初始状态";
             // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label1.Location = new System.Drawing.Point(6, 24);
+            this.label1.Location = new System.Drawing.Point(4, 16);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(54, 29);
+            this.label1.Size = new System.Drawing.Size(36, 19);
             this.label1.TabIndex = 6;
             this.label1.Text = "A类";
             // 
@@ -359,9 +370,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label2.Location = new System.Drawing.Point(3, 260);
+            this.label2.Location = new System.Drawing.Point(2, 173);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(53, 29);
+            this.label2.Size = new System.Drawing.Size(36, 19);
             this.label2.TabIndex = 6;
             this.label2.Text = "B类";
             // 
@@ -369,9 +381,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label3.Location = new System.Drawing.Point(4, 495);
+            this.label3.Location = new System.Drawing.Point(3, 330);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(53, 29);
+            this.label3.Size = new System.Drawing.Size(36, 19);
             this.label3.TabIndex = 6;
             this.label3.Text = "C类";
             // 
@@ -379,9 +392,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label4.Location = new System.Drawing.Point(4, 730);
+            this.label4.Location = new System.Drawing.Point(3, 487);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(54, 29);
+            this.label4.Size = new System.Drawing.Size(37, 19);
             this.label4.TabIndex = 6;
             this.label4.Text = "D类";
             // 
@@ -389,9 +403,10 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label5.Location = new System.Drawing.Point(6, 948);
+            this.label5.Location = new System.Drawing.Point(4, 632);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(129, 29);
+            this.label5.Size = new System.Drawing.Size(88, 19);
             this.label5.TabIndex = 6;
             this.label5.Text = "D类超尺寸";
             // 
@@ -399,6 +414,11 @@
             // 
             this.panel1.AutoScroll = true;
             this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.panel1.Controls.Add(this.log_5);
+            this.panel1.Controls.Add(this.log_4);
+            this.panel1.Controls.Add(this.log_3);
+            this.panel1.Controls.Add(this.log_2);
+            this.panel1.Controls.Add(this.log_1);
             this.panel1.Controls.Add(this.pictureBox5);
             this.panel1.Controls.Add(this.Gview_gzD);
             this.panel1.Controls.Add(this.Gview_gzA);
@@ -412,26 +432,72 @@
             this.panel1.Controls.Add(this.label3);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1581, 1238);
+            this.panel1.Size = new System.Drawing.Size(1054, 930);
             this.panel1.TabIndex = 12;
             // 
             // pictureBox5
             // 
-            this.pictureBox5.Location = new System.Drawing.Point(1852, 1161);
-            this.pictureBox5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox5.Location = new System.Drawing.Point(1235, 774);
             this.pictureBox5.Name = "pictureBox5";
-            this.pictureBox5.Size = new System.Drawing.Size(254, 46);
+            this.pictureBox5.Size = new System.Drawing.Size(169, 31);
             this.pictureBox5.TabIndex = 11;
             this.pictureBox5.TabStop = false;
             // 
+            // log_1
+            // 
+            this.log_1.AutoSize = true;
+            this.log_1.Location = new System.Drawing.Point(51, 804);
+            this.log_1.Name = "log_1";
+            this.log_1.Size = new System.Drawing.Size(41, 12);
+            this.log_1.TabIndex = 12;
+            this.log_1.Text = "label6";
+            // 
+            // log_2
+            // 
+            this.log_2.AutoSize = true;
+            this.log_2.Location = new System.Drawing.Point(51, 824);
+            this.log_2.Name = "log_2";
+            this.log_2.Size = new System.Drawing.Size(41, 12);
+            this.log_2.TabIndex = 13;
+            this.log_2.Text = "label7";
+            // 
+            // log_3
+            // 
+            this.log_3.AutoSize = true;
+            this.log_3.Location = new System.Drawing.Point(51, 844);
+            this.log_3.Name = "log_3";
+            this.log_3.Size = new System.Drawing.Size(41, 12);
+            this.log_3.TabIndex = 14;
+            this.log_3.Text = "label8";
+            // 
+            // log_4
+            // 
+            this.log_4.AutoSize = true;
+            this.log_4.Location = new System.Drawing.Point(51, 864);
+            this.log_4.Name = "log_4";
+            this.log_4.Size = new System.Drawing.Size(41, 12);
+            this.log_4.TabIndex = 15;
+            this.log_4.Text = "label9";
+            // 
+            // log_5
+            // 
+            this.log_5.AutoSize = true;
+            this.log_5.Location = new System.Drawing.Point(51, 884);
+            this.log_5.Name = "log_5";
+            this.log_5.Size = new System.Drawing.Size(41, 12);
+            this.log_5.TabIndex = 16;
+            this.log_5.Text = "label6";
+            // 
             // ASTMStandardABCDDS
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.panel1);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "ASTMStandardABCDDS";
-            this.Size = new System.Drawing.Size(1581, 1238);
+            this.Size = new System.Drawing.Size(1054, 930);
             this.Load += new System.EventHandler(this.ASTMStandardABCDDS_Load);
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).EndInit();
             this.contextMenuStrip_A.ResumeLayout(false);
@@ -489,5 +555,10 @@
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem15;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.PictureBox pictureBox5;
+        private System.Windows.Forms.Label log_4;
+        private System.Windows.Forms.Label log_3;
+        private System.Windows.Forms.Label log_2;
+        private System.Windows.Forms.Label log_1;
+        private System.Windows.Forms.Label log_5;
     }
 }

+ 85 - 1
OTSIncAReportApp/1-UI/GBCalculate/ChineseStandardABCDDS.cs

@@ -282,6 +282,12 @@ namespace OTSIncAReportGB
             lan = new Language(this);
             table = lan.GetNameTable(this.Name);
             #endregion
+
+            log_1.Text = "";
+            log_2.Text = "";
+            log_3.Text = "";
+            log_4.Text = "";
+            log_5.Text = "";
         }
 
         private void ChineseStandardABCDDS_Load(object sender, EventArgs e)
@@ -399,13 +405,91 @@ namespace OTSIncAReportGB
                 Gview_gzC.Width = panel1.Width;
                 Gview_gzD.Width = panel1.Width;
                 Gview_gzDS.Width = panel1.Width;
-
+                int it = 0;
+                it = DetermineWhetherImprovementIsNeeded("A类", m_dt_A, it);
+                it = DetermineWhetherImprovementIsNeeded("B类", m_dt_B, it);
+                it = DetermineWhetherImprovementIsNeeded("C类", m_dt_C, it);
+                it = DetermineWhetherImprovementIsNeeded("D类", m_dt_D, it);
+
+                bool bl = false;
+                if (log_1.Text != "" || log_2.Text != "" || log_3.Text != "" || log_4.Text != "")
+                {
+                    bl = true;
+                }
+                if (bl)
+                {
+                    if (it == 0)
+                    {
+                        log_1.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 1)
+                    {
+                        log_2.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 2)
+                    {
+                        log_3.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 3)
+                    {
+                        log_4.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 4)
+                    {
+                        log_5.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                }
             }
 
             Invalidate();
 
         }
+        private int DetermineWhetherImprovementIsNeeded(string str, DataTable data, int it)
+        {
 
+            string Thin = ""; string Thick = ""; string OverSize = "";
+            for (int i = 6; i < data.Columns.Count; i++)
+            {
+                if (Convert.ToInt32(data.Rows[0][i]) > 0)
+                {
+                    Thin = "细系";
+                }
+                if (Convert.ToInt32(data.Rows[1][i]) > 0)
+                {
+                    Thick = "粗系";
+                }
+                if (Convert.ToInt32(data.Rows[2][i]) > 0)
+                {
+                    OverSize = "超尺寸";
+                }
+            }
+            string str_result = "";
+            if (Thin != "" || Thick != "" || OverSize != "")
+            {
+                str_result = str + "的" + Thin + Thick + OverSize + "指标超过国标2.0,则存在优化的空间。"/*如需了解更多详情,请咨询我司专业的售后专家服务系统。"*/;
+
+                if (it == 0)
+                {
+                    log_1.Text = str_result;
+                }
+                else if (it == 1)
+                {
+                    log_2.Text = str_result;
+                }
+                else if (it == 2)
+                {
+                    log_3.Text = str_result;
+                }
+                else if (it == 3)
+                {
+                    log_4.Text = str_result;
+                }
+
+                it++;
+
+            }
+            return it;
+        }
         #endregion
 
         #region 相关事件

+ 62 - 2
OTSIncAReportApp/1-UI/GBCalculate/ChineseStandardABCDDS.designer.cs

@@ -67,6 +67,11 @@
             this.label5 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.pictureBox5 = new System.Windows.Forms.PictureBox();
+            this.log_5 = new System.Windows.Forms.Label();
+            this.log_4 = new System.Windows.Forms.Label();
+            this.log_3 = new System.Windows.Forms.Label();
+            this.log_2 = new System.Windows.Forms.Label();
+            this.log_1 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).BeginInit();
             this.contextMenuStrip_A.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).BeginInit();
@@ -410,6 +415,11 @@
             // 
             this.panel1.AutoScroll = true;
             this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.panel1.Controls.Add(this.log_5);
+            this.panel1.Controls.Add(this.log_4);
+            this.panel1.Controls.Add(this.log_3);
+            this.panel1.Controls.Add(this.log_2);
+            this.panel1.Controls.Add(this.log_1);
             this.panel1.Controls.Add(this.pictureBox5);
             this.panel1.Controls.Add(this.Gview_gzD);
             this.panel1.Controls.Add(this.Gview_gzA);
@@ -425,7 +435,7 @@
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1054, 825);
+            this.panel1.Size = new System.Drawing.Size(1054, 922);
             this.panel1.TabIndex = 12;
             // 
             // pictureBox5
@@ -437,6 +447,51 @@
             this.pictureBox5.TabIndex = 11;
             this.pictureBox5.TabStop = false;
             // 
+            // log_5
+            // 
+            this.log_5.AutoSize = true;
+            this.log_5.Location = new System.Drawing.Point(51, 878);
+            this.log_5.Name = "log_5";
+            this.log_5.Size = new System.Drawing.Size(41, 12);
+            this.log_5.TabIndex = 21;
+            this.log_5.Text = "label6";
+            // 
+            // log_4
+            // 
+            this.log_4.AutoSize = true;
+            this.log_4.Location = new System.Drawing.Point(51, 858);
+            this.log_4.Name = "log_4";
+            this.log_4.Size = new System.Drawing.Size(41, 12);
+            this.log_4.TabIndex = 20;
+            this.log_4.Text = "label9";
+            // 
+            // log_3
+            // 
+            this.log_3.AutoSize = true;
+            this.log_3.Location = new System.Drawing.Point(51, 838);
+            this.log_3.Name = "log_3";
+            this.log_3.Size = new System.Drawing.Size(41, 12);
+            this.log_3.TabIndex = 19;
+            this.log_3.Text = "label8";
+            // 
+            // log_2
+            // 
+            this.log_2.AutoSize = true;
+            this.log_2.Location = new System.Drawing.Point(51, 818);
+            this.log_2.Name = "log_2";
+            this.log_2.Size = new System.Drawing.Size(41, 12);
+            this.log_2.TabIndex = 18;
+            this.log_2.Text = "label7";
+            // 
+            // log_1
+            // 
+            this.log_1.AutoSize = true;
+            this.log_1.Location = new System.Drawing.Point(51, 798);
+            this.log_1.Name = "log_1";
+            this.log_1.Size = new System.Drawing.Size(41, 12);
+            this.log_1.TabIndex = 17;
+            this.log_1.Text = "label6";
+            // 
             // ChineseStandardABCDDS
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -444,7 +499,7 @@
             this.Controls.Add(this.panel1);
             this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "ChineseStandardABCDDS";
-            this.Size = new System.Drawing.Size(1054, 825);
+            this.Size = new System.Drawing.Size(1054, 922);
             this.Load += new System.EventHandler(this.ChineseStandardABCDDS_Load);
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).EndInit();
             this.contextMenuStrip_A.ResumeLayout(false);
@@ -502,5 +557,10 @@
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem15;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.PictureBox pictureBox5;
+        private System.Windows.Forms.Label log_5;
+        private System.Windows.Forms.Label log_4;
+        private System.Windows.Forms.Label log_3;
+        private System.Windows.Forms.Label log_2;
+        private System.Windows.Forms.Label log_1;
     }
 }

+ 99 - 0
OTSIncAReportApp/1-UI/GBCalculate/NationalStandardMethodTwo.cs

@@ -296,6 +296,13 @@ namespace OTSIncAReportGB
             lan = new Language(this);
             table = lan.GetNameTable(this.Name);
             #endregion
+
+            log_1.Text = "";
+            log_2.Text = "";
+            log_3.Text = "";
+            log_4.Text = "";
+            log_5.Text = "";
+            log_6.Text = "";
         }
 
         private void NationalStandardMethodTwo_Load(object sender, EventArgs e)
@@ -430,11 +437,103 @@ namespace OTSIncAReportGB
                 sulfide.Width = panel1.Width;
                 Gview_gzDS.Width = panel1.Width;
 
+
+
+                int it = 0;
+                it = DetermineWhetherImprovementIsNeeded("A类", m_dt_A, it);
+                it = DetermineWhetherImprovementIsNeeded("B类", m_dt_B, it);
+                it = DetermineWhetherImprovementIsNeeded("C类", m_dt_C, it);
+                it = DetermineWhetherImprovementIsNeeded("D类", m_dt_D, it);
+                it = DetermineWhetherImprovementIsNeeded("D硫化物类", m_dt_sulfide, it);
+                bool bl = false;
+                if (log_1.Text != "" || log_2.Text != "" || log_3.Text != "" || log_4.Text != "")
+                {
+                    bl = true;
+                }
+                if (bl)
+                {
+                    if (it == 0)
+                    {
+                        log_1.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 1)
+                    {
+                        log_2.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 2)
+                    {
+                        log_3.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 3)
+                    {
+                        log_4.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 4)
+                    {
+                        log_5.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                    else if (it == 5)
+                    {
+                        log_6.Text = "如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                    }
+                }
+
             }
 
             Invalidate();
 
         }
+
+        private int DetermineWhetherImprovementIsNeeded(string str, DataTable data, int it)
+        {
+
+            string Thin = ""; string Thick = ""; string OverSize = "";
+            for (int i = 6; i < data.Columns.Count; i++)
+            {
+                if (Convert.ToInt32(data.Rows[0][i]) > 0)
+                {
+                    Thin = "细系";
+                }
+                if (Convert.ToInt32(data.Rows[1][i]) > 0)
+                {
+                    Thick = "粗系";
+                }
+                if (Convert.ToInt32(data.Rows[2][i]) > 0)
+                {
+                    OverSize = "超尺寸";
+                }
+            }
+            string str_result = "";
+            if (Thin != "" || Thick != "" || OverSize != "")
+            {
+                str_result = str + "的" + Thin + Thick + OverSize + "指标超过国标2.0,则存在优化的空间。"/*如需了解更多详情,请咨询我司专业的售后专家服务系统。"*/;
+
+                if (it == 0)
+                {
+                    log_1.Text = str_result;
+                }
+                else if (it == 1)
+                {
+                    log_2.Text = str_result;
+                }
+                else if (it == 2)
+                {
+                    log_3.Text = str_result;
+                }
+                else if (it == 3)
+                {
+                    log_4.Text = str_result;
+                }
+                else if (it == 4)
+                {
+                    log_5.Text = str_result;
+                }
+
+                it++;
+
+            }
+            return it;
+        }
         #endregion
 
         #region 相关事件

+ 84 - 12
OTSIncAReportApp/1-UI/GBCalculate/NationalStandardMethodTwo.designer.cs

@@ -30,6 +30,7 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NationalStandardMethodTwo));
             this.panel1 = new System.Windows.Forms.Panel();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.Gview_gzDS = new System.Windows.Forms.DataGridView();
             this.sulfide = new System.Windows.Forms.DataGridView();
             this.label6 = new System.Windows.Forms.Label();
@@ -42,21 +43,32 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.Gview_gzA = new System.Windows.Forms.DataGridView();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.log_5 = new System.Windows.Forms.Label();
+            this.log_4 = new System.Windows.Forms.Label();
+            this.log_3 = new System.Windows.Forms.Label();
+            this.log_2 = new System.Windows.Forms.Label();
+            this.log_1 = new System.Windows.Forms.Label();
+            this.log_6 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzDS)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.sulfide)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzD)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzC)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
             // panel1
             // 
             this.panel1.AutoScroll = true;
             this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.panel1.Controls.Add(this.log_6);
+            this.panel1.Controls.Add(this.log_5);
+            this.panel1.Controls.Add(this.log_4);
+            this.panel1.Controls.Add(this.log_3);
+            this.panel1.Controls.Add(this.log_2);
+            this.panel1.Controls.Add(this.log_1);
             this.panel1.Controls.Add(this.pictureBox1);
             this.panel1.Controls.Add(this.Gview_gzDS);
             this.panel1.Controls.Add(this.sulfide);
@@ -73,9 +85,18 @@
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1009, 946);
+            this.panel1.Size = new System.Drawing.Size(1009, 1088);
             this.panel1.TabIndex = 0;
             // 
+            // pictureBox1
+            // 
+            this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
+            this.pictureBox1.Location = new System.Drawing.Point(1207, 945);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(168, 31);
+            this.pictureBox1.TabIndex = 12;
+            this.pictureBox1.TabStop = false;
+            // 
             // Gview_gzDS
             // 
             this.Gview_gzDS.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
@@ -196,14 +217,59 @@
             this.Gview_gzA.Size = new System.Drawing.Size(918, 137);
             this.Gview_gzA.TabIndex = 0;
             // 
-            // pictureBox1
+            // log_5
             // 
-            this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
-            this.pictureBox1.Location = new System.Drawing.Point(1207, 945);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(168, 31);
-            this.pictureBox1.TabIndex = 12;
-            this.pictureBox1.TabStop = false;
+            this.log_5.AutoSize = true;
+            this.log_5.Location = new System.Drawing.Point(86, 1024);
+            this.log_5.Name = "log_5";
+            this.log_5.Size = new System.Drawing.Size(41, 12);
+            this.log_5.TabIndex = 21;
+            this.log_5.Text = "label6";
+            // 
+            // log_4
+            // 
+            this.log_4.AutoSize = true;
+            this.log_4.Location = new System.Drawing.Point(86, 1004);
+            this.log_4.Name = "log_4";
+            this.log_4.Size = new System.Drawing.Size(41, 12);
+            this.log_4.TabIndex = 20;
+            this.log_4.Text = "label9";
+            // 
+            // log_3
+            // 
+            this.log_3.AutoSize = true;
+            this.log_3.Location = new System.Drawing.Point(86, 984);
+            this.log_3.Name = "log_3";
+            this.log_3.Size = new System.Drawing.Size(41, 12);
+            this.log_3.TabIndex = 19;
+            this.log_3.Text = "label8";
+            // 
+            // log_2
+            // 
+            this.log_2.AutoSize = true;
+            this.log_2.Location = new System.Drawing.Point(86, 964);
+            this.log_2.Name = "log_2";
+            this.log_2.Size = new System.Drawing.Size(41, 12);
+            this.log_2.TabIndex = 18;
+            this.log_2.Text = "label7";
+            // 
+            // log_1
+            // 
+            this.log_1.AutoSize = true;
+            this.log_1.Location = new System.Drawing.Point(86, 944);
+            this.log_1.Name = "log_1";
+            this.log_1.Size = new System.Drawing.Size(41, 12);
+            this.log_1.TabIndex = 17;
+            this.log_1.Text = "label6";
+            // 
+            // log_6
+            // 
+            this.log_6.AutoSize = true;
+            this.log_6.Location = new System.Drawing.Point(86, 1044);
+            this.log_6.Name = "log_6";
+            this.log_6.Size = new System.Drawing.Size(41, 12);
+            this.log_6.TabIndex = 22;
+            this.log_6.Text = "label7";
             // 
             // NationalStandardMethodTwo
             // 
@@ -212,17 +278,17 @@
             this.AutoScroll = true;
             this.Controls.Add(this.panel1);
             this.Name = "NationalStandardMethodTwo";
-            this.Size = new System.Drawing.Size(1009, 946);
+            this.Size = new System.Drawing.Size(1009, 1088);
             this.Load += new System.EventHandler(this.NationalStandardMethodTwo_Load);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzDS)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.sulfide)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzD)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzC)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -243,5 +309,11 @@
         private System.Windows.Forms.Label label5;
         private System.Windows.Forms.DataGridView Gview_gzDS;
         private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.Label log_5;
+        private System.Windows.Forms.Label log_4;
+        private System.Windows.Forms.Label log_3;
+        private System.Windows.Forms.Label log_2;
+        private System.Windows.Forms.Label log_1;
+        private System.Windows.Forms.Label log_6;
     }
 }

+ 1 - 1
OTSIncAReportApp/1-UI/OTSReportExport/Template/GBTemplate.Designer.cs

@@ -121,7 +121,7 @@ namespace OTSIncAReportApp.ReportTemplate
             this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) 
             | DevExpress.XtraPrinting.BorderSide.Right) 
             | DevExpress.XtraPrinting.BorderSide.Bottom)));
-            this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(5.000051F, 738.5417F);
+            this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(5.000051F, 731.25F);
             this.xrTable1.Name = "xrTable1";
             this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
             this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {

+ 63 - 4
OTSIncAReportApp/1-UI/OTSReportExport/Template/GBTemplate.cs

@@ -18,6 +18,7 @@ namespace OTSIncAReportApp.ReportTemplate
         float LowPlace = 1000f;
         Hashtable table;
         GBData m_export_reporttemplate;
+        string logName = "";
         public GBReport(OTSReport_Export in_export, Hashtable a_table)
         {
             m_otsreport_export = in_export;
@@ -79,6 +80,10 @@ namespace OTSIncAReportApp.ReportTemplate
             GB_NameData(out DataTable HeaderData, out DataTable HeaderData_DS);//获取标准表头
 
             XRTable Template = new XRTable();
+
+            List<string> listStr = new List<string>();
+
+
             for (int a = 0; a < GB_List.Count - 1; a++)
             {
                 XRTableRow Template_Rows_A_Class = new XRTableRow();
@@ -93,6 +98,25 @@ namespace OTSIncAReportApp.ReportTemplate
                 {
                     Template.Rows.Add(GB_Class_dataRow(GB_List[a], i));
                 }
+                if(DetermineWhetherImprovementIsNeeded(GB1_NameList[a], GB_List[a]))
+                {
+                    string srt = GB1_NameList[a] + logName;
+                    listStr.Add(srt);
+                }
+            }
+            if (listStr.Count==0)
+            {
+                xrTable1.Rows.Add(GB_fpt(GBName+":此样品暂不需要优化冶炼工艺"));
+            }
+            else
+            {
+                string str = GBName+ ":此样品";
+                for (int i=0;i< listStr.Count;i++)
+                {
+                    str = str + listStr[i];
+                }
+                str = str + "指标超过国标2.0,则存在优化的空间。如需了解更多详情,请咨询我司专业的售后专家服务系统。";
+                xrTable1.Rows.Add(GB_fpt(str));
             }
 
             XRTableRow Template_Rows_A_Class_DS = new XRTableRow();
@@ -107,19 +131,54 @@ namespace OTSIncAReportApp.ReportTemplate
             {
                 Template.Rows.Add(GB_Class_dataRows_DS(GB_List[GB_List.Count - 1], i));
             }
-
-
             Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
             Template.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
             Template.LocationF = new PointF(5, LowPlace);
             Template.SizeF = new SizeF(640, 0);
             Template.Font = new Font(typeface, Template.Font.Size);
             this.Detail.Controls.Add(Template);
-
             LowPlace = LowPlace + Template.SizeF.Height + 50;
-
         }
+        private bool DetermineWhetherImprovementIsNeeded(string str, DataTable data)
+        {
+            logName = "";
+            bool bl = false;
+            string Thin = ""; string Thick = ""; string OverSize = "";
+            for (int i = 6; i < data.Columns.Count; i++)
+            {
+                if (Convert.ToInt32(data.Rows[0][i]) > 0)
+                {
+                    Thin = "细系";
+                }
+                if (Convert.ToInt32(data.Rows[1][i]) > 0)
+                {
+                    Thick = "粗系";
+                }
+                if (Convert.ToInt32(data.Rows[2][i]) > 0)
+                {
+                    OverSize = "超尺寸";
+                }
+            }
+            string str_result = "";
+            if (Thin != "" || Thick != "" || OverSize != "")
+            {
+                str_result = Thin + Thick + OverSize /*+ "指标超过国标2.0,则存在优化的空间。如需了解更多详情,请咨询我司专业的售后专家服务系统。"*/;
+                logName = str_result;
+                bl = true;
+            }
 
+            return bl;
+            
+        }
+        private XRTableRow GB_fpt(string str)
+        {
+            XRTableRow XRT = new XRTableRow();
+            XRTableCell XRTr = new XRTableCell();
+            XRTr.WidthF = 480f;
+            XRTr.Text = str;
+            XRT.Controls.Add(XRTr);
+            return XRT;
+        }
         private XRTableRow GB_Class_dataRow(DataTable dt,int index)
         {
             XRTableRow Template_Rows_A_Class_data = new XRTableRow();