瀏覽代碼

外挂插件调整

callm 1 年之前
父節點
當前提交
7cb947528e

+ 8 - 1
FileWatcher/AutoAnalysisXml.Designer.cs

@@ -49,6 +49,7 @@
             this.label3 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.MAC = new System.Windows.Forms.RadioButton();
             this.MAC = new System.Windows.Forms.RadioButton();
             this.SN = new System.Windows.Forms.RadioButton();
             this.SN = new System.Windows.Forms.RadioButton();
+            this.GetFiles = new System.Windows.Forms.Timer(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
@@ -254,6 +255,11 @@
             this.SN.Text = "SN";
             this.SN.Text = "SN";
             this.SN.UseVisualStyleBackColor = true;
             this.SN.UseVisualStyleBackColor = true;
             // 
             // 
+            // GetFiles
+            // 
+            this.GetFiles.Interval = 60000;
+            this.GetFiles.Tick += new System.EventHandler(this.GetFiles_Tick);
+            // 
             // AutoAnalysisXml
             // AutoAnalysisXml
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
@@ -279,7 +285,7 @@
             this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.MaximizeBox = false;
             this.MaximizeBox = false;
             this.Name = "AutoAnalysisXml";
             this.Name = "AutoAnalysisXml";
-            this.Text = "UAS自动过站解析器 2024-03-04";
+            this.Text = "UAS自动过站解析器 2024-06-04";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.Load += new System.EventHandler(this.Form1_Load);
             this.Load += new System.EventHandler(this.Form1_Load);
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).EndInit();
@@ -310,6 +316,7 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.RadioButton SN;
         private System.Windows.Forms.RadioButton SN;
         private System.Windows.Forms.RadioButton MAC;
         private System.Windows.Forms.RadioButton MAC;
+        private System.Windows.Forms.Timer GetFiles;
     }
     }
 }
 }
 
 

+ 14 - 37
FileWatcher/AutoAnalysisXml.cs

@@ -83,7 +83,6 @@ namespace FileWatcher
             FormBorderStyle = FormBorderStyle.FixedSingle;
             FormBorderStyle = FormBorderStyle.FixedSingle;
             InitDB = new Thread(ConnectDB);
             InitDB = new Thread(ConnectDB);
             //添加监控事件
             //添加监控事件
-            XmlWatcher.Created += new FileSystemEventHandler(XmlWatcher_Created);
             SetLoadingWindow stw = new SetLoadingWindow(InitDB, "正在启动程序");
             SetLoadingWindow stw = new SetLoadingWindow(InitDB, "正在启动程序");
             stw.StartPosition = FormStartPosition.CenterScreen;
             stw.StartPosition = FormStartPosition.CenterScreen;
             stw.ShowDialog();
             stw.ShowDialog();
@@ -154,9 +153,6 @@ namespace FileWatcher
                 OperateResult.AppendText("工单不存在或者未下放\n");
                 OperateResult.AppendText("工单不存在或者未下放\n");
                 return;
                 return;
             }
             }
-            XmlWatcher.Path = FolderPath.Text;
-            XmlWatcher.Filter = "*.txt";
-            XmlWatcher.EnableRaisingEvents = true;
             //设置缓存数据
             //设置缓存数据
             //BaseUtil.SetCacheData("FolderPath", FolderPath.Text);
             //BaseUtil.SetCacheData("FolderPath", FolderPath.Text);
             //BaseUtil.SetCacheData("BackUpFolderPath", BackUpFolderPath.Text);
             //BaseUtil.SetCacheData("BackUpFolderPath", BackUpFolderPath.Text);
@@ -168,6 +164,7 @@ namespace FileWatcher
             Master.Enabled = false;
             Master.Enabled = false;
             ma_code.Enabled = false;
             ma_code.Enabled = false;
             StopWatch.Enabled = true;
             StopWatch.Enabled = true;
+            GetFiles.Start();
             OperateResult.AppendText("开始执行监控\n");
             OperateResult.AppendText("开始执行监控\n");
         }
         }
 
 
@@ -178,35 +175,6 @@ namespace FileWatcher
             parentNode.AppendChild(node);
             parentNode.AppendChild(node);
         }
         }
 
 
