Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

章政 8 years ago
parent
commit
de92da9dbf

+ 7 - 7
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -361,7 +361,7 @@ namespace UAS_MES.Make
                 case "IMEI1":
                 case "IMEI2":
                 case "IMEI3":
-                    if (!ChangeResult.Checked&&checkExist("ms_imei1='" + code.Text + "' or ms_imei2 = '" + code.Text + "' or ms_imei3 = '" + code.Text + "'"))
+                    if (!ChangeResult.Checked&&checkExist("ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  (ms_imei1='" + code.Text + "' or ms_imei2 = '" + code.Text + "' or ms_imei3 = '" + code.Text + "')"))
                     {
                         OperateResult.AppendText(">>" + type + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                         OperateResult.AppendText(">>请输入" + type + "\n", Color.Black,code);
@@ -384,7 +384,7 @@ namespace UAS_MES.Make
                 case "BT":
                 case "MAC":
                 case "NETCODE":
-                    if (!ChangeResult.Checked&&checkExist("MS_" + type + "='" + code.Text + "'"))
+                    if (!ChangeResult.Checked&&checkExist("ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  MS_" + type + "='" + code.Text + "'"))
                     {
                         OperateResult.AppendText(">>" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                         OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black,code);
@@ -409,7 +409,7 @@ namespace UAS_MES.Make
                         //遍历判断已采集的信息是否已存在
                         foreach (DictionaryEntry de in hs)
                         {
-                            if (dh.CheckExist("makeserial", "MS_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "'"))
+                            if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  MS_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "'"))
                             {
                                 flag = false;
                                 OperateResult.AppendText(">>" + de.Key + "已被使用,请重新输入TSN,重新转换\n", Color.Red);
@@ -612,10 +612,10 @@ namespace UAS_MES.Make
                     }
                     if (rules.Rows[0]["psr_length"].ToString() != "")
                     {
-                        TSNLength.Text = rules.Rows[0]["psr_length"].ToString();
-                        TSNLength.Enabled = false;
-                        TSNLength_checkBox.Checked = true;
-                        TSNLength_checkBox.Enabled = false;
+                        SNLength.Text = rules.Rows[0]["psr_length"].ToString();
+                        SNLength.Enabled = false;
+                        SNLength_checkBox.Checked = true;
+                        SNLength_checkBox.Enabled = false;
                     }
                 }
             }

+ 110 - 82
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.Designer.cs

@@ -29,23 +29,25 @@
         private void InitializeComponent()
         {
             this.collectCodeRules = new System.Windows.Forms.DataGridView();
+            this.psr_type = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.psr_prefix = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.psr_length = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label1 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.collects = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
-            this.Imei3 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
-            this.Imei2 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
-            this.Imei1 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
-            this.NetCode = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
-            this.Bt = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.Mac = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.Bt = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.NetCode = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.Imei1 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.Imei2 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.Imei3 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.inputValue = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
-            this.psr_type = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.psr_prefix = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.psr_length = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.collectCodeRules)).BeginInit();
             this.collects.SuspendLayout();
             this.SuspendLayout();
@@ -56,20 +58,50 @@
             this.collectCodeRules.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.psr_type,
             this.psr_prefix,
-            this.psr_length});
+            this.psr_length,
+            this.Column1});
             this.collectCodeRules.Location = new System.Drawing.Point(279, 70);
             this.collectCodeRules.Name = "collectCodeRules";
+            this.collectCodeRules.RowHeadersVisible = false;
             this.collectCodeRules.RowTemplate.Height = 30;
             this.collectCodeRules.Size = new System.Drawing.Size(733, 235);
             this.collectCodeRules.TabIndex = 6;
             // 
+            // psr_type
+            // 
+            this.psr_type.DataPropertyName = "psr_type";
+            this.psr_type.HeaderText = "采集项";
+            this.psr_type.Name = "psr_type";
+            this.psr_type.Width = 150;
+            // 
+            // psr_prefix
+            // 
+            this.psr_prefix.DataPropertyName = "psr_prefix";
+            this.psr_prefix.HeaderText = "前缀";
+            this.psr_prefix.Name = "psr_prefix";
+            this.psr_prefix.Width = 150;
+            // 
+            // psr_length
+            // 
+            this.psr_length.DataPropertyName = "psr_length";
+            this.psr_length.HeaderText = "长度";
+            this.psr_length.Name = "psr_length";
+            this.psr_length.Width = 150;
+            // 
+            // Column1
+            // 
+            this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Column1.HeaderText = "";
+            this.Column1.Name = "Column1";
+            this.Column1.Width = 5;
+            // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.Location = new System.Drawing.Point(275, 27);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(106, 24);
+            this.label1.Size = new System.Drawing.Size(110, 31);
             this.label1.TabIndex = 7;
             this.label1.Text = "防呆规则";
             // 
