callm 1 неделя назад
Родитель
Сommit
3cc4888d55

+ 107 - 30
UAS_MES_YDCY/FunctionCode/Query/Query_SOP_CY.Designer.cs

@@ -47,14 +47,21 @@ namespace UAS_MES_NEW.Query
             this.label5 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.SendDGV = new System.Windows.Forms.DataGridView();
             this.SendDGV = new System.Windows.Forms.DataGridView();
             this.ChooseALL = new System.Windows.Forms.Button();
             this.ChooseALL = new System.Windows.Forms.Button();
-            this.ps_prodcode = new SearchTextBox();
-            this.li_code = new SearchTextBox();
             this.GetSOP = new System.Windows.Forms.Button();
             this.GetSOP = new System.Windows.Forms.Button();
+            this.button1 = new System.Windows.Forms.Button();
+            this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.ps_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.CheckColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.CheckColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.fp_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.fp_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.fp_path = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.fp_path = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.psd_iskey = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.psd_iskey = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.issend = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.issend = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.button2 = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
@@ -233,24 +240,66 @@ namespace UAS_MES_NEW.Query
             this.ChooseALL.UseVisualStyleBackColor = true;
             this.ChooseALL.UseVisualStyleBackColor = true;
             this.ChooseALL.Click += new System.EventHandler(this.ChooseALL_Click);
             this.ChooseALL.Click += new System.EventHandler(this.ChooseALL_Click);
             // 
             // 
-            // ps_prodcode
+            // GetSOP
             // 
             // 
-            this.ps_prodcode.AllPower = null;
-            this.ps_prodcode.Caller = null;
-            this.ps_prodcode.Condition = null;
-            this.ps_prodcode.DBTitle = null;
-            this.ps_prodcode.FormName = null;
-            this.ps_prodcode.Location = new System.Drawing.Point(216, 311);
-            this.ps_prodcode.Name = "ps_prodcode";
-            this.ps_prodcode.Power = null;
-            this.ps_prodcode.ReturnData = null;
-            this.ps_prodcode.SelectField = null;
-            this.ps_prodcode.SetValueField = null;
-            this.ps_prodcode.Size = new System.Drawing.Size(582, 41);
-            this.ps_prodcode.TabIndex = 24;
-            this.ps_prodcode.TableName = null;
-            this.ps_prodcode.TextBoxEnable = false;
-            this.ps_prodcode.UserControlTextChanged += new SearchTextBox.OnTextChange(this.ps_prodcode_UserControlTextChanged);
+            this.GetSOP.Location = new System.Drawing.Point(638, 379);
+            this.GetSOP.Name = "GetSOP";
+            this.GetSOP.Size = new System.Drawing.Size(160, 42);
+            this.GetSOP.TabIndex = 26;
+            this.GetSOP.Text = "获取SOP";
+            this.GetSOP.UseVisualStyleBackColor = true;
+            this.GetSOP.Click += new System.EventHandler(this.GetSOP_Click);
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(657, 797);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(160, 42);
+            this.button1.TabIndex = 27;
+            this.button1.Text = "PDF";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // dataGridViewCheckBoxColumn1
+            // 
+            this.dataGridViewCheckBoxColumn1.DataPropertyName = "CheckColumn";
+            this.dataGridViewCheckBoxColumn1.HeaderText = "勾选";
+            this.dataGridViewCheckBoxColumn1.MinimumWidth = 100;
+            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+            this.dataGridViewCheckBoxColumn1.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "fp_name";
+            this.dataGridViewTextBoxColumn1.HeaderText = "文件名";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "fp_path";
+            this.dataGridViewTextBoxColumn2.HeaderText = "路径";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "psd_iskey";
+            this.dataGridViewTextBoxColumn3.HeaderText = "是否关键工序";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "issend";
+            this.dataGridViewTextBoxColumn4.HeaderText = "是否成功发送";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.Visible = false;
+            this.dataGridViewTextBoxColumn4.Width = 200;
             // 
             // 
             // li_code
             // li_code
             // 
             // 
@@ -270,15 +319,24 @@ namespace UAS_MES_NEW.Query
             this.li_code.TableName = null;
             this.li_code.TableName = null;
             this.li_code.TextBoxEnable = false;
             this.li_code.TextBoxEnable = false;
             // 
             // 
-            // GetSOP
+            // ps_prodcode
             // 
             // 