-        private void XmlWatcher_Created(object sender, FileSystemEventArgs e)
-        {
-            while (true)
-            {
-                try
-                {
-                    using (Stream stream = File.Open(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read))
-                    {
-                        if (stream != null)
-                            break;
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Console.WriteLine(ex.Message);
-                }
-            }
-            switch (e.Name.Substring(e.Name.LastIndexOf(".") + 1).ToUpper())
-            {
-                case "TXT":
-                    TxtHandleProcess(e.FullPath);
-                    break;
-                case "XML":
-                    XmlHandleProcess(e.FullPath);
-                    break;
-                default:
-                    break;
-            }
-        }
         string nextLine;
         string nextLine;
         private void TxtHandleProcess(string FileName)
         private void TxtHandleProcess(string FileName)
         {
         {
@@ -327,7 +295,7 @@ namespace FileWatcher
                 try
                 try
                 {
                 {
                     string filename = FileName;
                     string filename = FileName;
-                    if (filename.Substring(filename.LastIndexOf(".") + 1).ToUpper() == "TXT")
+                    if (filename.Substring(filename.LastIndexOf(".") + 1).ToUpper() == "TXT" && !filename.ToUpper().Contains("TEMP"))
                     {
                     {
                         string folderpath = FileName.Substring(0, FileName.LastIndexOf(@"\"));
                         string folderpath = FileName.Substring(0, FileName.LastIndexOf(@"\"));
                         string SN = FileName.Substring(FileName.LastIndexOf(@"\") + 1).Replace("-", "/").ToUpper().Replace(".TXT", "");
                         string SN = FileName.Substring(FileName.LastIndexOf(@"\") + 1).Replace("-", "/").ToUpper().Replace(".TXT", "");
@@ -429,7 +397,7 @@ namespace FileWatcher
                                     {
                                     {
                                         Console.WriteLine(ex.Message);
                                         Console.WriteLine(ex.Message);
                                     }
                                     }
-                                   
+
                                 }
                                 }
                                 else
                                 else
                                 {
                                 {
@@ -446,8 +414,8 @@ namespace FileWatcher
                                 tipform.startthread(oErrMessage, Result);
                                 tipform.startthread(oErrMessage, Result);
                             }
                             }
                         }
                         }
+                        OperateResult.AppendText("解析成功:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n" + FileName + "\n");
                     }
                     }
-                    OperateResult.AppendText("解析成功:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n" + FileName + "\n");
                 }
                 }
                 catch (Exception e)
                 catch (Exception e)
                 {
                 {
@@ -676,8 +644,8 @@ namespace FileWatcher
             ma_code.Enabled = true;
             ma_code.Enabled = true;
             Master.Enabled = true;
             Master.Enabled = true;
             ChooseFolder.Enabled = true;
             ChooseFolder.Enabled = true;
-
             StopWatch.Enabled = false;
             StopWatch.Enabled = false;
+            GetFiles.Stop();
             OperateResult.AppendText("停止执行监控\n");
             OperateResult.AppendText("停止执行监控\n");
         }
         }
 
 
@@ -758,5 +726,14 @@ namespace FileWatcher
         {
         {
             dh.ExecuteSql("select sysdate from dual", "select");
             dh.ExecuteSql("select sysdate from dual", "select");
         }
         }
+
+        private void GetFiles_Tick(object sender, EventArgs e)
+        {
+            var AllXmls = Directory.GetFiles(FolderPath.Text, "*.txt");
+            foreach (var Xml in AllXmls)
+            {
+                TxtHandleProcess(Xml);
+            }
+        }
     }
     }
 }
 }

+ 3 - 0
FileWatcher/AutoAnalysisXml.resx

@@ -126,4 +126,7 @@
   <metadata name="Timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   <metadata name="Timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>296, 17</value>
     <value>296, 17</value>
   </metadata>
   </metadata>
+  <metadata name="GetFiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>435, 17</value>
+  </metadata>
 </root>
 </root>

+ 1 - 2
FileWatcher/AutoMakeQTY.Designer.cs

@@ -125,7 +125,7 @@
             // 
             // 
             // Timer
             // Timer
             // 
             // 
-            this.Timer.Interval = 5000;
+            this.Timer.Interval = 2000;
             this.Timer.Tick += new System.EventHandler(this.Timer_Tick);
             this.Timer.Tick += new System.EventHandler(this.Timer_Tick);
             // 
             // 
             // ATEFile
             // ATEFile
@@ -179,7 +179,6 @@
             this.label2.Size = new System.Drawing.Size(75, 38);
             this.label2.Size = new System.Drawing.Size(75, 38);
             this.label2.TabIndex = 22;
             this.label2.TabIndex = 22;
             this.label2.Text = "串口";
             this.label2.Text = "串口";
-            this.label2.Visible = false;
             // 
             // 
             // label3
             // label3
             // 
             // 

+ 1 - 25
FileWatcher/AutoMakeQTY.cs

@@ -36,15 +36,6 @@ namespace FileWatcher
         string isource;
         string isource;
 
 
         Thread InitDB;
         Thread InitDB;
-        /// <summary>
-        /// 线别
-        /// </summary>
-        string ilinecode;
-        /// <summary>
-        /// 不良代码组
-        /// </summary>
-        string ibadgroup;
-        /// <summary>
         /// 当前工序
         /// 当前工序
         /// </summary>
         /// </summary>
         string istepcode;
         string istepcode;
@@ -57,12 +48,6 @@ namespace FileWatcher
         /// 缓存的文件夹
         /// 缓存的文件夹
         /// </summary>
         /// </summary>
         public static string CachePathFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":/UAS_MES/XmlAnalysor/";
         public static string CachePathFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":/UAS_MES/XmlAnalysor/";
-        /// <summary>
-        /// 需要解析的文件名
-        /// </summary>
-        List<string> _FileName = new List<string>();
-
-        string master = "HUAG";
 
 
         ftpOperater ftp = new ftpOperater();
         ftpOperater ftp = new ftpOperater();
 
 
@@ -101,15 +86,6 @@ namespace FileWatcher
                 BaudRate.Text = BaseUtil.GetCacheData("BaudRate").ToString();
                 BaudRate.Text = BaseUtil.GetCacheData("BaudRate").ToString();
             }
             }
             catch (Exception ex) { MessageBox.Show(ex.Message); }
             catch (Exception ex) { MessageBox.Show(ex.Message); }
-            //获取岗位资源相关信息
-            DataTable dt = (DataTable)dh.ExecuteSql("select sc_linecode,sc_stepcode,st_badgroupcode from source left join step on sc_stepcode=st_code where sc_code='" + isource + "'", "select");
-            if (dt.Rows.Count > 0)
-            {
-                ilinecode = dt.Rows[0]["sc_linecode"].ToString();
-                istepcode = dt.Rows[0]["sc_stepcode"].ToString();
-                ibadgroup = dt.Rows[0]["st_badgroupcode"].ToString();
-            }
-            //StartWatch.PerformClick();
         }
         }
 
 
         private void SerialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
         private void SerialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
@@ -124,7 +100,7 @@ namespace FileWatcher
             double Num4 = double.Parse(data.Substring(14, 2)) * 10;
             double Num4 = double.Parse(data.Substring(14, 2)) * 10;
             double Num5 = double.Parse(data.Substring(16, 2));
             double Num5 = double.Parse(data.Substring(16, 2));
             double qty = Num1 + Num2 + Num3 + Num4 + Num5;
             double qty = Num1 + Num2 + Num3 + Num4 + Num5;
-            Console.WriteLine(qty);
+            NowQTY.Text = qty.ToString();
         }
         }
 
 
         private void ConnectDB()
         private void ConnectDB()

+ 2 - 2
FileWatcher/DataHelper.cs

@@ -9,9 +9,9 @@ namespace FileWatcher
    public class DataHelper
    public class DataHelper
     {
     {
         //系统默认的的连接字符串
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11660)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=HUAG;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
         //用户选择的数据库的连接字符串
-        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11660)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=HUAG;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         public static OracleConnection connection = null;
         public static OracleConnection connection = null;
         OracleCommand command = null;
         OracleCommand command = null;
         int ReconnectTime = 0;
         int ReconnectTime = 0;

+ 74 - 155
FileWatcher/Form4.Designer.cs

