浏览代码

网标采集修改以及新建BT/MAC采集

Hcsy 8 年之前
父节点
当前提交
819f866355

+ 1 - 1
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -57,7 +57,7 @@
             this.TextBox.Lock = false;
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(178, 21);
+            this.TextBox.Size = new System.Drawing.Size(178, 25);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;

+ 259 - 0
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.Designer.cs

@@ -0,0 +1,259 @@
+namespace UAS_MES.Make
+{
+    partial class Make_CollectBTMAC
+    {
+        /// <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(Make_CollectBTMAC));
+            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.deleteButton1 = new UAS_MES.CustomControl.ButtonUtil.DeleteButton();
+            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.sncode_label = new System.Windows.Forms.Label();
+            this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.mcd_remainqty_label = new System.Windows.Forms.Label();
+            this.mcd_okqty_label = new System.Windows.Forms.Label();
+            this.pr_code_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(126, 17);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.TabIndex = 212;
+            // 
+            // deleteButton1
+            // 
+            this.deleteButton1.AllPower = null;
+            this.deleteButton1.Image = ((System.Drawing.Image)(resources.GetObject("deleteButton1.Image")));
+            this.deleteButton1.Location = new System.Drawing.Point(498, 547);
+            this.deleteButton1.Name = "deleteButton1";
+            this.deleteButton1.Power = null;
+            this.deleteButton1.Size = new System.Drawing.Size(75, 23);
+            this.deleteButton1.TabIndex = 211;
+            this.deleteButton1.Text = "取消";
+            this.deleteButton1.UseVisualStyleBackColor = true;
+            this.deleteButton1.Click += new System.EventHandler(this.deleteButton1_Click);
+            // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(412, 78);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(24, 27);
+            this.mcd_remainqty.TabIndex = 210;
+            this.mcd_remainqty.Text = "0";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(124, 78);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(24, 27);
+            this.mcd_okqty.TabIndex = 209;
+            this.mcd_okqty.Text = "0";
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(417, 21);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ma_prodcode.TabIndex = 208;
+            // 
+            // 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(710, 17);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.TabIndex = 207;
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(597, 17);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.TabIndex = 206;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // sncode_label
+            // 
+            this.sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode_label.AutoSize = true;
+            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode_label.Location = new System.Drawing.Point(47, 545);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.sncode_label.TabIndex = 205;
+            this.sncode_label.Text = "录入框";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(157, 547);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(260, 25);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 204;
+            this.sncode.Tag = "ifwrite";
+            this.sncode.TextChanged += new System.EventHandler(this.sncode_TextChanged);
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // 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(32, 139);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(940, 380);
+            this.OperateResult.TabIndex = 203;
+            this.OperateResult.Text = "";
+            // 
+            // mcd_remainqty_label
+            // 
+            this.mcd_remainqty_label.AutoSize = true;
+            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(309, 78);
+            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(72, 27);
+            this.mcd_remainqty_label.TabIndex = 202;
+            this.mcd_remainqty_label.Text = "剩余数";
+            // 
+            // mcd_okqty_label
+            // 
+            this.mcd_okqty_label.AutoSize = true;
+            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty_label.Location = new System.Drawing.Point(27, 78);
+            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty_label.Name = "mcd_okqty_label";
+            this.mcd_okqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_okqty_label.TabIndex = 201;
+            this.mcd_okqty_label.Text = "打印计数";
+            // 
+            // pr_code_label
+            // 
+            this.pr_code_label.AutoSize = true;
+            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_code_label.Location = new System.Drawing.Point(309, 17);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.TabIndex = 200;
+            this.pr_code_label.Text = "产品编号";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(27, 17);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.TabIndex = 199;
+            this.ms_makecode_label.Text = "工单编号";
+            // 
+            // Make_CollectBTMAC
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1249, 602);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.deleteButton1);
+            this.Controls.Add(this.mcd_remainqty);
+            this.Controls.Add(this.mcd_okqty);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.sncode_label);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.mcd_remainqty_label);
+            this.Controls.Add(this.mcd_okqty_label);
+            this.Controls.Add(this.pr_code_label);
+            this.Controls.Add(this.ms_makecode_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Make_CollectBTMAC";
+            this.Tag = "Make!CollectBTMAC";
+            this.Text = "BT/MAC采集";
+            this.Activated += new System.EventHandler(this.Make_CollectBTMAC_Activated);
+            this.Load += new System.EventHandler(this.Make_CollectBTMAC_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_CollectBTMAC_SizeChanged);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private CustomControl.ButtonUtil.DeleteButton deleteButton1;
+        private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
+        private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label sncode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox sncode;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label mcd_remainqty_label;
+        private System.Windows.Forms.Label mcd_okqty_label;
+        private System.Windows.Forms.Label pr_code_label;
+        private System.Windows.Forms.Label ms_makecode_label;
+    }
+}

