Pārlūkot izejas kodu

标签打印功能添加

callm 2 mēneši atpakaļ
vecāks
revīzija
39643f4358

+ 1 - 1
UAS_MES_JC/FunctionCode/Query/Query_SN.cs

@@ -168,7 +168,7 @@ namespace UAS_MES_NEW.Query
             DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_radix,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + pr_exbarcode + "' order by nrd_detno", "select");
             //如果没有则取公共规则
             if (Nr.Rows.Count == 0)
-                Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode is null and nr_isdefault <> 0 order by nrd_detno", "select");
+                Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='机柜' order by nrd_detno", "select");
             //用于过滤参数的正则表达式
             Regex match = new Regex("{\\w+}");
             //用于存放每一项的明细的数据

+ 344 - 0
UAS_MES_JC/FunctionCode/Query/Query_SN1.Designer.cs

@@ -0,0 +1,344 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_SN1
+    {
+        /// <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.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_SN));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.PrintNum = new System.Windows.Forms.NumericUpDown();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.pr_detail = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.lade = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
+            this.ma_printcount = new System.Windows.Forms.Label();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.PrintFuseLabel = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.PrintByBatch = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(79, 172);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 11;
+            this.label5.Text = "产品代码";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(79, 39);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 216;
+            this.label1.Text = "工单编号";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(111, 298);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.TabIndex = 220;
+            this.label2.Text = "打印机";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(143, 369);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.TabIndex = 219;
+            this.label3.Text = "标签";
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.Location = new System.Drawing.Point(264, 460);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Size = new System.Drawing.Size(120, 35);
+            this.PrintNum.TabIndex = 222;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(79, 454);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 41);
+            this.label4.TabIndex = 223;
+            this.label4.Text = "打印数量";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(79, 237);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(146, 41);
+            this.label6.TabIndex = 226;
+            this.label6.Text = "产品名称";
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(257, 237);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 227;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(79, 105);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 228;
+            this.label7.Text = "工单数量";
+            // 
+            // lade
+            // 
+            this.lade.AutoSize = true;
+            this.lade.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lade.Location = new System.Drawing.Point(400, 105);
+            this.lade.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lade.Name = "lade";
+            this.lade.Size = new System.Drawing.Size(146, 41);
+            this.lade.TabIndex = 229;
+            this.lade.Text = "已打印数";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(257, 105);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.TabIndex = 230;
+            // 
+            // ma_printcount
+            // 
+            this.ma_printcount.AutoSize = true;
+            this.ma_printcount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_printcount.Location = new System.Drawing.Point(558, 105);
+            this.ma_printcount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_printcount.Name = "ma_printcount";
+            this.ma_printcount.Size = new System.Drawing.Size(0, 41);
+            this.ma_printcount.TabIndex = 231;
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = null;
+            this.pr_code.BackColor = System.Drawing.Color.White;
+            this.pr_code.ID = null;
+            this.pr_code.Location = new System.Drawing.Point(264, 181);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = null;
+            this.pr_code.Size = new System.Drawing.Size(388, 35);
+            this.pr_code.Str = null;
+            this.pr_code.Str1 = null;
+            this.pr_code.Str2 = null;
+            this.pr_code.TabIndex = 225;
+            this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(785, 39);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(666, 986);
+            this.OperateResult.TabIndex = 224;
+            this.OperateResult.Text = "";
+            // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(264, 375);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(388, 32);
+            this.PrintLabel.TabIndex = 221;
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Location = new System.Drawing.Point(264, 304);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(8);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(388, 50);
+            this.PrinterList.TabIndex = 218;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = "IFALL";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = "";
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(264, 39);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = "";
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(409, 46);
+            this.ma_code.TabIndex = 217;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
+            this.ma_code.DbChange += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.DBSourceChange(this.pr_code_DbChange);
+            // 
+            // PrintFuseLabel
+            // 
+            this.PrintFuseLabel.AccessibleRole = System.Windows.Forms.AccessibleRole.PageTabList;
+            this.PrintFuseLabel.AllPower = null;
+            this.PrintFuseLabel.BackColor = System.Drawing.Color.Transparent;
+            this.PrintFuseLabel.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintFuseLabel.DownImage")));
+            this.PrintFuseLabel.Image = null;
+            this.PrintFuseLabel.IsShowBorder = true;
+            this.PrintFuseLabel.Location = new System.Drawing.Point(502, 544);
+            this.PrintFuseLabel.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintFuseLabel.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintFuseLabel.MoveImage")));
+            this.PrintFuseLabel.Name = "PrintFuseLabel";
+            this.PrintFuseLabel.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintFuseLabel.NormalImage")));
+            this.PrintFuseLabel.Power = null;
+            this.PrintFuseLabel.Size = new System.Drawing.Size(150, 56);
+            this.PrintFuseLabel.TabIndex = 27;
+            this.PrintFuseLabel.Text = "打印";
+            this.PrintFuseLabel.UseVisualStyleBackColor = false;
+            this.PrintFuseLabel.Click += new System.EventHandler(this.Print_Click);
+            // 
+            // PrintByBatch
+            // 
+            this.PrintByBatch.AccessibleRole = System.Windows.Forms.AccessibleRole.PageTabList;
+            this.PrintByBatch.AllPower = null;
+            this.PrintByBatch.BackColor = System.Drawing.Color.Transparent;
+            this.PrintByBatch.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintByBatch.DownImage")));
+            this.PrintByBatch.Image = null;
+            this.PrintByBatch.IsShowBorder = true;
+            this.PrintByBatch.Location = new System.Drawing.Point(264, 544);
+            this.PrintByBatch.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintByBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintByBatch.MoveImage")));
+            this.PrintByBatch.Name = "PrintByBatch";
+            this.PrintByBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintByBatch.NormalImage")));
+            this.PrintByBatch.Power = null;
+            this.PrintByBatch.Size = new System.Drawing.Size(150, 56);
+            this.PrintByBatch.TabIndex = 239;
+            this.PrintByBatch.Text = "生成条码";
+            this.PrintByBatch.UseVisualStyleBackColor = false;
+            this.PrintByBatch.Click += new System.EventHandler(this.PrintByBatch_Click);
+            // 
+            // Query_SN
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1494, 1075);
+            this.Controls.Add(this.PrintByBatch);
+            this.Controls.Add(this.ma_printcount);
+            this.Controls.Add(this.ma_qty);
+            this.Controls.Add(this.lade);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.PrintLabel);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.PrintFuseLabel);
+            this.Controls.Add(this.label5);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Query_SN";
+            this.Tag = "Query!SpecialReport";
+            this.Text = "Query_SpecialReport";
+            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.ButtonUtil.NormalButton PrintFuseLabel;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+        private System.Windows.Forms.NumericUpDown PrintNum;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label pr_detail;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label lade;
+        private System.Windows.Forms.Label ma_qty;
+        private System.Windows.Forms.Label ma_printcount;
+        private CustomControl.ButtonUtil.NormalButton PrintByBatch;
+    }
+}