@@ -28,33 +28,19 @@
         /// </summary>
         /// </summary>
         private void InitializeComponent()
         private void InitializeComponent()
         {
         {
-            this.label6 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.FolderPath = new System.Windows.Forms.TextBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.textBox1 = new System.Windows.Forms.TextBox();
-            this.label7 = new System.Windows.Forms.Label();
-            this.textBox2 = new System.Windows.Forms.TextBox();
-            this.label8 = new System.Windows.Forms.Label();
-            this.textBox3 = new System.Windows.Forms.TextBox();
-            this.label9 = new System.Windows.Forms.Label();
             this.StartWatch = new System.Windows.Forms.Button();
             this.StartWatch = new System.Windows.Forms.Button();
-            this.button1 = new System.Windows.Forms.Button();
-            this.textBox4 = new System.Windows.Forms.TextBox();
-            this.label5 = new System.Windows.Forms.Label();
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            this.Column1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.料号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.物料名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.物料规格 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(89, 135);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(106, 24);
-            this.label6.TabIndex = 7;
-            this.label6.Text = "稽查内容";
-            // 
             // label2
             // label2
             // 
             // 
             this.label2.AutoSize = true;
             this.label2.AutoSize = true;
@@ -66,97 +52,16 @@
             // label1
             // label1
             // 
             // 
             this.label1.AutoSize = true;
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(89, 59);
+            this.label1.Location = new System.Drawing.Point(125, 109);
             this.label1.Name = "label1";
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(106, 24);
             this.label1.Size = new System.Drawing.Size(106, 24);
             this.label1.TabIndex = 1;
             this.label1.TabIndex = 1;
             this.label1.Text = "单据编号";
             this.label1.Text = "单据编号";
             // 
             // 
-            // FolderPath
-            // 
-            this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(270, 132);
-            this.FolderPath.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.FolderPath.Name = "FolderPath";
-            this.FolderPath.Size = new System.Drawing.Size(295, 35);
-            this.FolderPath.TabIndex = 8;
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(89, 301);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(106, 24);
-            this.label3.TabIndex = 9;
-            this.label3.Text = "上传附件";
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(89, 243);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(130, 24);
-            this.label4.TabIndex = 10;
-            this.label4.Text = "指定处理人";
-            // 
-            // textBox1
-            // 
-            this.textBox1.Enabled = false;
-            this.textBox1.Location = new System.Drawing.Point(270, 243);
-            this.textBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(295, 35);
-            this.textBox1.TabIndex = 11;
-            // 
-            // label7
-            // 
-            this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(89, 519);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(106, 24);
-            this.label7.TabIndex = 12;
-            this.label7.Text = "上传附件";
-            // 
-            // textBox2
-            // 
-            this.textBox2.Enabled = false;
-            this.textBox2.Location = new System.Drawing.Point(270, 369);
-            this.textBox2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(295, 35);
-            this.textBox2.TabIndex = 14;
-            // 
-            // label8
-            // 
-            this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(89, 369);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(130, 24);
-            this.label8.TabIndex = 13;
-            this.label8.Text = "变更处理人";
-            // 
-            // textBox3
-            // 
-            this.textBox3.Enabled = false;
-            this.textBox3.Location = new System.Drawing.Point(270, 448);
-            this.textBox3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.textBox3.Name = "textBox3";
-            this.textBox3.Size = new System.Drawing.Size(295, 35);
-            this.textBox3.TabIndex = 16;
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(89, 448);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(106, 24);
-            this.label9.TabIndex = 15;
-            this.label9.Text = "改善措施";
-            // 
             // StartWatch
             // StartWatch
             // 
             // 
             this.StartWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.StartWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StartWatch.Location = new System.Drawing.Point(186, 649);
+            this.StartWatch.Location = new System.Drawing.Point(290, 686);
             this.StartWatch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StartWatch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StartWatch.Name = "StartWatch";
             this.StartWatch.Name = "StartWatch";
             this.StartWatch.Size = new System.Drawing.Size(128, 56);
             this.StartWatch.Size = new System.Drawing.Size(128, 56);
@@ -164,81 +69,95 @@
             this.StartWatch.Text = "保存";
             this.StartWatch.Text = "保存";
             this.StartWatch.UseVisualStyleBackColor = true;
             this.StartWatch.UseVisualStyleBackColor = true;
             // 
             // 
-            // button1
+            // dataGridView1
+            // 
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column1,
+            this.料号,
+            this.物料名称,
+            this.物料规格});
+            this.dataGridView1.Location = new System.Drawing.Point(129, 176);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.RowHeadersWidth = 82;
+            this.dataGridView1.RowTemplate.Height = 37;
+            this.dataGridView1.Size = new System.Drawing.Size(489, 150);
+            this.dataGridView1.TabIndex = 21;
+            // 
+            // Column1
             // 
             // 
-            this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button1.Location = new System.Drawing.Point(369, 649);
-            this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(128, 56);
-            this.button1.TabIndex = 18;
-            this.button1.Text = "确认处理";
-            this.button1.UseVisualStyleBackColor = true;
+            this.Column1.HeaderText = "勾选";
+            this.Column1.MinimumWidth = 10;
+            this.Column1.Name = "Column1";
+            this.Column1.Width = 200;
             // 
             // 
-            // textBox4
+            // 料号
             // 
             // 
-            this.textBox4.Enabled = false;
-            this.textBox4.Location = new System.Drawing.Point(270, 188);
-            this.textBox4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.textBox4.Name = "textBox4";
-            this.textBox4.Size = new System.Drawing.Size(295, 35);
-            this.textBox4.TabIndex = 20;
+            this.料号.HeaderText = "料号";
+            this.料号.MinimumWidth = 10;
+            this.料号.Name = "料号";
+            this.料号.Width = 200;
             // 
             // 
-            // label5
+            // 物料名称
             // 
             // 
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(89, 191);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(58, 24);
-            this.label5.TabIndex = 19;
-            this.label5.Text = "地点";
+            this.物料名称.HeaderText = "名称";
+            this.物料名称.MinimumWidth = 10;
+            this.物料名称.Name = "物料名称";
+            this.物料名称.Width = 200;
+            // 
+            // 物料规格
+            // 
+            this.物料规格.HeaderText = "规格";
+            this.物料规格.MinimumWidth = 10;
+            this.物料规格.Name = "物料规格";
+            this.物料规格.Width = 200;
+            // 
+            // textBox1
+            // 
+            this.textBox1.Location = new System.Drawing.Point(254, 498);
+            this.textBox1.Name = "textBox1";
+            this.textBox1.Size = new System.Drawing.Size(334, 35);
+            this.textBox1.TabIndex = 22;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(130, 501);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(82, 24);
+            this.label3.TabIndex = 23;
+            this.label3.Text = "机台号";
             // 
             // 
             // Form4
             // Form4
             // 
             // 
             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(1419, 820);
             this.ClientSize = new System.Drawing.Size(1419, 820);
-            this.Controls.Add(this.textBox4);
-            this.Controls.Add(this.label5);
-            this.Controls.Add(this.button1);
-            this.Controls.Add(this.StartWatch);
-            this.Controls.Add(this.textBox3);
-            this.Controls.Add(this.label9);
-            this.Controls.Add(this.textBox2);
-            this.Controls.Add(this.label8);
-            this.Controls.Add(this.label7);
-            this.Controls.Add(this.textBox1);
-            this.Controls.Add(this.label4);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label3);
-            this.Controls.Add(this.FolderPath);
-            this.Controls.Add(this.label6);
+            this.Controls.Add(this.textBox1);
+            this.Controls.Add(this.dataGridView1);
+            this.Controls.Add(this.StartWatch);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.label1);
             this.Name = "Form4";
             this.Name = "Form4";
             this.Text = "Form4";
             this.Text = "Form4";
             this.Load += new System.EventHandler(this.Form4_Load);
             this.Load += new System.EventHandler(this.Form4_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
         }
         }
 
 
         #endregion
         #endregion
-
-        private System.Windows.Forms.Label label6;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.TextBox FolderPath;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.TextBox textBox1;
-        private System.Windows.Forms.Label label7;
-        private System.Windows.Forms.TextBox textBox2;
-        private System.Windows.Forms.Label label8;
-        private System.Windows.Forms.TextBox textBox3;
-        private System.Windows.Forms.Label label9;
         private System.Windows.Forms.Button StartWatch;
         private System.Windows.Forms.Button StartWatch;
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.TextBox textBox4;
-        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.DataGridView dataGridView1;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 料号;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 物料名称;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 物料规格;
+        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.Label label3;
     }
     }
 }
 }

+ 63 - 44
FileWatcher/Form4.cs

@@ -38,50 +38,68 @@ namespace FileWatcher
         {
         {
 
 
         }
         }