+ 174 - 0
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.cs

@@ -0,0 +1,174 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
+using UAS_MES.PublicMethod;
+
+namespace UAS_MES.Make
+{
+    public partial class Make_CollectBTMAC : Form
+    {
+        DataHelper dh;
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable dt;
+        //当前序列号记录
+        string sn_code;
+        //制造单号
+        string macode;
+        //采集网标号
+        string net_code;
+        //网标查询条件ms_id
+        string oMsID;
+        //判断是否输入BT
+        Boolean isBT = false;
+        //判断是否输入BT
+        Boolean isMAC = false;
+        //打印计数
+        int printcount = 0;
+
+        public Make_CollectBTMAC()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_CollectBTMAC_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            asc.controllInitializeSize(this);
+        }
+
+        private void Make_CollectBTMAC_Activated(object sender, EventArgs e)
+        {
+            sncode.Focus();
+        }
+
+        private void Make_CollectBTMAC_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void sncode_TextChanged(object sender, EventArgs e)
+        {
+
+        }
+
+        private void deleteButton1_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (!isMAC)
+                {
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                        return;
+                    }
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Green);
+                    string ErrorMessage2;
+                    string oMakeCode;
+                    // 获取工单归属工单下一工序是否正确
+                    if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
+                    {
+                        if (LogicHandler.GetMakeInfo(sncode.Text, out macode, out ErrorMessage2))
+                        {
+                            //判断如果该序列号的归属工单和之前查询的是一致的话,就不进行重复数据的查询
+                            if (ms_makecode.Text != macode || macode == "")
+                            {
+                                //ma_code不为空的时候表示不是第一次加载,提示用户切换工单
+                                if (macode != "" && ms_makecode.Text != "")
+                                {
+                                    OperateResult.AppendText(">>切换工单至工单号" + macode + "\n", Color.Red);
+                                }
+                            }
+                            sql.Clear();
+                            sql.Append("select  ma_code as ms_makecode,nvl(mcd_inqty,0),ma_prodcode,pr_detail,pr_spec, ");
+                            sql.Append("ma_qty-nvl(mcd_inqty,0)as mcd_remainqty from make left join makecraftdetail on mcd_maid=ma_id left join product on pr_code=ma_prodcode ");
+                            sql.Append("where ma_code=:ma_code");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", macode);
+                            if (dt.Rows.Count > 0)
+                            {
+                                BaseUtil.SetFormValue(this.Controls, dt);
+                                dh.UpdateByCondition("makeserial", "ms_currentstepcode = '" + User.CurrentStepCode + "'", "ms_id = '" + oMsID + "'");
+                                OperateResult.AppendText(">>请输入网标\n", Color.Green);
+                                sn_code = sncode.Text;
+                                sncode.Text = "";
+                                isBT = true;
+                                return;
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>序列号" + sncode.Text + "没有对应工序\n", Color.Red);
+                            }
+
+                        }
+                        else
+                        {
+                            OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
+                    }
+                }
+                else
+                {
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>网标号不能为空\n", Color.Red);
+                        return;
+                    }
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Green);
+                    string ErrorMessage = "";
+                    string result = "";
+                    //根据序列号获取此时网标号
+                    net_code = dh.getFieldDataByCondition("makeserial", "ms_netcode", "ms_id = '" + oMsID + "'").ToString();
+                    if (int.Parse(mcd_remainqty.Text) <= 0)
+                    {
+                        ErrorMessage = "工单" + sncode.Text + "网标采集完成>>>请输入SN";
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                        return;
+                    }
+                    else if (sncode.Text == net_code)
+                    {
+                        OperateResult.AppendText(">>网标错误,重复\n", Color.Red);
+                        OperateResult.AppendText(">>请输入网标\n", Color.Green);
+                        return;
+                    }
+                    else
+                    {
+                        if (LogicHandler.UpdateMakeMessage(sn_code, ms_makecode.Text, "网标采集", User.UserSourceCode, User.UserCode, "采集完成", out ErrorMessage))
+                        {
+                            dh.UpdateByCondition("makeserial", "ms_netcode = '" + sncode.Text + "'", "ms_id = '" + oMsID + "'");
+                            ErrorMessage = "网标采集完成,执行更新";
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                            BaseUtil.CleanForm(this);
+                            printcount++;
+                            mcd_okqty.Text = printcount + "";
+                            mcd_remainqty.Text = 0 + "";
+                           // netcode = false;
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
+                        }
+                        ErrorMessage = ">>>请输入SN";
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                    }
+                }
+            }
+        }
+    }
+}