@@ -100,15 +132,21 @@
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.Width = 230;
             // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.HeaderText = "Column1";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.Width = 5;
+            // 
             // collects
             // 
             this.collects.BorderColor = System.Drawing.Color.Black;
-            this.collects.Controls.Add(this.Imei3);
-            this.collects.Controls.Add(this.Imei2);
-            this.collects.Controls.Add(this.Imei1);
-            this.collects.Controls.Add(this.NetCode);
-            this.collects.Controls.Add(this.Bt);
             this.collects.Controls.Add(this.Mac);
+            this.collects.Controls.Add(this.Bt);
+            this.collects.Controls.Add(this.NetCode);
+            this.collects.Controls.Add(this.Imei1);
+            this.collects.Controls.Add(this.Imei2);
+            this.collects.Controls.Add(this.Imei3);
             this.collects.Location = new System.Drawing.Point(27, 18);
             this.collects.Name = "collects";
             this.collects.Size = new System.Drawing.Size(185, 287);
@@ -116,38 +154,29 @@
             this.collects.TabStop = false;
             this.collects.TextColor = System.Drawing.Color.Black;
             // 
-            // Imei3
-            // 
-            this.Imei3.AutoSize = true;
-            this.Imei3.Location = new System.Drawing.Point(37, 239);
-            this.Imei3.Name = "Imei3";
-            this.Imei3.Power = null;
-            this.Imei3.Size = new System.Drawing.Size(79, 22);
-            this.Imei3.TabIndex = 5;
-            this.Imei3.Text = "IMEI3";
-            this.Imei3.UseVisualStyleBackColor = true;
-            // 
-            // Imei2
+            // Mac
             // 
-            this.Imei2.AutoSize = true;
-            this.Imei2.Location = new System.Drawing.Point(37, 196);
-            this.Imei2.Name = "Imei2";
-            this.Imei2.Power = null;
-            this.Imei2.Size = new System.Drawing.Size(79, 22);
-            this.Imei2.TabIndex = 4;
-            this.Imei2.Text = "IMEI2";
-            this.Imei2.UseVisualStyleBackColor = true;
+            this.Mac.AutoSize = true;
+            this.Mac.Location = new System.Drawing.Point(37, 31);
+            this.Mac.Name = "Mac";
+            this.Mac.Power = null;
+            this.Mac.Size = new System.Drawing.Size(106, 22);
+            this.Mac.TabIndex = 5;
+            this.Mac.Text = "MAC/WIFI";
+            this.Mac.UseVisualStyleBackColor = true;
+            this.Mac.CheckedChanged += new System.EventHandler(this.Mac_CheckedChanged);
             // 
-            // Imei1
+            // Bt
             // 
-            this.Imei1.AutoSize = true;
-            this.Imei1.Location = new System.Drawing.Point(37, 156);
-            this.Imei1.Name = "Imei1";
-            this.Imei1.Power = null;
-            this.Imei1.Size = new System.Drawing.Size(79, 22);
-            this.Imei1.TabIndex = 3;
-            this.Imei1.Text = "IMEI1";
-            this.Imei1.UseVisualStyleBackColor = true;
+            this.Bt.AutoSize = true;
+            this.Bt.Location = new System.Drawing.Point(37, 74);
+            this.Bt.Name = "Bt";
+            this.Bt.Power = null;
+            this.Bt.Size = new System.Drawing.Size(52, 22);
+            this.Bt.TabIndex = 4;
+            this.Bt.Text = "BT";
+            this.Bt.UseVisualStyleBackColor = true;
+            this.Bt.CheckedChanged += new System.EventHandler(this.Mac_CheckedChanged);
             // 
             // NetCode
             // 