+        Thread InitDB;
+        Thread InitDB1;
+        Thread InitDB2;
+        Thread InitDB3;
+        DataTable dt;
         //DataHelper dh = new DataHelper();
         //DataHelper dh = new DataHelper();
+       
         private void Form4_Load(object sender, EventArgs e)
         private void Form4_Load(object sender, EventArgs e)
         {
         {
-            //Regex re = new Regex("\\d+.\\d+");
-            //Console.WriteLine(re.Match(".   67.9\u001bENTER").Value);
-            ////Regex re = new Regex("\\d+.\\w+");
-            //Console.WriteLine(re.Match("2540.0").Value); ;
-            ////WebClient wc = new WebClient();
-            string json = "";
-            string json1 = "";
-            MESHelper mes = new MESHelper();
-            mes.GetMobileAllInfo("355845240054121", out json1, out json);
-            //mes.GetMobileAllInfo("F45112235030001",  out json1, out json);
-            //Console.WriteLine(mes.CheckRoutePassed("S558B231013033559", "IMEI-01", out json));
-            //Console.WriteLine(mes.GetMEIOrNetCodeRange(null, "352977841215497", null, out json1, out json));
-            Console.WriteLine(json1);
-            Console.WriteLine(json);
-
-            //mes.CheckRoutePassed( "204295638R002314", "ZZ_01_ATI", out json);
-
-            //Console.WriteLine(mes.SetMobileData("F5KKX2335053623", "F5KKX2335053623", "IMEI-01","IMEI-01","OK","","", out json));
-            //Console.WriteLine(json);
-            //string[] sss = new string[] { "F5KKX2335069950", "F5KKX2335069028", "F5KKX2335021555", "F5KKX2335111850", "F5KKX2335019799", "F5KKX2335111166", "F5KKX2335110438", "F5KKX2335045369" };
-
-            //for (int i = 0; i < sss.Length; i++)
-            //{
-            //    string rr = "";
-            //    string sn = sss[i];
-            //    mes.GetMEIOrNetCodeRange(sn, "", "", out rr, out json);
-            //    string[] str = rr.Split('^');
-            //    string IMEI1 = str[0].Replace("IMEI1:", "");
-            //    string IMEI2 = str[1].Replace("IMEI2:", "");
-            //    string PSN = str[4].Replace("PSN:", "");
-            //    mes.SetIMEIInfo(sn, IMEI1, IMEI2, "", "", "", "", "", "", out json);
-
-            //    mes.GetAddressRangeByMO(sn, out rr, out json);
-
-            //    string[] str1 = rr.Split('^');
-            //    string MAC = str1[1].Replace("BT:", "");
-            //    mes.SetAddressInfo(sn, "", MAC, "", "", "", out json);
-
-            //    mes.SetMobileData(sn, sn, "IMEI-01", "zhangz", "OK", "", "", out json);
-            //    Console.WriteLine(json);
-            //}
+            dt = ExcelToDataTable(@"C:\Users\callm\Desktop\Autosave\Vortex-ICC ID数据库1.xlsx", true);
+            InitDB = new Thread(ConnectDB);
+            InitDB.Start();
+            InitDB1 = new Thread(ConnectDB1);
+            InitDB1.Start();
+            InitDB2 = new Thread(ConnectDB2);
+            InitDB2.Start();
+            InitDB3 = new Thread(ConnectDB3);
+            InitDB3.Start();
+        }
+
+        private void ConnectDB()
+        {
+            DataHelper dh = new DataHelper();
+            for (int i = 150000; i <= 200000; i++)
+            {
+                Console.WriteLine(i);
+                string sql = "insert into simlist(si_id,si_code,si_sim)values(simlist_seq.nextval,'SIM-01','" + dt.Rows[i]["ID1"].ToString() + "')";
+                dh.ExecuteSql(sql, "insert");
+            }
+        }
+
+        private void ConnectDB1()
+        {
+            DataHelper dh = new DataHelper();
+            for (int i = 350000; i <= 400000; i++)
+            {
+                Console.WriteLine(i);
+                string sql = "insert into simlist(si_id,si_code,si_sim)values(simlist_seq.nextval,'SIM-01','" + dt.Rows[i]["ID1"].ToString() + "')";
+                dh.ExecuteSql(sql, "insert");
+            }
+        }
+
+        private void ConnectDB2()
+        {
+            DataHelper dh = new DataHelper();
+            for (int i = 550000; i <= 600000; i++)
+            {
+                Console.WriteLine(i);
+                string sql = "insert into simlist(si_id,si_code,si_sim)values(simlist_seq.nextval,'SIM-01','" + dt.Rows[i]["ID1"].ToString() + "')";
+                dh.ExecuteSql(sql, "insert");
+            }
+        }
+
+        private void ConnectDB3()
+        {
+            DataHelper dh = new DataHelper();
+            for (int i = 650000; i <= 700000; i++)
+            {
+                Console.WriteLine(  i);
+                string sql = "insert into simlist(si_id,si_code,si_sim)values(simlist_seq.nextval,'SIM-01','" + dt.Rows[i]["ID1"].ToString() + "')";
+                dh.ExecuteSql(sql, "insert");
+            }
         }
         }
 
 
         public static string ToUrlEncode(string strCode)
         public static string ToUrlEncode(string strCode)
@@ -112,10 +130,10 @@ namespace FileWatcher
         private void SaveFileToJPG(string filename)
         private void SaveFileToJPG(string filename)
         {
         {
             DataHelper dh = new DataHelper();
             DataHelper dh = new DataHelper();
-            DataTable dt = ExcelToDataTable(filename, true);
+            DataTable dt = ExcelToDataTable(@"C:\Users\callm\Desktop\Autosave\Vortex-ICC ID数据库.xlsx", true);
             for (int i = 0; i < dt.Rows.Count; i++)
             for (int i = 0; i < dt.Rows.Count; i++)
             {
             {
-                string sql = "insert into deviceproduct(dp_id,dp_prodcode,dp_decode)values(deviceproduct_seq.nextval,'" + dt.Rows[i]["dp_prodcode"].ToString() + "','" + dt.Rows[i]["de_code"].ToString() + "')";
+                string sql = "insert into simlist(si_id,si_code,si_sim)values(simlist_seq.nextval,'SIM-01','" + dt.Rows[i]["ID1"].ToString() + "')";
                 dh.ExecuteSql(sql, "insert");
                 dh.ExecuteSql(sql, "insert");
             }
             }
         }
         }
@@ -229,8 +247,9 @@ namespace FileWatcher
                 }
                 }
                 return dataTable;
                 return dataTable;
             }
             }
