瀏覽代碼

临时提交

zhangjiaxin 1 年之前
父節點
當前提交
9ea5c066f9

二進制
Bin/x64/Debug/Config/ReportTemplate/ReportIdentification.bmp


+ 3 - 2
Bin/x64/Debug/Config/ReportTemplate/ReportTemplateConfig.xml

@@ -1,7 +1,8 @@
 <XmlConfig>
   <M_SY>
     <str_tb_ZBT>Cleanness Report</str_tb_ZBT>
-    <str_tb_FBT>宁德时代</str_tb_FBT>
+    <str_tb_FBT>
+    </str_tb_FBT>
     <str_tb_YPBH>0001</str_tb_YPBH>
     <str_tb_CKBZ>
     </str_tb_CKBZ>
@@ -29,7 +30,7 @@
     <index_cb_jzwfl_ljb>0</index_cb_jzwfl_ljb>
     <index_cb_jzwfl_klfw>0</index_cb_jzwfl_klfw>
     <str_cb_klcc_jsfs>ECD</str_cb_klcc_jsfs>
-    <b_ck_klcc_xsddt>False</b_ck_klcc_xsddt>
+    <b_ck_klcc_xsddt>True</b_ck_klcc_xsddt>
     <b_ck_klcc_dfl>False</b_ck_klcc_dfl>
     <b_ck_klcc_xfl>False</b_ck_klcc_xfl>
   </M_KLFXJG>

+ 17 - 7
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -2440,11 +2440,11 @@ namespace OTSIncAReportGrids
             {
                 // 将原图转换为RGB格式,并绘制到新的Bitmap上  
                 graphics.DrawImage(bitmap, new Rectangle(0, 0, bitmap.Width, bitmap.Height));
-
+                Color color = FromHex("#00FF00");
                 // 设置线条颜色和宽度  
-                Pen pen = new Pen(Color.Black, LineWidth);
+                Pen pen = new Pen(color, LineWidth);
                 Font font = new Font("Arial", 20, GraphicsUnit.Pixel);
-                Brush brush = new SolidBrush(Color.Black);
+                Brush brush = new SolidBrush(color);
                 StringFormat stringFormat = new StringFormat();
                 stringFormat.Alignment = StringAlignment.Center; // 居中对齐  
                 stringFormat.LineAlignment = StringAlignment.Center; // 居中对齐行  
@@ -2457,7 +2457,7 @@ namespace OTSIncAReportGrids
                 point.Y = bitmap.Height - 80;
 
 
-                graphics.DrawString(a_str, font, new SolidBrush(Color.Black), point);
+                graphics.DrawString(a_str, font, new SolidBrush(color), point);
                 graphics.DrawLine(pen, bitmap.Width - LineLength - 20, bitmap.Height - 40, bitmap.Width - 20, bitmap.Height - 40);
                 graphics.DrawLine(pen, bitmap.Width - LineLength - 20, bitmap.Height - 40, bitmap.Width - LineLength - 20, bitmap.Height - 50);
                 graphics.DrawLine(pen, bitmap.Width - 20, bitmap.Height - 40, bitmap.Width - 20, bitmap.Height - 50);
@@ -2466,6 +2466,16 @@ namespace OTSIncAReportGrids
             }
             return rgbBitmap;
         }
+
+        private static Color FromHex(string hex)
+        {
+            hex = hex.Replace("#", ""); // 移除 # 前缀  
+            byte a = 255; // 默认Alpha值为255(不透明)  
+            byte r = Convert.ToByte(hex.Substring(0, 2), 16);
+            byte g = Convert.ToByte(hex.Substring(2, 2), 16);
+            byte b = Convert.ToByte(hex.Substring(4, 2), 16);
+            return Color.FromArgb(a, r, g, b);
+        }
         /// <summary>
         /// 判断当前图片应该使用多大标尺
         /// </summary>
@@ -2475,17 +2485,17 @@ namespace OTSIncAReportGrids
         {
             int value = 0;
             a_value = a_value / 2;
-            for (int i = 100; i < 2000; i += 50)
+            for (int i = 10; i < 5000; i += 5)
             {
                 if (a_value < i)
                 {
-                    value = i - 50;
+                    value = i - 5;
                     break;
                 }
             }
             if (value == 0)
             {
-                value = 2000;
+                value = 5000;
             }
             return value;
 

+ 9 - 4
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -26,6 +26,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         #region 全局变量
         public List<DataTable> m_list_dt;                   //导出的各模块数据,合集
 
+        private DataTable FilteredData = new DataTable();
+
         public OTSReport_Export m_otsreport_export;
         UserLibraryData userLibrary;
         DataTable userLibraryData;
@@ -934,6 +936,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         public DataTable Get_dev_kllb_data(c_TemplateClass m_mbszclass)
         {
             int serialNumber = 1;
+            FilteredData.Clear();
+            
             //------------------加载模块,获取数据-------------------------------------------------
             m_otsreport_export.m_ReportApp.im_ParticlesGridDevidePage = new ParticlesGridDevidePage(m_otsreport_export.m_ReportApp);
             DataTable SelectParticleTable = new DataTable();
@@ -1046,7 +1050,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             DT_Largest20.Columns.Add("p3", typeof(Bitmap));
 
             #endregion
-
+            FilteredData = dt_ParticlesGridDevidePage.Clone();
             #region 插入-前20颗粒部份
 
             for (int i_row = 0; i_row < dt_ParticlesGridDevidePage.Rows.Count; i_row++)
@@ -1163,6 +1167,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     dr["ColVal9"] = ParameterNormalization(colVal, list_max_elementvale[9]);
 
                     DT_Largest20.Rows.Add(dr);
+                    FilteredData.Rows.Add(dt_ParticlesGridDevidePage.Rows[i_row].ItemArray);
                 }
             }
             #endregion