+ 214 - 0
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.resx

@@ -0,0 +1,214 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="deleteButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+</root>

+ 30 - 31
UAS-MES/FunctionCode/Make/Make_CollectNetCode.Designer.cs

@@ -30,31 +30,22 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CollectNetCode));
-            this.ms_makecode = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.sncode_label = new System.Windows.Forms.Label();
             this.mcd_remainqty_label = new System.Windows.Forms.Label();
             this.mcd_okqty_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.deleteButton1 = new UAS_MES.CustomControl.ButtonUtil.DeleteButton();
             this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
             this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
             this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
-            this.deleteButton1 = new UAS_MES.CustomControl.ButtonUtil.DeleteButton();
             this.SuspendLayout();
             // 
-            // ms_makecode
-            // 
-            this.ms_makecode.AutoSize = true;
-            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(187, 37);
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
-            this.ms_makecode.TabIndex = 196;
-            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -123,11 +114,33 @@
             this.ms_makecode_label.TabIndex = 184;
             this.ms_makecode_label.Text = "工单编号";
             // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(161, 37);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.TabIndex = 198;
+            // 
+            // deleteButton1
+            // 
+            this.deleteButton1.AllPower = null;
+            this.deleteButton1.Image = ((System.Drawing.Image)(resources.GetObject("deleteButton1.Image")));
+            this.deleteButton1.Location = new System.Drawing.Point(533, 567);
+            this.deleteButton1.Name = "deleteButton1";
+            this.deleteButton1.Power = null;
+            this.deleteButton1.Size = new System.Drawing.Size(75, 23);
+            this.deleteButton1.TabIndex = 197;
+            this.deleteButton1.Text = "取消";
+            this.deleteButton1.UseVisualStyleBackColor = true;
+            this.deleteButton1.Click += new System.EventHandler(this.deleteButton1_Click);
+            // 
             // mcd_remainqty
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(471, 98);
+            this.mcd_remainqty.Location = new System.Drawing.Point(447, 98);
             this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Size = new System.Drawing.Size(24, 27);
@@ -138,7 +151,7 @@
             // 
             this.mcd_okqty.AutoSize = true;
             this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(187, 98);
+            this.mcd_okqty.Location = new System.Drawing.Point(159, 98);
             this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_okqty.Name = "mcd_okqty";
             this.mcd_okqty.Size = new System.Drawing.Size(24, 27);
@@ -149,7 +162,7 @@
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(471, 37);
+            this.ma_prodcode.Location = new System.Drawing.Point(452, 41);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
@@ -194,26 +207,13 @@
             this.OperateResult.TabIndex = 188;
             this.OperateResult.Text = "";
             // 