-            catch (Exception)
+            catch (Exception ex)
             {
             {
+                Console.WriteLine(ex.Message);
                 if (fs != null)
                 if (fs != null)
                 {
                 {
                     fs.Close();
                     fs.Close();

+ 12 - 0
FileWatcher/Form4.resx

@@ -117,4 +117,16 @@
   <resheader name="writer">
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </resheader>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="料号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="物料名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="物料规格.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
 </root>

+ 1 - 1
FileWatcher/Program.cs

@@ -45,7 +45,7 @@ namespace FileWatcher
                 Application.EnableVisualStyles();
                 Application.EnableVisualStyles();
                 Application.SetCompatibleTextRenderingDefault(false);
                 Application.SetCompatibleTextRenderingDefault(false);
                 if (principal.IsInRole(WindowsBuiltInRole.Administrator))
                 if (principal.IsInRole(WindowsBuiltInRole.Administrator))
-                    Application.Run(new AutoMakeQTY());
+                    Application.Run(new AutoAnalysisXml());
                 else
                 else
                 {
                 {
                     //创建启动对象
                     //创建启动对象

+ 61 - 45
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -167,13 +167,13 @@
             this.ResetHBXH = new System.Windows.Forms.Button();
             this.ResetHBXH = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
             this.label18 = new System.Windows.Forms.Label();
             this.MidBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.MidBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            this.SingleLabelPrint = new System.Windows.Forms.Button();
             this.MidBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.MidBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label16 = new System.Windows.Forms.Label();
             this.label16 = new System.Windows.Forms.Label();
             this.SingleBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label12 = new System.Windows.Forms.Label();
             this.label12 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
+            this.SingleLabelPrint = new System.Windows.Forms.Button();
             this.Input = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.Input = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -232,6 +232,7 @@
             this.MidLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.MidLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.MidLabelCombox = new System.Windows.Forms.ComboBox();
             this.MidLabelCombox = new System.Windows.Forms.ComboBox();
             this.OutBoxLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.OutBoxLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.AutoAfterPrint = new System.Windows.Forms.CheckBox();
             this.AutoPrintOutBox = new System.Windows.Forms.CheckBox();
             this.AutoPrintOutBox = new System.Windows.Forms.CheckBox();
             this.AutoSetOutBox = new System.Windows.Forms.CheckBox();
             this.AutoSetOutBox = new System.Windows.Forms.CheckBox();
             this.DiffDetno = new System.Windows.Forms.CheckBox();
             this.DiffDetno = new System.Windows.Forms.CheckBox();
@@ -1295,7 +1296,7 @@
             // 
             // 
             this.label15.AutoSize = true;
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(20, 43);
+            this.label15.Location = new System.Drawing.Point(23, 46);
             this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label15.Name = "label15";
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(62, 31);
             this.label15.Size = new System.Drawing.Size(62, 31);
@@ -1365,7 +1366,7 @@
             this.Weight.AutoSize = true;
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 25F);
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 25F);
             this.Weight.ForeColor = System.Drawing.Color.Red;
             this.Weight.ForeColor = System.Drawing.Color.Red;
-            this.Weight.Location = new System.Drawing.Point(78, 131);
+            this.Weight.Location = new System.Drawing.Point(81, 134);
             this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Name = "Weight";
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 88);
             this.Weight.Size = new System.Drawing.Size(0, 88);
@@ -1598,6 +1599,7 @@
             // 
             // 
             // pd_remark1
             // pd_remark1
             // 
             // 
+            this.pd_remark1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.pd_remark1.DataPropertyName = "pd_remark";
             this.pd_remark1.DataPropertyName = "pd_remark";
             this.pd_remark1.HeaderText = "备注";
             this.pd_remark1.HeaderText = "备注";
             this.pd_remark1.MinimumWidth = 10;
             this.pd_remark1.MinimumWidth = 10;
@@ -1630,7 +1632,7 @@
             // 
             // 
             this.label17.AutoSize = true;
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(43, 296);
+            this.label17.Location = new System.Drawing.Point(22, 276);
             this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label17.Name = "label17";
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(110, 31);
             this.label17.Size = new System.Drawing.Size(110, 31);
@@ -1666,7 +1668,7 @@
             // 
             // 
             this.label18.AutoSize = true;
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(148, 194);
+            this.label18.Location = new System.Drawing.Point(151, 197);
             this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label18.Name = "label18";
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(24, 31);
             this.label18.Size = new System.Drawing.Size(24, 31);
@@ -1685,19 +1687,6 @@
             this.MidBoxEnd.Str2 = null;
             this.MidBoxEnd.Str2 = null;
             this.MidBoxEnd.TabIndex = 89;
             this.MidBoxEnd.TabIndex = 89;
             // 
             // 
-            // SingleLabelPrint
-            // 
-            this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(68, 359);
-            this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
-            this.SingleLabelPrint.Name = "SingleLabelPrint";
-            this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
-            this.SingleLabelPrint.TabIndex = 36;
-            this.SingleLabelPrint.Text = "打印盘标";
-            this.SingleLabelPrint.UseVisualStyleBackColor = true;
-            this.SingleLabelPrint.Click += new System.EventHandler(this.SingleLabelPrint_Click);
-            // 
             // MidBoxBegin
             // MidBoxBegin
             // 
             // 
             this.MidBoxBegin.ID = null;
             this.MidBoxBegin.ID = null;
@@ -1714,7 +1703,7 @@
             // 
             // 
             this.label16.AutoSize = true;
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(149, 102);
+            this.label16.Location = new System.Drawing.Point(152, 105);
             this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label16.Name = "label16";
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(24, 31);
             this.label16.Size = new System.Drawing.Size(24, 31);
@@ -1749,7 +1738,7 @@
             // 
             // 
             this.label12.AutoSize = true;
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(43, 149);
+            this.label12.Location = new System.Drawing.Point(46, 152);
             this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label12.Name = "label12";
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(110, 31);
             this.label12.Size = new System.Drawing.Size(110, 31);
@@ -1760,13 +1749,26 @@
             // 
             // 
             this.label7.AutoSize = true;
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(43, 54);
+            this.label7.Location = new System.Drawing.Point(46, 57);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(110, 31);
             this.label7.Size = new System.Drawing.Size(110, 31);
             this.label7.TabIndex = 76;
             this.label7.TabIndex = 76;
             this.label7.Text = "单盘范围";
             this.label7.Text = "单盘范围";
             // 
             // 
+            // SingleLabelPrint
+            // 
+            this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SingleLabelPrint.Location = new System.Drawing.Point(14, 356);
+            this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.SingleLabelPrint.Name = "SingleLabelPrint";
+            this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
+            this.SingleLabelPrint.TabIndex = 36;
+            this.SingleLabelPrint.Text = "打印盘标";
+            this.SingleLabelPrint.UseVisualStyleBackColor = true;
+            this.SingleLabelPrint.Click += new System.EventHandler(this.SingleLabelPrint_Click);
+            // 
             // Input
             // Input
             // 
             // 
             this.Input.ID = null;
             this.Input.ID = null;
@@ -2199,7 +2201,7 @@
             // 
             // 
             this.label14.AutoSize = true;
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(62, 305);
+            this.label14.Location = new System.Drawing.Point(47, 295);
             this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label14.Name = "label14";
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(155, 36);
             this.label14.Size = new System.Drawing.Size(155, 36);
@@ -2219,7 +2221,7 @@
             // 
             // 
             this.label13.AutoSize = true;
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(62, 259);
+            this.label13.Location = new System.Drawing.Point(47, 240);
             this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label13.Name = "label13";
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(155, 36);
             this.label13.Size = new System.Drawing.Size(155, 36);
@@ -2249,7 +2251,7 @@
             // 
             // 
             this.SingleLabelAutoPrint.AutoSize = true;
             this.SingleLabelAutoPrint.AutoSize = true;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(41, 208);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(27, 178);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -2295,7 +2297,7 @@
             // 
             // 
             this.AutoPrintMidBox.AutoSize = true;
             this.AutoPrintMidBox.AutoSize = true;
             this.AutoPrintMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrintMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrintMidBox.Location = new System.Drawing.Point(25, 377);
+            this.AutoPrintMidBox.Location = new System.Drawing.Point(28, 380);
             this.AutoPrintMidBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintMidBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintMidBox.Name = "AutoPrintMidBox";
             this.AutoPrintMidBox.Name = "AutoPrintMidBox";
             this.AutoPrintMidBox.Size = new System.Drawing.Size(166, 35);
             this.AutoPrintMidBox.Size = new System.Drawing.Size(166, 35);
@@ -2307,7 +2309,7 @@
             // 
             // 
             this.CurrentRowOnly.AutoSize = true;
             this.CurrentRowOnly.AutoSize = true;
             this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CurrentRowOnly.Location = new System.Drawing.Point(194, 217);
+            this.CurrentRowOnly.Location = new System.Drawing.Point(159, 179);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Size = new System.Drawing.Size(166, 35);
             this.CurrentRowOnly.Size = new System.Drawing.Size(166, 35);
@@ -2338,7 +2340,7 @@
             // 
             // 
             this.label2.AutoSize = true;
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(40, 259);
+            this.label2.Location = new System.Drawing.Point(22, 244);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(62, 31);
             this.label2.Size = new System.Drawing.Size(62, 31);
@@ -2362,7 +2364,7 @@
             // 
             // 
             this.label5.AutoSize = true;
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(40, 324);
+            this.label5.Location = new System.Drawing.Point(23, 310);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(62, 31);
             this.label5.Size = new System.Drawing.Size(62, 31);
@@ -2394,7 +2396,7 @@
             // 
             // 
             this.MidLabelAutoPrint.AutoSize = true;
             this.MidLabelAutoPrint.AutoSize = true;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(42, 217);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(15, 179);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -2416,6 +2418,7 @@
             // 
             // 
             // OutBoxLabel
             // OutBoxLabel
             // 
             // 
+            this.OutBoxLabel.Controls.Add(this.AutoAfterPrint);
             this.OutBoxLabel.Controls.Add(this.AutoPrintOutBox);
             this.OutBoxLabel.Controls.Add(this.AutoPrintOutBox);
             this.OutBoxLabel.Controls.Add(this.AutoSetOutBox);
             this.OutBoxLabel.Controls.Add(this.AutoSetOutBox);
             this.OutBoxLabel.Controls.Add(this.DiffDetno);
             this.OutBoxLabel.Controls.Add(this.DiffDetno);
@@ -2435,20 +2438,32 @@
             this.OutBoxLabel.Controls.Add(this.OutBoxLabelPrint);
             this.OutBoxLabel.Controls.Add(this.OutBoxLabelPrint);
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabel.Location = new System.Drawing.Point(2138, 12);
+            this.OutBoxLabel.Location = new System.Drawing.Point(2126, 12);
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(4);
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(4);
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(4);
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(4);
-            this.OutBoxLabel.Size = new System.Drawing.Size(404, 422);
+            this.OutBoxLabel.Size = new System.Drawing.Size(416, 422);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
             this.OutBoxLabel.Text = "外箱标签";
             // 
             // 
+            // AutoAfterPrint
+            // 
+            this.AutoAfterPrint.AutoSize = true;
+            this.AutoAfterPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AutoAfterPrint.Location = new System.Drawing.Point(162, 225);
+            this.AutoAfterPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.AutoAfterPrint.Name = "AutoAfterPrint";
+            this.AutoAfterPrint.Size = new System.Drawing.Size(142, 35);
+            this.AutoAfterPrint.TabIndex = 102;
+            this.AutoAfterPrint.Text = "打印新增";
+            this.AutoAfterPrint.UseVisualStyleBackColor = true;
+            // 
             // AutoPrintOutBox
             // AutoPrintOutBox
             // 
             // 
             this.AutoPrintOutBox.AutoSize = true;
             this.AutoPrintOutBox.AutoSize = true;
             this.AutoPrintOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrintOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrintOutBox.Location = new System.Drawing.Point(160, 190);
+            this.AutoPrintOutBox.Location = new System.Drawing.Point(162, 179);
             this.AutoPrintOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintOutBox.Name = "AutoPrintOutBox";
             this.AutoPrintOutBox.Name = "AutoPrintOutBox";
             this.AutoPrintOutBox.Size = new System.Drawing.Size(118, 35);
             this.AutoPrintOutBox.Size = new System.Drawing.Size(118, 35);
@@ -2460,7 +2475,7 @@
             // 
             // 
             this.AutoSetOutBox.AutoSize = true;
             this.AutoSetOutBox.AutoSize = true;
             this.AutoSetOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoSetOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoSetOutBox.Location = new System.Drawing.Point(31, 232);
+            this.AutoSetOutBox.Location = new System.Drawing.Point(16, 225);
             this.AutoSetOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoSetOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoSetOutBox.Name = "AutoSetOutBox";
             this.AutoSetOutBox.Name = "AutoSetOutBox";
             this.AutoSetOutBox.Size = new System.Drawing.Size(142, 35);
             this.AutoSetOutBox.Size = new System.Drawing.Size(142, 35);
@@ -2472,7 +2487,7 @@
             // 
             // 
             this.DiffDetno.AutoSize = true;
             this.DiffDetno.AutoSize = true;
             this.DiffDetno.Font = new System.Drawing.Font("微软雅黑", 8F);
             this.DiffDetno.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDetno.Location = new System.Drawing.Point(273, 384);
+            this.DiffDetno.Location = new System.Drawing.Point(276, 387);
             this.DiffDetno.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDetno.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDetno.Name = "DiffDetno";
             this.DiffDetno.Name = "DiffDetno";
             this.DiffDetno.Size = new System.Drawing.Size(133, 34);
             this.DiffDetno.Size = new System.Drawing.Size(133, 34);
@@ -2484,7 +2499,7 @@
             // 
             // 
             this.DiffCPN.AutoSize = true;
             this.DiffCPN.AutoSize = true;
             this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 8F);
             this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffCPN.Location = new System.Drawing.Point(273, 340);
+            this.DiffCPN.Location = new System.Drawing.Point(276, 343);
             this.DiffCPN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffCPN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffCPN.Name = "DiffCPN";
             this.DiffCPN.Name = "DiffCPN";
             this.DiffCPN.Size = new System.Drawing.Size(135, 34);
             this.DiffCPN.Size = new System.Drawing.Size(135, 34);
@@ -2496,7 +2511,7 @@
             // 
             // 
             this.BoxCount.AutoSize = true;
             this.BoxCount.AutoSize = true;
             this.BoxCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.BoxCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxCount.Location = new System.Drawing.Point(326, 438);
+            this.BoxCount.Location = new System.Drawing.Point(329, 441);
             this.BoxCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.BoxCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Size = new System.Drawing.Size(0, 31);
             this.BoxCount.Size = new System.Drawing.Size(0, 31);
@@ -2506,7 +2521,7 @@
             // 
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 8F);
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffLotNo.Location = new System.Drawing.Point(273, 292);
+            this.DiffLotNo.Location = new System.Drawing.Point(276, 295);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(118, 34);
             this.DiffLotNo.Size = new System.Drawing.Size(118, 34);
@@ -2518,7 +2533,7 @@
             // 
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 8F);
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDC.Location = new System.Drawing.Point(273, 240);
+            this.DiffDC.Location = new System.Drawing.Point(276, 243);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(121, 34);
             this.DiffDC.Size = new System.Drawing.Size(121, 34);