-            this.GetSOP.Location = new System.Drawing.Point(638, 379);
-            this.GetSOP.Name = "GetSOP";
-            this.GetSOP.Size = new System.Drawing.Size(160, 42);
-            this.GetSOP.TabIndex = 26;
-            this.GetSOP.Text = "获取SOP";
-            this.GetSOP.UseVisualStyleBackColor = true;
-            this.GetSOP.Click += new System.EventHandler(this.GetSOP_Click);
+            this.ps_prodcode.AllPower = null;
+            this.ps_prodcode.Caller = null;
+            this.ps_prodcode.Condition = null;
+            this.ps_prodcode.DBTitle = null;
+            this.ps_prodcode.FormName = null;
+            this.ps_prodcode.Location = new System.Drawing.Point(216, 311);
+            this.ps_prodcode.Name = "ps_prodcode";
+            this.ps_prodcode.Power = null;
+            this.ps_prodcode.ReturnData = null;
+            this.ps_prodcode.SelectField = null;
+            this.ps_prodcode.SetValueField = null;
+            this.ps_prodcode.Size = new System.Drawing.Size(582, 41);
+            this.ps_prodcode.TabIndex = 24;
+            this.ps_prodcode.TableName = null;
+            this.ps_prodcode.TextBoxEnable = false;
+            this.ps_prodcode.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.ps_prodcode_UserControlTextChanged);
             // 
             // 
             // CheckColumn
             // CheckColumn
             // 
             // 
@@ -321,11 +379,23 @@ namespace UAS_MES_NEW.Query
             this.issend.Visible = false;
             this.issend.Visible = false;
             this.issend.Width = 200;
             this.issend.Width = 200;
             // 
             // 
-            // SOP
+            // button2
+            // 
+            this.button2.Location = new System.Drawing.Point(666, 893);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(160, 42);
+            this.button2.TabIndex = 28;
+            this.button2.Text = "excel";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // Query_SOP_CY
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1945, 1234);
             this.ClientSize = new System.Drawing.Size(1945, 1234);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.button1);
             this.Controls.Add(this.GetSOP);
             this.Controls.Add(this.GetSOP);
             this.Controls.Add(this.li_code);
             this.Controls.Add(this.li_code);
             this.Controls.Add(this.ps_prodcode);
             this.Controls.Add(this.ps_prodcode);
@@ -345,10 +415,10 @@ namespace UAS_MES_NEW.Query
             this.Controls.Add(this.FilePath);
             this.Controls.Add(this.FilePath);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.richTextBox1);
             this.Controls.Add(this.richTextBox1);
-            this.Name = "SOP";
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Query_SOP_CY";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "SOP管理";
             this.Text = "SOP管理";
-            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             this.Load += new System.EventHandler(this.Form3_Load);
             this.Load += new System.EventHandler(this.Form3_Load);
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
@@ -382,5 +452,12 @@ namespace UAS_MES_NEW.Query
         private System.Windows.Forms.DataGridViewTextBoxColumn fp_path;
         private System.Windows.Forms.DataGridViewTextBoxColumn fp_path;
         private System.Windows.Forms.DataGridViewTextBoxColumn psd_iskey;
         private System.Windows.Forms.DataGridViewTextBoxColumn psd_iskey;
         private System.Windows.Forms.DataGridViewTextBoxColumn issend;
         private System.Windows.Forms.DataGridViewTextBoxColumn issend;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
     }
     }
 }
 }

+ 64 - 13
UAS_MES_YDCY/FunctionCode/Query/Query_SOP_CY.cs

@@ -14,6 +14,9 @@ using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.PublicForm;
 using UAS_MES_NEW.PublicForm;
+using Aspose.Pdf.Devices;
+using Aspose.Pdf;
+using DevExpress.XtraExport;
 
 
 namespace UAS_MES_NEW.Query
 namespace UAS_MES_NEW.Query
 {
 {
@@ -25,10 +28,8 @@ namespace UAS_MES_NEW.Query
         string sourcecode;
         string sourcecode;
         DataTable Dbfind;
         DataTable Dbfind;
 
 
-        public Query_SOP_CY(string iUserCode, string iSource)
+        public Query_SOP_CY()
         {
         {
-            usercode = iUserCode;
-            sourcecode = iSource;
             InitializeComponent();
             InitializeComponent();
         }
         }
 
 
@@ -73,7 +74,7 @@ namespace UAS_MES_NEW.Query
             if (dt.Rows.Count == 0)
             if (dt.Rows.Count == 0)
             {
             {
                 string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
                 string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
-                dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + usercode + "','在录入','ENTERING')", "insert");
+                dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + User.UserCode + "','在录入','ENTERING')", "insert");
             }
             }
             else
             else
             {
             {
@@ -83,6 +84,7 @@ namespace UAS_MES_NEW.Query
             }
             }
 
 
             Workbook workbook = new Workbook(FilePath.Text);
             Workbook workbook = new Workbook(FilePath.Text);