+ 267 - 0
UAS_MES_JC/FunctionCode/Query/Query_SN1.cs

@@ -0,0 +1,267 @@
+using DevExpress.Printing.Core.PdfExport.Metafile;
+using HslCommunication;
+using LabelManager2;
+using Seagull.BarTender.Print;
+using System;
+using System.Data;
+using System.Drawing;
+using System.Security.Cryptography;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_SN1 : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        Engine engine;
+
+        Thread InitPrint;
+
+        DataTable Dbfind;
+
+        Document doc;
+
+        DataTable _dt;
+
+        public Query_SN1()
+        {
+            InitializeComponent();
+        }
+
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
+
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单编号,pr_code # 产品编号,pr_spec # 型号";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += pr_code_DbChange;
+        }
+
+        private void pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail,ma_printnum from make left join product on ma_prodcode=pr_code left join (select count(1)ma_printnum,msl_makecode from makesnlist where msl_printstatus=-1 group by msl_makecode) on msl_makecode=ma_code where ma_code='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                pr_code.Text = dt.Rows[0]["ma_prodcode"].ToString();
+                ma_qty.Text = dt.Rows[0]["ma_qty"].ToString();
+                ma_printcount.Text = dt.Rows[0]["ma_printnum"].ToString();
+                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+            }
+        }
+
+        private void InPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception)
+            {
+                MessageBox.Show("未正确安装BarTender软件");
+            }
+        }
+
+        private void Print_Click(object sender, EventArgs e)
+        {
+            DataTable dt = new DataTable();
+            string ErrorMessage = "";
+            dt = (DataTable)dh.ExecuteSql("select msl_sncode from makesnlist where msl_makecode='" + ma_code.Text + "' and nvl(msl_printstatus,0)=0   order by msl_sncode", "select");
+            if (dt.Rows.Count < PrintNum.Value)
+            {
+                OperateResult.AppendText("未打印数量不足,剩余" + dt.Rows.Count + "未打印\n");
+                return;
+            }
+            for (int i = 0; i < PrintNum.Value; i++)
+            {
+                string mil_sncode = dt.Rows[i]["msl_sncode"].ToString();
+                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, mil_sncode, int.Parse("1"), ma_code.Text, pr_code.Text, "机身标", "0", out ErrorMessage))
+                {
+                    //提示用户打印成功
+                    dh.ExecuteSql("update makesnlist set msl_printstatus=-1 where msl_sncode='" + mil_sncode + "'", "update");
+                    OperateResult.AppendText(">>序列号:" + mil_sncode + "打印结束\n", Color.Green);
+                }
+                else
+                {
+                    dh.ExecuteSql("update makesnlist set msl_printstatus=-1where msl_sncode='" + mil_sncode + "'", "update");
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                }
+            }
+            dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail,ma_printnum from make left join product on ma_prodcode=pr_code left join (select count(1)ma_printnum,msl_makecode from makesnlist where msl_printstatus=-1 group by msl_makecode) on msl_makecode=ma_code where ma_code='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                pr_code.Text = dt.Rows[0]["ma_prodcode"].ToString();
+                ma_qty.Text = dt.Rows[0]["ma_qty"].ToString();
+                ma_printcount.Text = dt.Rows[0]["ma_printnum"].ToString();
+                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+            }
+        }
+
+        private void pr_code_TextChanged(object sender, EventArgs e)
+        {
+            _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='SN标签' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            if (_dt.Rows.Count == 0)
+            {
+                _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode is null and la_templatetype='SN标签' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            }
+            PrintLabel.DataSource = _dt;
+            PrintLabel.DisplayMember = "la_url";
+            PrintLabel.ValueMember = "la_id";
+        }
+
+        private void PrintByBatch_Click(object sender, EventArgs e)
+        {
+            string Prefix = "";
+            string Suffix = "";
+            //获取编码规则
+            if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
+            {
+                MessageBox.Show("工单号不存在");
+                return;
+            }
+            DataTable dt = (DataTable)dh.ExecuteSql("select pr_exbarcode,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code.Text + "'", "select");
+            string pr_exbarcode = "";
+            string ma_qty = "";
+            if (dt.Rows.Count > 0)
+            {
+                pr_exbarcode = dt.Rows[0]["pr_exbarcode"].ToString();
+                ma_qty = dt.Rows[0]["ma_qty"].ToString();
+            }
+            if (dh.getRowCount("makesnlist", "msl_makecode='" + ma_code.Text + "'") + int.Parse(ma_qty) > int.Parse(ma_qty))
+            {
+                MessageBox.Show("工单号" + ma_code.Text + "生产序列号超出工单数");
+                return;
+            }
+            DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_radix,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + pr_exbarcode + "' order by nrd_detno", "select");
+            //如果没有则取公共规则
+            if (Nr.Rows.Count == 0)
+                Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code ='模块' order by nrd_detno", "select");
+            //用于过滤参数的正则表达式
+            Regex match = new Regex("{\\w+}");
+            //用于存放每一项的明细的数据
+            string[] NrData = new string[Nr.Rows.Count];
+            //流水号的索引
+            int SerialNumIndex = 0;
+            //流水长度
+            int SerialNumLength = 0;
+            //存放键值对
+            int Radix = 10;
+            string PrefixFixed = "";
+            for (int m = 0; m < Nr.Rows.Count; m++)
+            {
+                switch (Nr.Rows[m]["nrd_type"].ToString())
+                {
+                    //常量直接进行拼接
+                    case "常量":
+                        NrData[m] = Nr.Rows[m]["nrd_sql"].ToString();
+                        Prefix += NrData[m];
+                        Suffix += NrData[m];
+                        break;
+                    case "SQL":
+                        string SQL = Nr.Rows[m]["nrd_sql"].ToString();
+                        DataTable Temp;
+                        //如果不包含参数替换
+                        if (SQL.IndexOf("{") == 0)
+                        {
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        else
+                        {
+                            //替换参数后重新执行SQL
+                            foreach (Match mch in match.Matches(SQL))
+                            {
+                                SQL = SQL.Replace(mch.Value.Trim(), "'" + ma_code.Text + "'");
+                            }
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        if (Temp.Rows.Count > 0)
+                        {
+                            NrData[m] = Temp.Rows[0][0].ToString();
+                            Prefix += NrData[m];
+                            Suffix += NrData[m];
+                        }
+                        else
+                        {
+                            NrData[m] = "";
+                            Prefix += NrData[m];
+                            Suffix += NrData[m];
+                        }
+                        break;
+                    //流水需要通过MaxNumber去取
+                    case "流水":
+                        NrData[m] = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "'").ToString();
+                        Suffix = "";
+                        PrefixFixed = Prefix;
+                        //设置当前流水
+                        custserialnum = int.Parse(NrData[m] == "" ? "0" : NrData[m]);
+                        SerialNumIndex = m;
+                        SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
+                        Radix = int.Parse(Nr.Rows[m]["nrd_radix"].ToString());
+                        break;
+                    default:
+                        break;
+                }
+            }
+            //获取最大的流水号
+            string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'").ToString();
+            //如果流水号为空则插入一条新记录,从1开始取
+            if (maxnum == "")
+            {
+                dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + pr_exbarcode + "','" + Prefix + "','1')", "insert");
+                custserialnum = 1;
+            }
+            //如果流水号不为空则取当前流水
+            else
+            {
+                custserialnum = int.Parse(maxnum);
+            }
+            //遍历整个Grid,勾选的项目全部进行条码生成
+            ArrayList<string> custbarcode = new ArrayList<string>();
+            for (int i = 0; i < int.Parse(ma_qty); i++)
+            {
+                string data = BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix);
+                if (!custbarcode.Contains(data))
+                    custbarcode.Add(data);
+            }
+            //插入条码
+            string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE,msl_status)" +
+                "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before',0 from dual where :custbarcode not in " +
+                "(select msl_sncode from makesnlist)";
+            dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
+            //更新最大流水号
+            dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'");
+            MessageBox.Show("工单" + ma_code.Text + "生成SN清单成功");
+        }
+        int custserialnum = 0;
+        public string BarcodeMethod1(string Prefix, string Suffix, int Index, int Length, int radix)
+        {
+            string str = Prefix;
+            //如果是流水则需要在前面加0
+            string serialcode = BaseUtil.DToAny(custserialnum, radix);
+            for (int j = serialcode.ToString().Length; j < Length; j++)
+            {
+                serialcode = "0" + serialcode;
+            }
+            str += serialcode;
+            str += Suffix;
+            custserialnum = custserialnum + 1;
+            return str;
+        }
+    }
+}