@@ -2530,7 +2545,7 @@
             // 
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 8F);
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.OnlyOneRow.Location = new System.Drawing.Point(273, 192);
+            this.OnlyOneRow.Location = new System.Drawing.Point(276, 195);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(111, 34);
             this.OnlyOneRow.Size = new System.Drawing.Size(111, 34);
@@ -2542,7 +2557,7 @@
             // 
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(31, 190);
+            this.AllLabel.Location = new System.Drawing.Point(16, 178);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(142, 35);
             this.AllLabel.Size = new System.Drawing.Size(142, 35);
@@ -2565,7 +2580,7 @@
             // LogingOut
             // LogingOut
             // 
             // 
             this.LogingOut.AutoSize = true;
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(290, 49);
+            this.LogingOut.Location = new System.Drawing.Point(293, 52);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(82, 41);
             this.LogingOut.Size = new System.Drawing.Size(82, 41);
@@ -2580,7 +2595,7 @@
             this.OutBoxNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxNum.Items.AddRange(new object[] {
             this.OutBoxNum.Items.AddRange(new object[] {
             "新增"});
             "新增"});
-            this.OutBoxNum.Location = new System.Drawing.Point(122, 314);
+            this.OutBoxNum.Location = new System.Drawing.Point(92, 312);
             this.OutBoxNum.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OutBoxNum.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OutBoxNum.Name = "OutBoxNum";
             this.OutBoxNum.Name = "OutBoxNum";
             this.OutBoxNum.Size = new System.Drawing.Size(100, 39);
             this.OutBoxNum.Size = new System.Drawing.Size(100, 39);