@@ -156,31 +185,46 @@
             this.NetCode.Name = "NetCode";
             this.NetCode.Power = null;
             this.NetCode.Size = new System.Drawing.Size(70, 22);
-            this.NetCode.TabIndex = 2;
+            this.NetCode.TabIndex = 3;
             this.NetCode.Text = "网标";
             this.NetCode.UseVisualStyleBackColor = true;
+            this.NetCode.CheckedChanged += new System.EventHandler(this.Mac_CheckedChanged);
             // 
-            // Bt
+            // Imei1
             // 
-            this.Bt.AutoSize = true;
-            this.Bt.Location = new System.Drawing.Point(37, 74);
-            this.Bt.Name = "Bt";
-            this.Bt.Power = null;
-            this.Bt.Size = new System.Drawing.Size(52, 22);
-            this.Bt.TabIndex = 1;
-            this.Bt.Text = "BT";
-            this.Bt.UseVisualStyleBackColor = true;
+            this.Imei1.AutoSize = true;
+            this.Imei1.Location = new System.Drawing.Point(37, 156);
+            this.Imei1.Name = "Imei1";
+            this.Imei1.Power = null;
+            this.Imei1.Size = new System.Drawing.Size(79, 22);
+            this.Imei1.TabIndex = 2;
+            this.Imei1.Text = "IMEI1";
+            this.Imei1.UseVisualStyleBackColor = true;
+            this.Imei1.CheckedChanged += new System.EventHandler(this.Mac_CheckedChanged);
             // 
-            // Mac
+            // Imei2
             // 
-            this.Mac.AutoSize = true;
-            this.Mac.Location = new System.Drawing.Point(37, 31);
-            this.Mac.Name = "Mac";
-            this.Mac.Power = null;
-            this.Mac.Size = new System.Drawing.Size(106, 22);
-            this.Mac.TabIndex = 0;
-            this.Mac.Text = "MAC/WIFI";
-            this.Mac.UseVisualStyleBackColor = true;
+            this.Imei2.AutoSize = true;
+            this.Imei2.Location = new System.Drawing.Point(37, 196);
+            this.Imei2.Name = "Imei2";
+            this.Imei2.Power = null;
+            this.Imei2.Size = new System.Drawing.Size(79, 22);
+            this.Imei2.TabIndex = 1;
+            this.Imei2.Text = "IMEI2";
+            this.Imei2.UseVisualStyleBackColor = true;
+            this.Imei2.CheckedChanged += new System.EventHandler(this.Mac_CheckedChanged);
+            // 
+            // Imei3
+            // 
+            this.Imei3.AutoSize = true;
+            this.Imei3.Location = new System.Drawing.Point(37, 239);
+            this.Imei3.Name = "Imei3";
+            this.Imei3.Power = null;
+            this.Imei3.Size = new System.Drawing.Size(79, 22);
+            this.Imei3.TabIndex = 0;
+            this.Imei3.Text = "IMEI3";
+            this.Imei3.UseVisualStyleBackColor = true;
+            this.Imei3.CheckedChanged += new System.EventHandler(this.Mac_CheckedChanged);
             // 
             // inputValue
             // 
@@ -207,24 +251,6 @@
             this.OperateResult.TabIndex = 88;
             this.OperateResult.Text = "";
             // 
-            // psr_type
-            // 
-            this.psr_type.HeaderText = "采集项";
-            this.psr_type.Name = "psr_type";
-            this.psr_type.Width = 150;
-            // 
-            // psr_prefix
-            // 
-            this.psr_prefix.HeaderText = "前缀";
-            this.psr_prefix.Name = "psr_prefix";
-            this.psr_prefix.Width = 150;
-            // 
-            // psr_length
-            // 
-            this.psr_length.HeaderText = "长度";
-            this.psr_length.Name = "psr_length";
-            this.psr_length.Width = 150;
-            // 
             // Make_UpdateCollectCode
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -266,8 +292,10 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
         private System.Windows.Forms.DataGridViewTextBoxColumn psr_type;
         private System.Windows.Forms.DataGridViewTextBoxColumn psr_prefix;
         private System.Windows.Forms.DataGridViewTextBoxColumn psr_length;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
     }
 }

+ 43 - 17
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.cs

@@ -32,7 +32,11 @@ namespace UAS_MES.Make
         string ms_id = "";
 
         StringBuilder sb ;