+ 200 - 0
UAS_MES_JC/FunctionCode/Query/Query_SN1.resx

@@ -0,0 +1,200 @@
+<?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>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="PrintFuseLabel.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="PrintFuseLabel.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="PrintFuseLabel.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="PrintByBatch.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="PrintByBatch.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="PrintByBatch.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 1 - 1
UAS_MES_JC/PublicMethod/ftpOperater.cs

@@ -23,7 +23,7 @@ namespace UAS_MES_NEW.PublicMethod
 
         public ftpOperater()
         {
-            string[] FTPInf = "ftp://172.16.51.3|vsftpd|vsftpd3cd79014ef".Split('|');
+            string[] FTPInf = "ftp://10.1.81.208|vsftpd|vsftpd3cd79014ef".Split('|');
             this.ftpServerIP = FTPInf[0];
             this.ftpUser = FTPInf[1];
             this.ftpPwd = FTPInf[2];

+ 9 - 0
UAS_MES_JC/UAS_MES_JC.csproj

@@ -1013,6 +1013,12 @@
     <Compile Include="FunctionCode\Query\Query_DateRate.Designer.cs">
       <DependentUpon>Query_DateRate.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_SN1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_SN1.Designer.cs">
+      <DependentUpon>Query_SN1.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_SOP.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1726,6 +1732,9 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_DateRate.resx">
       <DependentUpon>Query_DateRate.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_SN1.resx">
+      <DependentUpon>Query_SN1.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SOP.resx">
       <DependentUpon>Query_SOP.cs</DependentUpon>
     </EmbeddedResource>