@@ -2593,7 +2608,7 @@
             // 
             // 
             this.label10.AutoSize = true;
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(71, 332);
+            this.label10.Location = new System.Drawing.Point(19, 316);
             this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label10.Name = "label10";
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(62, 31);
             this.label10.Size = new System.Drawing.Size(62, 31);
@@ -2604,7 +2619,7 @@
             // 
             // 
             this.label6.AutoSize = true;
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(71, 285);
+            this.label6.Location = new System.Drawing.Point(19, 274);
             this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Name = "label6";
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(62, 31);
             this.label6.Size = new System.Drawing.Size(62, 31);
@@ -2623,7 +2638,7 @@
             // OutboxCapacity
             // OutboxCapacity
             // 
             // 
             this.OutboxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutboxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutboxCapacity.Location = new System.Drawing.Point(122, 267);
+            this.OutboxCapacity.Location = new System.Drawing.Point(92, 265);
             this.OutboxCapacity.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OutboxCapacity.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OutboxCapacity.Maximum = new decimal(new int[] {
             this.OutboxCapacity.Maximum = new decimal(new int[] {
             180,
             180,
@@ -2975,5 +2990,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.DataGridViewTextBoxColumn checknum;
         private System.Windows.Forms.DataGridViewTextBoxColumn checknum;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_remark1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_remark1;
+        private System.Windows.Forms.CheckBox AutoAfterPrint;
     }
     }
 }
 }

+ 6 - 5
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -862,7 +862,7 @@ namespace UAS_LabelMachine
         {
         {
             ComBoxClickChangeLabelDoc = false;
             ComBoxClickChangeLabelDoc = false;
             sql.Clear();
             sql.Clear();
-            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelurl,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,replace(upper(cl_labelurl),'\\\\10.2.10.238\\PRINTE\\FASTREPORT','C:\\打印标签')cl_labelurl,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_custcode,cl_date desc");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_custcode,cl_date desc");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
@@ -871,7 +871,7 @@ namespace UAS_LabelMachine
             SingleLabelCombox.DataSource = dt;
             SingleLabelCombox.DataSource = dt;
 
 
             sql.Clear();
             sql.Clear();
-            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelurl,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,replace(upper(cl_labelurl),'\\\\10.2.10.238\\PRINTE\\FASTREPORT','C:\\打印标签')cl_labelurl,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_custcode,cl_date desc");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_custcode,cl_date desc");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
@@ -880,7 +880,7 @@ namespace UAS_LabelMachine
             MidLabelCombox.DataSource = dt;
             MidLabelCombox.DataSource = dt;
 
 
             sql.Clear();
             sql.Clear();
-            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelurl,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,replace(upper(cl_labelurl),'\\\\10.2.10.238\\PRINTE\\FASTREPORT','C:\\打印标签')cl_labelurl,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_custcode,cl_date desc");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_custcode,cl_date desc");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
@@ -1629,6 +1629,7 @@ namespace UAS_LabelMachine
                 BaseUtil.SetFormCenter(stw);
                 BaseUtil.SetFormCenter(stw);
                 stw.ShowDialog();
                 stw.ShowDialog();
                 Input.Focus();
                 Input.Focus();
+                if(AutoAfterPrint.Checked)
                 OutBoxNum.Text = "新增";
                 OutBoxNum.Text = "新增";
             }
             }
             else
             else
@@ -2255,7 +2256,7 @@ namespace UAS_LabelMachine
                 System.DateTime now = System.DateTime.Now;
                 System.DateTime now = System.DateTime.Now;
                 System.DateTime now1 = now.AddDays(-int.Parse(DCCheck.Text));
                 System.DateTime now1 = now.AddDays(-int.Parse(DCCheck.Text));
                 //物料的DateCode大于限制日期即可
                 //物料的DateCode大于限制日期即可
-                if (dt1 > now1)
+                if (dt1 > now1&& dt1< now)
                 {
                 {
                     return true;
                     return true;
                 }
                 }