+            workbook.CalculateFormula(true);
             List<Worksheet> list = new List<Worksheet>();
             List<Worksheet> list = new List<Worksheet>();
             List<string> filename = new List<string>();
             List<string> filename = new List<string>();
             dh.ExecuteSql("update ProductSOP set ps_attachsop='' where ps_prodcode='" + ps_prodcode.Text + "'", "update");
             dh.ExecuteSql("update ProductSOP set ps_attachsop='' where ps_prodcode='" + ps_prodcode.Text + "'", "update");
@@ -166,9 +168,9 @@ namespace UAS_MES_NEW.Query
                 dic.Add("em_code", "ADMIN");
                 dic.Add("em_code", "ADMIN");
                 dic.Add("caller", "ProductSOP");
                 dic.Add("caller", "ProductSOP");
                 OperatResult.AppendText("上传文件【" + sheetname + ".jpg" + "】\n");
                 OperatResult.AppendText("上传文件【" + sheetname + ".jpg" + "】\n");
-                string fp_id = UploadFilesToRemoteUrl("http://192.168.0.85:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + ps_prodcode.Text + @"\" + sheetname + ".jpg", dic);
-                string ps_id = dh.getFieldDataByCondition("ProductSOP", "ps_id", "ps_prodcode='" + ps_prodcode.Text + "'").ToString();
-                dh.ExecuteSql("insert into ProductSOPdetail(psd_id,psd_psid,psd_attach) select ProductSOPdetail_seq.nextval,ps_id,'" + sheetname + ".jpg" + ";" + fp_id + "' from ProductSOP where ps_prodcode='" + ps_prodcode.Text + "'", "insert");
+                //string fp_id = UploadFilesToRemoteUrl("http://192.168.0.85:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + ps_prodcode.Text + @"\" + sheetname + ".jpg", dic);
+                //string ps_id = dh.getFieldDataByCondition("ProductSOP", "ps_id", "ps_prodcode='" + ps_prodcode.Text + "'").ToString();
+                //dh.ExecuteSql("insert into ProductSOPdetail(psd_id,psd_psid,psd_attach) select ProductSOPdetail_seq.nextval,ps_id,'" + sheetname + ".jpg" + ";" + fp_id + "' from ProductSOP where ps_prodcode='" + ps_prodcode.Text + "'", "insert");
                 //if (fp_id != "")
                 //if (fp_id != "")
                 //{
                 //{
                 //    dh.ExecuteSql("update ProductSOP set ps_attachsop=ps_attachsop||" + fp_id + "||';' where ps_prodcode='" + pr_code.Text + "'", "update");
                 //    dh.ExecuteSql("update ProductSOP set ps_attachsop=ps_attachsop||" + fp_id + "||';' where ps_prodcode='" + pr_code.Text + "'", "update");
@@ -270,7 +272,7 @@ namespace UAS_MES_NEW.Query
             }
             }
             catch (Exception e)
             catch (Exception e)
             {
             {
-                LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "上传SOP", "上传失败", ps_prodcode.Text, "");
+                LogicHandler.DoCommandLog("SOP", User.UserCode, "", "", sourcecode, "上传SOP", "上传失败", ps_prodcode.Text, "");
                 Console.WriteLine(e.Message + e.StackTrace);
                 Console.WriteLine(e.Message + e.StackTrace);
             }
             }
             return "";
             return "";
@@ -294,11 +296,11 @@ namespace UAS_MES_NEW.Query
             stw.ShowDialog();
             stw.ShowDialog();
             if (JPG.Checked)
             if (JPG.Checked)
             {
             {
-                LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "上传SOP【图片格式】", "上传成功", ps_prodcode.Text, "");
+                LogicHandler.DoCommandLog("SOP", User.UserCode, "", "", sourcecode, "上传SOP【图片格式】", "上传成功", ps_prodcode.Text, "");
             }
             }
             else
             else
             {
             {
-                LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "上传SOP【PDF格式】", "上传成功", ps_prodcode.Text, "");
+                LogicHandler.DoCommandLog("SOP", User.UserCode, "", "", sourcecode, "上传SOP【PDF格式】", "上传成功", ps_prodcode.Text, "");
             }
             }
         }
         }
 
 