-            // deleteButton1
-            // 
-            this.deleteButton1.AllPower = null;
-            this.deleteButton1.Image = ((System.Drawing.Image)(resources.GetObject("deleteButton1.Image")));
-            this.deleteButton1.Location = new System.Drawing.Point(533, 567);
-            this.deleteButton1.Name = "deleteButton1";
-            this.deleteButton1.Power = null;
-            this.deleteButton1.Size = new System.Drawing.Size(75, 23);
-            this.deleteButton1.TabIndex = 197;
-            this.deleteButton1.Text = "取消";
-            this.deleteButton1.UseVisualStyleBackColor = true;
-            this.deleteButton1.Click += new System.EventHandler(this.deleteButton1_Click);
-            // 
             // Make_CollectNetCode
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1249, 602);
-            this.Controls.Add(this.deleteButton1);
             this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.deleteButton1);
             this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.mcd_okqty);
             this.Controls.Add(this.ma_prodcode);
@@ -228,7 +228,7 @@
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "Make_CollectNetCode";
-            this.Tag = "Make!CheckNoRelpace";
+            this.Tag = "Make!CollectNetCode";
             this.Text = "网标采集";
             this.Activated += new System.EventHandler(this.Make_CollectNetCode_Activated);
             this.Load += new System.EventHandler(this.Make_CollectNetCode_Load);
@@ -239,8 +239,6 @@
         }
 
         #endregion
-
-        private System.Windows.Forms.Label ms_makecode;
         private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
         private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
@@ -254,5 +252,6 @@
         private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private CustomControl.ButtonUtil.DeleteButton deleteButton1;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
     }
 }

+ 99 - 62
UAS-MES/FunctionCode/Make/Make_CollectNetCode.cs

@@ -18,10 +18,19 @@ namespace UAS_MES.Make
         AutoSizeFormClass asc = new AutoSizeFormClass();
         LogStringBuilder sql = new LogStringBuilder();
         DataTable dt;
+        //当前序列号记录
+        string sn_code;
         //制造单号
         string macode;