@@ -1260,15 +1265,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
             DataTable dt_ParticlesGridDevidePage = dv.ToTable();
             string str_resultPath = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()].FilePath;
-
+            //DataTable dt_GridDevidePage = FrameData.Copy();
             DataTable DT_field_dt = new DataTable();
             DT_field_dt.TableName = "field_dt";
             DT_field_dt.Columns.Add("FieldId", typeof(int));
             //图像列
             DT_field_dt.Columns.Add("FieldImg", typeof(Bitmap));
 
-            //首先生成标记颗粒的帧图图像文件
-            DataTable dt_GridDevidePage = dt_ParticlesGridDevidePage.Copy();
+            //首先生成标记颗粒的帧图图像文件  FilteredData
+            DataTable dt_GridDevidePage = FilteredData.Copy();
             dt_GridDevidePage.Clear();
             for (int i = 0; i < dt_ParticlesGridDevidePage.Rows.Count; i++)
             {

+ 2 - 0
OTSIncAReportApp/ReportTemplate/OTS_DEVReport.Designer.cs

@@ -328,9 +328,11 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             // 
             this.xrTableCell32.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) 
             | DevExpress.XtraPrinting.BorderSide.Bottom)));
+            this.xrTableCell32.Font = new System.Drawing.Font("微软雅黑", 9.75F);
             this.xrTableCell32.Multiline = true;
             this.xrTableCell32.Name = "xrTableCell32";
             this.xrTableCell32.StylePriority.UseBorders = false;
+            this.xrTableCell32.StylePriority.UseFont = false;
             this.xrTableCell32.StylePriority.UseTextAlignment = false;
             this.xrTableCell32.Text = "总数量";
             this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;

+ 8 - 6
OTSIncAReportApp/ReportTemplate/OTS_DEVReport.cs

@@ -16,8 +16,8 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
     {
         public OTSReport_Export m_otsreport_export;
         //string typeface = "Arial Unicode MS";
-        string Schriftart_chinese = "宋体";
-        string Schriftart_english = "Arial Unicode MS";
+        string Schriftart_chinese = "微软雅黑";
+        string Schriftart_english = "Arial";
         List<string> TemplateList;
         Export_ReportTemplate export_ReportTemplate;
         //SizeF syx_Size = new SizeF(668f, 660.54f);
@@ -414,14 +414,14 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             dt.Columns.Add("num");
             for (int i = 0; i < dataTable.Rows.Count; i++)
             {
-                for (int a = 1; a < 11; a++)
+                for (int a = 0; a < 11; a++)
                 {
                     if (string.IsNullOrEmpty(TypeRange.Rows[0][a].ToString()))
                         continue;
                     DataRow dr = dt.NewRow();
                     dr["name"] = subscript.Getsubscriptstring(dataTable.Rows[i]["Name"].ToString());
                     dr["range"] = TypeRange.Rows[0][a];
-                    if (double.TryParse(dataTable.Rows[i]["c" + a.ToString()].ToString(), out double result))
+                    if (double.TryParse(dataTable.Rows[i]["c" + (a+1).ToString()].ToString(), out double result))
                     {
                         dr["num"] = result;
                     }
@@ -869,7 +869,8 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTable_kllb_surface.LocationF = new PointF(0, NeueStartposition + 5);
             xrTable_kllb_surface.Visible = true;
             NeueStartposition = xrTable_kllb_surface.LocationF.Y + xrTable_kllb_surface.SizeF.Height;
-            xrTableCell2.Text = "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + "(μm)";
+            //xrTableCell2.Text = "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + "(μm)";
+            setXRLabelData(xrTableCell2, "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + "(μm)");
             DataTable dataTable = export_ReportTemplate.Get_dev_kllb_data(TemplateClass);
 
             for (int i = 0; i < dataTable.Rows.Count; i++)
@@ -1174,7 +1175,8 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             XRTableRow Template_Rows_1 = new XRTableRow();
             XRTableCell Template_Rows1_Cell_2 = new XRTableCell();
             Template_Rows1_Cell_2.WidthF = 630f;
-            Template_Rows1_Cell_2.Text = str;
+            setXRLabelData(Template_Rows1_Cell_2, str);
+            //Template_Rows1_Cell_2.Text = str;
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_2);
             Template.Rows.Add(Template_Rows_1);
             Template.WidthF = 630f;