@@ -342,18 +344,18 @@ namespace UAS_MES_NEW.Query
                           "values(soprelease_seq.nextval,'" + li_code.Text + "','" + path + "',0,'" + ps_prodcode.Text + "','" + SendDGV.Rows[i].Cells["fp_name"].Value.ToString().Replace(" ", "").Replace("(", "").Replace(")", "") + "','" + SendDGV.Rows[i].Cells["psd_iskey"].Value + "') ", "insert");
                           "values(soprelease_seq.nextval,'" + li_code.Text + "','" + path + "',0,'" + ps_prodcode.Text + "','" + SendDGV.Rows[i].Cells["fp_name"].Value.ToString().Replace(" ", "").Replace("(", "").Replace(")", "") + "','" + SendDGV.Rows[i].Cells["psd_iskey"].Value + "') ", "insert");
                         }
                         }
                     }
                     }
-                    LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "广播SOP", "广播成功", ps_prodcode.Text, "");
+                    LogicHandler.DoCommandLog("SOP", User.UserCode, "", "", sourcecode, "广播SOP", "广播成功", ps_prodcode.Text, "");
                     MessageBox.Show("文档[" + ps_prodcode.Text + "]下放成功");
                     MessageBox.Show("文档[" + ps_prodcode.Text + "]下放成功");
                 }
                 }
                 else
                 else
                 {
                 {
                     MessageBox.Show("产品编号" + ps_prodcode.Text + "未维护SOP文档");
                     MessageBox.Show("产品编号" + ps_prodcode.Text + "未维护SOP文档");
-                    LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "广播SOP", "广播失败,未维护SOP文档", ps_prodcode.Text, "");
+                    LogicHandler.DoCommandLog("SOP", User.UserCode, "", "", sourcecode, "广播SOP", "广播失败,未维护SOP文档", ps_prodcode.Text, "");
                 }
                 }
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
-                LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "广播SOP", "广播失败", ps_prodcode.Text, "");
+                LogicHandler.DoCommandLog("SOP", User.UserCode, "", "", sourcecode, "广播SOP", "广播失败", ps_prodcode.Text, "");
                 Console.WriteLine(ex.Message + ex.StackTrace);
                 Console.WriteLine(ex.Message + ex.StackTrace);
             }
             }
         }
         }
@@ -434,5 +436,54 @@ namespace UAS_MES_NEW.Query
         {
         {
             LoadPrCode();
             LoadPrCode();
         }
         }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            using (Document pdfDocument = new Document("C:\\Users\\callm\\Desktop\\客户资料\\次元\\SOP测试文件\\EM-959-NM16ASH PVT组装SOP20260512.pdf"))
+            {
+                // 2. 设置转换参数
+                Resolution resolution = new Resolution(300); // 设置输出分辨率为 300 DPI[reference:6]
+                PngDevice pngDevice = new PngDevice(resolution);
+                // 可以启用字体提示来提升文本清晰度[reference:7]
+                // pngDevice.RenderingOptions = new RenderingOptions() { UseFontHinting = true };
+
+                // 3. 遍历每一页并进行转换
+                for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
+                {
+                    if (!Directory.Exists(Application.StartupPath + @"\" + "111"))
+                    {
+                        Directory.CreateDirectory(Application.StartupPath + @"\" + "111");
+                    }
+
+                    string imagePath = Path.Combine(Application.StartupPath + @"\" + "111", $"image_{pageCount}.png");
+                    using (FileStream imageStream = new FileStream(imagePath, FileMode.Create))
+                    {
+                        pngDevice.Process(pdfDocument.Pages[pageCount], imageStream);
+                    }
+                }
+            }
+        }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            Workbook workbook = new Workbook("C:\\Users\\callm\\Desktop\\客户资料\\次元\\SOP测试文件\\巴拿马组装SOP--测试.xlsx");
+            ImageOrPrintOptions options = new ImageOrPrintOptions
+            {
+                ImageFormat = ImageFormat.Jpeg,
+                OnePagePerSheet = true,
+                HorizontalResolution = 150,
+                VerticalResolution = 150
+            };
+
+            // 遍历所有工作表
+            for (int sheetIndex = 0; sheetIndex < workbook.Worksheets.Count; sheetIndex++)
+            {
+                Worksheet sheet = workbook.Worksheets[sheetIndex];
+                SheetRender renderer = new SheetRender(sheet, options);
+                string fileName = $"sheet_{sheetIndex + 1}.jpg";
+                renderer.ToImage(0, Application.StartupPath + @"\111\" + fileName + ".png");
+                Console.WriteLine($"已保存: {fileName}");
+            }
+        }
     }
     }
 }
 }

+ 15 - 0
UAS_MES_YDCY/FunctionCode/Query/Query_SOP_CY.resx

@@ -135,4 +135,19 @@
   <metadata name="issend.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="issend.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
     <value>True</value>
   </metadata>
   </metadata>
+  <metadata name="CheckColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="fp_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="fp_path.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="psd_iskey.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="issend.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
 </root>