-        //当前工单的序列号
-        string sn_code;
+        //采集网标号
+        string net_code;
+        //网标查询条件ms_id
+        string oMsID;
+        //判断是否输入网标
+        Boolean isnetcode = false;
+        //打印计数
+        int printcount = 0;
+
         public Make_CollectNetCode()
         {
             InitializeComponent();
@@ -31,88 +40,111 @@ namespace UAS_MES.Make
         {
             dh = new DataHelper();
             asc.controllInitializeSize(this);
+
         }
 
         private void sncode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if (sncode.Text == "")
-                {
-                    OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
-                    return;
-                }
-                string oMsID;
-                string ErrorMessage2;
-                string oMakeCode;
-                // 获取工单归属工单下一工序是否正确
-                if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
+                if (!isnetcode)
                 {
-                    if (LogicHandler.GetMakeInfo(sncode.Text, out macode, out ErrorMessage2))
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                        return;
+                    }
+                    OperateResult.AppendText("<<"+sncode.Text+"\n", Color.Green);
+                    string ErrorMessage2;
+                    string oMakeCode;
+                    // 获取工单归属工单下一工序是否正确
+                    if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
                     {
-                        //判断如果该序列号的归属工单和之前查询的是一致的话,就不进行重复数据的查询
-                        //  macode = dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode='" + sncode.Text + "'").ToString();
-                        if (ms_makecode.Text != macode || macode == "")
+                        if (LogicHandler.GetMakeInfo(sncode.Text, out macode, out ErrorMessage2))
                         {
-                            //ma_code不为空的时候表示不是第一次加载,提示用户切换工单
-                            if (macode != "" && ms_makecode.Text != "")
+                            //判断如果该序列号的归属工单和之前查询的是一致的话,就不进行重复数据的查询
+                            if (ms_makecode.Text != macode || macode == "")
                             {
-                                OperateResult.AppendText(">>切换工单至工单号" + macode + "\n", Color.Red);
+                                //ma_code不为空的时候表示不是第一次加载,提示用户切换工单
+                                if (macode != "" && ms_makecode.Text != "")
+                                {
+                                    OperateResult.AppendText(">>切换工单至工单号" + macode + "\n", Color.Red);
+                                }
                             }
-                        }
-                        sql.Clear();
-                        sql.Append("select  ma_code as ms_makecode,nvl(mcd_inqty,0),ma_prodcode,pr_detail,pr_spec, ");
-                        sql.Append("ma_qty-nvl(mcd_inqty,0)as mcd_remainqty from make left join makecraftdetail on mcd_maid=ma_id left join product on pr_code=ma_prodcode ");
-                        sql.Append("where ma_code=:ma_code");
-                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", macode);
-                        if (dt.Rows.Count > 0)
-                        {
-                            BaseUtil.SetFormValue(this.Controls, dt);
-                            sn_code = sncode.Text;
-                            dh.UpdateByCondition("makeserial", "ms_currentstepcode = '"+User.CurrentStepCode+"'", "ms_id = '"+oMsID+"'");
+                            sql.Clear();
+                            sql.Append("select  ma_code as ms_makecode,nvl(mcd_inqty,0),ma_prodcode,pr_detail,pr_spec, ");
+                            sql.Append("ma_qty-nvl(mcd_inqty,0)as mcd_remainqty from make left join makecraftdetail on mcd_maid=ma_id left join product on pr_code=ma_prodcode ");
+                            sql.Append("where ma_code=:ma_code");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", macode);
+                            if (dt.Rows.Count > 0)
+                            {
+                                BaseUtil.SetFormValue(this.Controls, dt);
+                                dh.UpdateByCondition("makeserial", "ms_currentstepcode = '" + User.CurrentStepCode + "'", "ms_id = '" + oMsID + "'");
+                                OperateResult.AppendText(">>请输入网标\n", Color.Green);
+                                sn_code = sncode.Text;
+                                sncode.Text = "";
+                                isnetcode = true;
+                                return;
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>序列号" + sncode.Text + "没有对应工序\n", Color.Red);
+                            }
+
                         }
                         else
                         {
-                            OperateResult.AppendText(">>序列号" + sncode.Text + "没有对应工序\n", Color.Red);
+                            OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
                         }
-                        string ErrorMessage = "";
-                        string result = "";
-                        if (int.Parse(mcd_remainqty.Text) <= 0)
+                    }
+                    else {
+                        OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
+                    }
+                }
+                else
+                {
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>网标号不能为空\n", Color.Red);
+                        return;
+                    }
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Green);
+                    string ErrorMessage = "";
+                    string result = "";
+                    //根据序列号获取此时网标号
+                    net_code = dh.getFieldDataByCondition("makeserial", "ms_netcode", "ms_id = '" + oMsID + "'").ToString();
+                    if (int.Parse(mcd_remainqty.Text) <= 0)
+                    {
+                        ErrorMessage = "工单" + sncode.Text + "网标采集完成>>>请输入SN";
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                        return;
+                    }
+                    else if (sncode.Text == net_code) {
+                        OperateResult.AppendText(">>网标错误,重复\n", Color.Red);
+                        OperateResult.AppendText(">>请输入网标\n", Color.Green);
+                        return;
+                    }
+                    else
+                    {
+                        if (LogicHandler.UpdateMakeMessage(sn_code, ms_makecode.Text, "网标采集", User.UserSourceCode, User.UserCode, "采集完成", out ErrorMessage))
                         {
-                            macode = ms_makecode.Text;
-                            ErrorMessage = "工单" + macode + "打印完成>>>请输入SN";
+                            dh.UpdateByCondition("makeserial", "ms_netcode = '" + sncode.Text + "'", "ms_id = '" + oMsID + "'");
+                            ErrorMessage = "网标采集完成,执行更新";
                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
-                            return;
+                            BaseUtil.CleanForm(this);
+                            printcount++;
+                            mcd_okqty.Text = printcount + "";
+                            mcd_remainqty.Text = 0+ "";
+                            isnetcode = false;
                         }
                         else
                         {
-                            //if (LogicHandler.UpdateMakeMessage(sncode.Text, ms_makecode.Text, "colorbox", User.UserSourceCode, User.UserName, result, out ErrorMessage))
-                            //{
-                            //    ErrorMessage = "打印完成,执行更新";
-                            //    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
-                            //    mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
-                            //    mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - 1 + "";
-                            //    sncode.Text = "";
-                            //}
-                            //else
-                            //{
-                            //    OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
-                            //}
-
-
-                            ErrorMessage = ">>>请输入SN";
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                            OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
                         }
-                    }
-                    else
-                    {
-                        OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
+                        ErrorMessage = ">>>请输入SN";
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
                     }
                 }