+
         string sncode = "";
+        StringBuilder oldData ;
+        //记录新数据
+        StringBuilder newData ;
         public Make_UpdateCollectCode()
         {
             InitializeComponent();
@@ -41,8 +45,9 @@ namespace UAS_MES.Make
         private void Make_UpdateCollectCode_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dt = new DataTable();
+            dh = new DataHelper();
             OperateResult.AppendText(">>请先勾选需要更新的项,通过采集栏输入SN,更新项具体数据\n", Color.Black);
+            inputValue.Focus();
         }
 
         private void Make_UpdateCollectCode_FormClosing(object sender, FormClosingEventArgs e)
@@ -65,6 +70,7 @@ namespace UAS_MES.Make
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                     return;
                 }
+                OperateResult.AppendText(">>"+inputValue.Text+"\n", Color.Black);
                 if (step == 0)
                 {
                     //判断是否有已勾选的项次
@@ -75,10 +81,10 @@ namespace UAS_MES.Make
                             list.Add((ctl as CheckBox));
                         }
                     }
-                    if (list.Count>0)
+                    if (list.Count==0)
                     {
                         //无勾选的内容
-                        OperateResult.AppendText("<<请先勾选需要更新的信息\n", Color.Red);
+                        OperateResult.AppendText("<<请先勾选需要更新的信息\n", Color.Red,inputValue);
                         return;
                     }
                     //判断TSN或者SN是否存在
@@ -101,7 +107,7 @@ namespace UAS_MES.Make
                     sql.Append("select * from (select rownum rn, ms_prodcode,ms_makecode,ms_salecode,");
                     sql.Append("ms_mac,ms_imei1,ms_bt,ms_netcode,ms_imei2,ms_imei3  from makeserial ");
                     sql.Append("where ms_firstsn=(select ms_firstsn from makeserial where ms_id='"+ms_id+"')");
-                    sql.Append(" and (nvl(ms_mac,' ')<>' ' or nvl(ms_bt,' ')<>' ' or nvl(ms_imei1,' ')<>' ' ) order by ms_id asc)where rn=1;");
+                    sql.Append(" and (nvl(ms_mac,' ')<>' ' or nvl(ms_bt,' ')<>' ' or nvl(ms_imei1,' ')<>' ' ) order by ms_id asc)where rn=1");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
                     //无值则提示没有需要更新的信息
                     if (dt.Rows.Count == 0)
@@ -111,13 +117,15 @@ namespace UAS_MES.Make
                     }
                     else
                     {
-                        info = (DataTable)dh.ExecuteSql("select psr_type,psr_prefix,psr_length from productsnrule where psr_prodcode='"+dt.Rows[0]["ms_prodcode"].ToString() +"'", "select");
+                        info = (DataTable)dh.ExecuteSql("select psr_type,psr_prefix,psr_length from productsnrelation where psr_prodcode='"+dt.Rows[0]["ms_prodcode"].ToString() +"'", "select");
                         //查询规则显示
                         collectCodeRules.DataSource = info;
                     }
                     step = 1;
                     OperateResult.AppendText("<<请输入"+((CheckBox)list[0]).Text+"\n", Color.Green, inputValue);
                     sb = new StringBuilder();
+                    oldData = new StringBuilder();
+                    newData = new StringBuilder();
                 }
                 else
                 //采集的关联采集信息
@@ -131,6 +139,8 @@ namespace UAS_MES.Make
                             {
                                 //如果一样提示用户“MAC 不允许与原来的值一致”,“请采集MAC”;
                                 OperateResult.AppendText("<<" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + "不允许与原来的值一致\n", Color.Red);
+                                OperateResult.AppendText(">>请采集" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + "\n", Color.Black,inputValue);
+                                return;
                             }
                             else
                             {
@@ -150,13 +160,15 @@ namespace UAS_MES.Make
                                     return;
                                 }
                                 //验证长度前缀通过,验证数据库
-                                if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  ms_'"+ ((CheckBox)list[step - 1]).Text.Split('/')[0] + "'='"+inputValue.Text+"'"))
+                                if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  ms_"+ ((CheckBox)list[step - 1]).Text.Split('/')[0] + " ='"+inputValue.Text+"'"))
                                 {
                                     OperateResult.AppendText("<<" + ((CheckBox)list[step - 1]).Text + ":" + inputValue.Text + "错误,已被使用\n", Color.Red, inputValue);
                                     return;
                                 }
                                 //通过校验
                                 sb.Append("ms_"+((CheckBox)list[step - 1]).Text.Split('/')[0]+" = '"+inputValue.Text+"',");