@@ -2269,7 +2270,7 @@ namespace UAS_LabelMachine
 
 
         private void PrintFooter_Click(object sender, EventArgs e)
         private void PrintFooter_Click(object sender, EventArgs e)
         {
         {
-            FootReport.Load(@"\\10.2.10.238\PRINTE\FASTREPORT\唛头.frx");
+            FootReport.Load(@"C:\\打印标签\\唛头.frx");
             DataTable dt = (DataTable)dh.ExecuteSql("select pib_outboxcode2,max(pib_id) pib_id from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' group by pib_outboxcode2 order by to_number(pib_outboxcode2)", "select");
             DataTable dt = (DataTable)dh.ExecuteSql("select pib_outboxcode2,max(pib_id) pib_id from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' group by pib_outboxcode2 order by to_number(pib_outboxcode2)", "select");
             string SQL = "select pib_outboxcode2||'/'||(select max(to_number(pib_outboxcode2)) from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "') from prodiobarcode  where pib_id=";
             string SQL = "select pib_outboxcode2||'/'||(select max(to_number(pib_outboxcode2)) from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "') from prodiobarcode  where pib_id=";
             for (int i = 0; i < dt.Rows.Count; i++)
             for (int i = 0; i < dt.Rows.Count; i++)

+ 14 - 1
UAS_MesInterface(ODLF)/MesHelper.cs

@@ -48,7 +48,7 @@ namespace UMESDLLService
 
 
         string Master = "N_MES";
         string Master = "N_MES";
         //系统默认的的连接字符串
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.80.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11568)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
         //用户选择的数据库的连接字符串
         private OracleConnection connection;
         private OracleConnection connection;
         //用户选择的数据库的连接字符串
         //用户选择的数据库的连接字符串
@@ -673,6 +673,19 @@ namespace UMESDLLService
             oErrorMessage = "";
             oErrorMessage = "";
             if (iTSN == "") { oErrorMessage = "TSN不能为空"; return false; }
             if (iTSN == "") { oErrorMessage = "TSN不能为空"; return false; }
             if (iSN == "") { oErrorMessage = "SN不能为空"; return false; }
             if (iSN == "") { oErrorMessage = "SN不能为空"; return false; }
+            DataTable dt = (DataTable)ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + iTSN + "' order by ms_id desc", "select");
+            if (dt.Rows.Count > 0)
+            {
+                iTSN = dt.Rows[0]["ms_sncode"].ToString();
+            }
+            else
+            {
+                dt = (DataTable)ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + iTSN + "' order by ms_id desc", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    iTSN = dt.Rows[0]["ms_sncode"].ToString();
+                }
+            }
             string[] param = new string[] { iTSN, iSN, iSourceCode, iOperater, iResult, iErrCode, oErrorMessage };
             string[] param = new string[] { iTSN, iSN, iSourceCode, iOperater, iResult, iErrCode, oErrorMessage };
             string[] ParamName = new string[] { "v_i_tsn", "v_i_sncode", "v_i_sourcecode", "v_i_usercode", "v_i_result", "v_i_errcode", "v_o_errmsg" };
             string[] ParamName = new string[] { "v_i_tsn", "v_i_sncode", "v_i_sourcecode", "v_i_usercode", "v_i_result", "v_i_errcode", "v_o_errmsg" };
             CallProcedure("CS_DLLSNCHANGE_TOOL", ParamName, ref param);
             CallProcedure("CS_DLLSNCHANGE_TOOL", ParamName, ref param);

+ 7 - 7
UAS_MesInterface(YD)/MesHelper.cs

@@ -40,7 +40,7 @@ namespace UMESDLLService
         //用于存放批量执行的SQL
         //用于存放批量执行的SQL
         List<string> sqls = new List<string>();
         List<string> sqls = new List<string>();
         //系统默认的的连接字符串
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Data Source=81.71.42.91/orcl;User ID=DGW;PassWord=select!#%*(;";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_T;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.64.89.153)(PORT=61521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
         //用户选择的数据库的连接字符串
         private OracleConnection connection;
         private OracleConnection connection;
         //用户选择的数据库的连接字符串
         //用户选择的数据库的连接字符串
@@ -374,10 +374,10 @@ namespace UMESDLLService
                     return false;
                     return false;
             }
             }
             string MAC = MacInfo.Split('^')[0].Replace("MAC:", "");
             string MAC = MacInfo.Split('^')[0].Replace("MAC:", "");
-            string BT = MacInfo.Split('^')[0].Replace("BT:", "");
-            string TCode1 = MacInfo.Split('^')[0].Replace("Code1:", "");
-            string TCode2 = MacInfo.Split('^')[0].Replace("Code2:", "");
-            string TCode3 = MacInfo.Split('^')[0].Replace("Code3:", "");
+            string BT = MacInfo.Split('^')[1].Replace("BT:", "");
+            string TCode1 = MacInfo.Split('^')[2].Replace("Code1:", "");
+            string TCode2 = MacInfo.Split('^')[3].Replace("Code2:", "");
+            string TCode3 = MacInfo.Split('^')[4].Replace("Code3:", "");
             if (!SetAddressInfo(iSN, MAC == "null" ? "" : MAC, BT == "null" ? "" : BT, TCode1 == "null" ? "" :TCode1,TCode2 == "null" ? "" :TCode2,TCode3 == "null" ? "" :TCode3, out oErrMessage))
             if (!SetAddressInfo(iSN, MAC == "null" ? "" : MAC, BT == "null" ? "" : BT, TCode1 == "null" ? "" :TCode1,TCode2 == "null" ? "" :TCode2,TCode3 == "null" ? "" :TCode3, out oErrMessage))
             {
             {
                 if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
                 if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
@@ -584,7 +584,7 @@ namespace UMESDLLService
             if (iSN == "") { oErrorMessage = "SN不能为空"; return false; }
             if (iSN == "") { oErrorMessage = "SN不能为空"; return false; }
             string[] param = new string[] { iTSN, iSN, iSourceCode, iOperater, iResult, iErrCode, oErrorMessage };
             string[] param = new string[] { iTSN, iSN, iSourceCode, iOperater, iResult, iErrCode, oErrorMessage };
             string[] ParamName = new string[] { "v_i_tsn", "v_i_sncode", "v_i_sourcecode", "v_i_usercode", "v_i_result", "v_i_errcode", "v_o_errmsg" };
             string[] ParamName = new string[] { "v_i_tsn", "v_i_sncode", "v_i_sourcecode", "v_i_usercode", "v_i_result", "v_i_errcode", "v_o_errmsg" };
-            CallProcedure("CS_DLLSNCHANGE", ParamName, ref param);
+            CallProcedure("CS_DLLSNCHANGE_TOOL", ParamName, ref param);
             oErrorMessage = param[6];
             oErrorMessage = param[6];
             if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
             if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
                 return true;
                 return true;
@@ -602,7 +602,7 @@ namespace UMESDLLService
             oErrMessage = "";
             oErrMessage = "";
             string[] param = new string[] { iMakeCode, iSourceCode, iSN, iUserCode, iResult, oErrMessage };
             string[] param = new string[] { iMakeCode, iSourceCode, iSN, iUserCode, iResult, oErrMessage };
             string[] ParamName = new string[] { "v_i_macode", "v_i_sourcecode", "v_i_sncode", "v_i_usercode", "v_i_result", "v_o_errmsg" };
             string[] ParamName = new string[] { "v_i_macode", "v_i_sourcecode", "v_i_sncode", "v_i_usercode", "v_i_result", "v_o_errmsg" };
-            CallProcedure("CS_SETSTEPRESULT", ParamName, ref param);
+            CallProcedure("CS_SETSTEPRESULT_TOOL", ParamName, ref param);
             oErrMessage = param[5];
             oErrMessage = param[5];
             if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
             if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
                 return true;
                 return true;