-                else
-                {
-                    OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
-                }
             }
         }
 
@@ -128,7 +160,12 @@ namespace UAS_MES.Make
 
         private void deleteButton1_Click(object sender, EventArgs e)
         {
-            BaseUtil.CleanForm(this);
+            if (isnetcode) {
+                BaseUtil.CleanForm(this);
+                mcd_remainqty.Text = 0+ "";
+                OperateResult.AppendText(">>清除完成,清重新输入SN号\n", Color.Green);
+                isnetcode = false;
+            }
         }
     }
 }

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -103,7 +103,7 @@ namespace UAS_MES.Make
                             if (PrintLabel.SelectedValue != null && PrintNum.Text.Trim() != "")
                             {
                                 Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ma_code.Text, int.Parse(PrintNum.Text));
-                                if (LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "彩盒打印", User.UserSourceCode, User.UserName, "彩盒打印成功", out ErrorMessage))
+                                if (LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "彩盒打印", User.UserSourceCode, User.UserCode, "彩盒打印成功", out ErrorMessage))
                                 {
                                     ErrorMessage = "打印完成,执行更新";
                                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);

+ 5 - 2
UAS-MES/PublicMethod/LogicHandler.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Text;
+using System.Windows;
 using UAS_MES.DataOperate;
 
 namespace UAS_MES.PublicMethod
@@ -994,10 +995,12 @@ namespace UAS_MES.PublicMethod
             Console.WriteLine("CurrentStep" + CurrentStep);
             if (StepCode == CurrentStep)
             {
+                MessageBox.Show("执行打印");
                 InsertMakeProcess(iSN, iMakeCode, iSourceCode, iMPKind, iResult, iUserCode);
                 return true;
             }
             else {
+                MessageBox.Show("执行更新"+ iMakeCode+"," +iSourceCode+","+iSN+","+ iUserCode);
                 return CS_SetFinish(iMakeCode, iSourceCode, iSN, iUserCode, out oErrorMessage);
             }
         }
@@ -1299,9 +1302,9 @@ namespace UAS_MES.PublicMethod
         /// <param name="iResult"></param>
         /// <param name="oErrorMessage"></param>
         /// <returns></returns>
-        public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iMPKind, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
+        public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iMPKind, string iSourceCode, string iUserCode, string iResult, out string oErrorMessage)
         {
-            return SetStepFinish(iMakeCode, iSourceCode, iSnCode, iMPKind, iResult, iUserName, out oErrorMessage);
+            return SetStepFinish(iMakeCode, iSourceCode, iSnCode, iMPKind, iResult, iUserCode, out oErrorMessage);
         }
 
         /// <summary>

+ 9 - 0
UAS-MES/UAS-MES.csproj

@@ -407,6 +407,12 @@
     <Compile Include="Form1.Designer.cs">
       <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_CollectBTMAC.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_CollectBTMAC.Designer.cs">
+      <DependentUpon>Make_CollectBTMAC.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_CollectNetCode.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -875,6 +881,9 @@
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_CollectBTMAC.resx">
+      <DependentUpon>Make_CollectBTMAC.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_CollectNetCode.resx">
       <DependentUpon>Make_CollectNetCode.cs</DependentUpon>
     </EmbeddedResource>