+                                oldData.Append("ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + ":"+ dt.Rows[0]["ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0]].ToString()+",");
+                                newData.Append("ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + ":" +inputValue.Text+",");
                             }
                             break;
                         case "网标":
@@ -168,13 +180,15 @@ namespace UAS_MES.Make
                                 return;
                             }
                             //验证长度前缀通过,验证数据库
-                            if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  ms_'" + ((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text + "'='" + inputValue.Text + "'"))
+                            if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')<>' ' and  ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " ='" + inputValue.Text + "'"))
                             {
                                 OperateResult.AppendText("<<" + ((CheckBox)list[step - 1]).Text + ":" + inputValue.Text + "错误,已被使用\n", Color.Red, inputValue);
                                 return;
                             }
                             //通过校验
-                            sb.Append("ms_" + ((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text+" = '"+inputValue.Text+"',");
+                            sb.Append("ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text)+" = '"+inputValue.Text+"',");
+                            oldData.Append("ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + ":" + dt.Rows[0]["ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text)].ToString() + ",");
+                            newData.Append("ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + ":" + inputValue.Text + ",");
                             break;
                     }
                     //判断是否是最后一个
@@ -189,13 +203,13 @@ namespace UAS_MES.Make
                         //提示烧录成功
                         OperateResult.AppendText(">>烧录成功\n", Color.Green);
                         //记录日志
-                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "更新烧录", "转换成功", sncode,"");
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "更新烧录", "原数据:"+oldData.ToString()+"新数据:"+newData.ToString(), sncode,"");
                         step = 0;
                         //清除规则
-                        dt = null;
+                        BaseUtil.CleanDataTableData(info);
                         //聚焦,提示
                         inputValue.Focus();
-                        OperateResult.AppendText("<<请采集SN\n", Color.Black);
+                        OperateResult.AppendText("<<请采集SN\n", Color.Black,inputValue);
                         //清除LIST
                         list.Clear();
                     }
@@ -203,7 +217,7 @@ namespace UAS_MES.Make
                     {
                         step++;
                         //请输入下一个
-                        OperateResult.AppendText(">>请采集" + ((CheckBox)list[step-1]).Text.Split('/')[0] + "\n", Color.Black);
+                        OperateResult.AppendText(">>请输入" + ((CheckBox)list[step-1]).Text.Split('/')[0] + "\n", Color.Green,inputValue);
                     }
                 }
             }
@@ -220,7 +234,6 @@ namespace UAS_MES.Make
                     {
                         OperateResult.AppendText(">>" + info.Rows[i]["psr_type"] + "长度校验不通过,请重新输入\n", Color.Red);
                         OperateResult.AppendText(">>请重新输入" + info.Rows[i]["psr_type"] + "\n", Color.Black, inputValue);
-                        break;
                         return false;
                     }
                     //校验前缀
@@ -241,15 +254,28 @@ namespace UAS_MES.Make
                     {
                         OperateResult.AppendText(">>" + info.Rows[i]["psr_type"] + "前缀校验不通过,请重新输入\n", Color.Red);
                         OperateResult.AppendText(">>请重新输入" + info.Rows[i]["psr_type"] + "\n", Color.Black, inputValue);
-                        break;
                         return false;
                     }
-                    break;
                     return true;
                 }
             }
-            OperateResult.AppendText(">>无对应规则\n", Color.Red, inputValue);
-            return false;
+            return true;
+        }
+
+        private void Mac_CheckedChanged(object sender, EventArgs e)
+        {
+            //当有checkBox状态改变的时候
+            if (step!=0)
+            {
+                //步骤码归零
+                step = 0;
+                //清除list,信息栏
+                list.Clear();
+                BaseUtil.CleanDataTableData(info);
+                //聚焦,提示
+                inputValue.Focus();
+                OperateResult.AppendText(">>请采集SN\n", Color.Black);
+            }
         }
     }
 }

+ 3 - 0
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.resx

@@ -126,4 +126,7 @@
   <metadata name="psr_length.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>