Browse Source

和导入的数据做校验

callm 3 years ago
parent
commit
2a2c9d157b

+ 132 - 132
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.Designer.cs

@@ -42,16 +42,6 @@ namespace UAS_MES_NEW.Make
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.CheckItemDGV = new System.Windows.Forms.DataGridView();
-            this.std_class = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_testresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_sn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_mac = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_bt = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_imei1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_imei2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_googlekey = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_videotest = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_version = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label6 = new System.Windows.Forms.Label();
             this.WatchPath = new System.Windows.Forms.TextBox();
             this.PSN = new System.Windows.Forms.Label();
@@ -70,6 +60,8 @@ namespace UAS_MES_NEW.Make
             this.label21 = new System.Windows.Forms.Label();
             this.Version = new System.Windows.Forms.Label();
             this.label23 = new System.Windows.Forms.Label();
+            this.MTK = new System.Windows.Forms.RadioButton();
+            this.ZHANXUN = new System.Windows.Forms.RadioButton();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -81,11 +73,19 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ReSet = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
+            this.std_class = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_testresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_sn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_mac = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_bt = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_imei1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_imei2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_googlekey = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_videotest = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_version = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
-            this.MTK = new System.Windows.Forms.RadioButton();
-            this.ZHANXUN = new System.Windows.Forms.RadioButton();
             ((System.ComponentModel.ISupportInitialize)(this.CheckItemDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -227,89 +227,6 @@ namespace UAS_MES_NEW.Make
             this.CheckItemDGV.TabIndex = 33;
             this.CheckItemDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.CheckItemDGV_CellPainting);
             // 
-            // std_class
-            // 
-            this.std_class.DataPropertyName = "std_class";
-            this.std_class.HeaderText = "检测项";
-            this.std_class.MinimumWidth = 140;
-            this.std_class.Name = "std_class";
-            this.std_class.ReadOnly = true;
-            this.std_class.Width = 150;
-            // 
-            // std_testresult
-            // 
-            this.std_testresult.DataPropertyName = "std_testresult";
-            this.std_testresult.HeaderText = "测试结果";
-            this.std_testresult.MinimumWidth = 150;
-            this.std_testresult.Name = "std_testresult";
-            this.std_testresult.ReadOnly = true;
-            this.std_testresult.Width = 150;
-            // 
-            // std_sn
-            // 
-            this.std_sn.DataPropertyName = "std_sn";
-            this.std_sn.HeaderText = "SN";
-            this.std_sn.MinimumWidth = 100;
-            this.std_sn.Name = "std_sn";
-            this.std_sn.ReadOnly = true;
-            this.std_sn.Visible = false;
-            this.std_sn.Width = 200;
-            // 
-            // std_mac
-            // 
-            this.std_mac.DataPropertyName = "std_mac";
-            this.std_mac.HeaderText = "MAC";
-            this.std_mac.MinimumWidth = 100;
-            this.std_mac.Name = "std_mac";
-            this.std_mac.Visible = false;
-            this.std_mac.Width = 200;
-            // 
-            // std_bt
-            // 
-            this.std_bt.DataPropertyName = "std_bt";
-            this.std_bt.HeaderText = "BT";
-            this.std_bt.MinimumWidth = 100;
-            this.std_bt.Name = "std_bt";
-            this.std_bt.Visible = false;
-            this.std_bt.Width = 200;
-            // 
-            // std_imei1
-            // 
-            this.std_imei1.DataPropertyName = "std_imei1";
-            this.std_imei1.HeaderText = "IMEI1";
-            this.std_imei1.MinimumWidth = 100;
-            this.std_imei1.Name = "std_imei1";
-            this.std_imei1.Visible = false;
-            // 
-            // std_imei2
-            // 
-            this.std_imei2.DataPropertyName = "std_imei2";
-            this.std_imei2.HeaderText = "IMEI2";
-            this.std_imei2.MinimumWidth = 100;
-            this.std_imei2.Name = "std_imei2";
-            this.std_imei2.Visible = false;
-            // 
-            // std_googlekey
-            // 
-            this.std_googlekey.DataPropertyName = "std_googlekey";
-            this.std_googlekey.HeaderText = "GoogleKey";
-            this.std_googlekey.Name = "std_googlekey";
-            this.std_googlekey.Visible = false;
-            // 
-            // std_videotest
-            // 
-            this.std_videotest.DataPropertyName = "std_videotest";
-            this.std_videotest.HeaderText = "老化测试";
-            this.std_videotest.Name = "std_videotest";
-            this.std_videotest.Visible = false;
-            // 
-            // std_version
-            // 
-            this.std_version.DataPropertyName = "std_version";
-            this.std_version.HeaderText = "软件版本";
-            this.std_version.Name = "std_version";
-            this.std_version.Visible = false;
-            // 
             // label6
             // 
             this.label6.AutoSize = true;
@@ -333,7 +250,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.PSN.AutoSize = true;
             this.PSN.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.PSN.Location = new System.Drawing.Point(980, 161);
+            this.PSN.Location = new System.Drawing.Point(955, 161);
             this.PSN.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PSN.Name = "PSN";
             this.PSN.Size = new System.Drawing.Size(0, 41);
@@ -354,7 +271,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.MAC.AutoSize = true;
             this.MAC.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.MAC.Location = new System.Drawing.Point(980, 234);
+            this.MAC.Location = new System.Drawing.Point(955, 234);
             this.MAC.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.MAC.Name = "MAC";
             this.MAC.Size = new System.Drawing.Size(0, 41);
@@ -375,7 +292,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.BT.AutoSize = true;
             this.BT.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.BT.Location = new System.Drawing.Point(980, 312);
+            this.BT.Location = new System.Drawing.Point(955, 312);
             this.BT.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.BT.Name = "BT";
             this.BT.Size = new System.Drawing.Size(0, 41);
@@ -396,7 +313,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.IMEI1.AutoSize = true;
             this.IMEI1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.IMEI1.Location = new System.Drawing.Point(980, 386);
+            this.IMEI1.Location = new System.Drawing.Point(955, 386);
             this.IMEI1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.IMEI1.Name = "IMEI1";
             this.IMEI1.Size = new System.Drawing.Size(0, 41);
@@ -417,7 +334,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.IMEI2.AutoSize = true;
             this.IMEI2.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.IMEI2.Location = new System.Drawing.Point(980, 458);
+            this.IMEI2.Location = new System.Drawing.Point(1505, 175);
             this.IMEI2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.IMEI2.Name = "IMEI2";
             this.IMEI2.Size = new System.Drawing.Size(0, 41);
@@ -427,7 +344,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label17.Location = new System.Drawing.Point(761, 458);
+            this.label17.Location = new System.Drawing.Point(1276, 165);
             this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(104, 41);
@@ -438,7 +355,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.GoogleKey.AutoSize = true;
             this.GoogleKey.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.GoogleKey.Location = new System.Drawing.Point(980, 529);
+            this.GoogleKey.Location = new System.Drawing.Point(1505, 246);
             this.GoogleKey.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.GoogleKey.Name = "GoogleKey";
             this.GoogleKey.Size = new System.Drawing.Size(0, 41);
@@ -448,7 +365,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label19.AutoSize = true;
             this.label19.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label19.Location = new System.Drawing.Point(761, 529);
+            this.label19.Location = new System.Drawing.Point(1276, 236);
             this.label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label19.Name = "label19";
             this.label19.Size = new System.Drawing.Size(184, 41);
@@ -459,7 +376,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.Aging.AutoSize = true;
             this.Aging.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.Aging.Location = new System.Drawing.Point(980, 603);
+            this.Aging.Location = new System.Drawing.Point(1505, 320);
             this.Aging.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Aging.Name = "Aging";
             this.Aging.Size = new System.Drawing.Size(0, 41);
@@ -469,7 +386,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label21.AutoSize = true;
             this.label21.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label21.Location = new System.Drawing.Point(761, 603);
+            this.label21.Location = new System.Drawing.Point(1276, 310);
             this.label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label21.Name = "label21";
             this.label21.Size = new System.Drawing.Size(146, 41);
@@ -480,7 +397,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.Version.AutoSize = true;
             this.Version.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.Version.Location = new System.Drawing.Point(981, 668);
+            this.Version.Location = new System.Drawing.Point(1506, 385);
             this.Version.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Version.MaximumSize = new System.Drawing.Size(360, 0);
             this.Version.Name = "Version";
@@ -491,13 +408,36 @@ namespace UAS_MES_NEW.Make
             // 
             this.label23.AutoSize = true;
             this.label23.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label23.Location = new System.Drawing.Point(761, 668);
+            this.label23.Location = new System.Drawing.Point(1276, 375);
             this.label23.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label23.Name = "label23";
             this.label23.Size = new System.Drawing.Size(146, 41);
             this.label23.TabIndex = 52;
             this.label23.Text = "软件版本";
             // 
+            // MTK
+            // 
+            this.MTK.AutoSize = true;
+            this.MTK.Checked = true;
+            this.MTK.Location = new System.Drawing.Point(516, 786);
+            this.MTK.Name = "MTK";
+            this.MTK.Size = new System.Drawing.Size(77, 28);
+            this.MTK.TabIndex = 54;
+            this.MTK.TabStop = true;
+            this.MTK.Text = "MTK";
+            this.MTK.UseVisualStyleBackColor = true;
+            // 
+            // ZHANXUN
+            // 
+            this.ZHANXUN.AutoSize = true;
+            this.ZHANXUN.Location = new System.Drawing.Point(613, 786);
+            this.ZHANXUN.Name = "ZHANXUN";
+            this.ZHANXUN.Size = new System.Drawing.Size(89, 28);
+            this.ZHANXUN.TabIndex = 55;
+            this.ZHANXUN.TabStop = true;
+            this.ZHANXUN.Text = "展讯";
+            this.ZHANXUN.UseVisualStyleBackColor = true;
+            // 
             // dataGridViewTextBoxColumn1
             // 
             this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
@@ -591,6 +531,89 @@ namespace UAS_MES_NEW.Make
             this.ReSet.Text = "恢复出厂设置";
             this.ReSet.UseVisualStyleBackColor = true;
             // 
+            // std_class
+            // 
+            this.std_class.DataPropertyName = "std_class";
+            this.std_class.HeaderText = "检测项";
+            this.std_class.MinimumWidth = 140;
+            this.std_class.Name = "std_class";
+            this.std_class.ReadOnly = true;
+            this.std_class.Width = 150;
+            // 
+            // std_testresult
+            // 
+            this.std_testresult.DataPropertyName = "std_testresult";
+            this.std_testresult.HeaderText = "测试结果";
+            this.std_testresult.MinimumWidth = 150;
+            this.std_testresult.Name = "std_testresult";
+            this.std_testresult.ReadOnly = true;
+            this.std_testresult.Width = 150;
+            // 
+            // std_sn
+            // 
+            this.std_sn.DataPropertyName = "std_sn";
+            this.std_sn.HeaderText = "SN";
+            this.std_sn.MinimumWidth = 100;
+            this.std_sn.Name = "std_sn";
+            this.std_sn.ReadOnly = true;
+            this.std_sn.Visible = false;
+            this.std_sn.Width = 200;
+            // 
+            // std_mac
+            // 
+            this.std_mac.DataPropertyName = "std_mac";
+            this.std_mac.HeaderText = "MAC";
+            this.std_mac.MinimumWidth = 100;
+            this.std_mac.Name = "std_mac";
+            this.std_mac.Visible = false;
+            this.std_mac.Width = 200;
+            // 
+            // std_bt
+            // 
+            this.std_bt.DataPropertyName = "std_bt";
+            this.std_bt.HeaderText = "BT";
+            this.std_bt.MinimumWidth = 100;
+            this.std_bt.Name = "std_bt";
+            this.std_bt.Visible = false;
+            this.std_bt.Width = 200;
+            // 
+            // std_imei1
+            // 
+            this.std_imei1.DataPropertyName = "std_imei1";
+            this.std_imei1.HeaderText = "IMEI1";
+            this.std_imei1.MinimumWidth = 100;
+            this.std_imei1.Name = "std_imei1";
+            this.std_imei1.Visible = false;
+            // 
+            // std_imei2
+            // 
+            this.std_imei2.DataPropertyName = "std_imei2";
+            this.std_imei2.HeaderText = "IMEI2";
+            this.std_imei2.MinimumWidth = 100;
+            this.std_imei2.Name = "std_imei2";
+            this.std_imei2.Visible = false;
+            // 
+            // std_googlekey
+            // 
+            this.std_googlekey.DataPropertyName = "std_googlekey";
+            this.std_googlekey.HeaderText = "GoogleKey";
+            this.std_googlekey.Name = "std_googlekey";
+            this.std_googlekey.Visible = false;
+            // 
+            // std_videotest
+            // 
+            this.std_videotest.DataPropertyName = "std_videotest";
+            this.std_videotest.HeaderText = "老化测试";
+            this.std_videotest.Name = "std_videotest";
+            this.std_videotest.Visible = false;
+            // 
+            // std_version
+            // 
+            this.std_version.DataPropertyName = "std_version";
+            this.std_version.HeaderText = "软件版本";
+            this.std_version.Name = "std_version";
+            this.std_version.Visible = false;
+            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
@@ -621,36 +644,13 @@ namespace UAS_MES_NEW.Make
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(1477, 154);
+            this.OperateResult.Location = new System.Drawing.Point(768, 437);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(282, 607);
+            this.OperateResult.Size = new System.Drawing.Size(991, 324);
             this.OperateResult.TabIndex = 27;
             this.OperateResult.Text = "";
             // 
-            // MTK
-            // 
-            this.MTK.AutoSize = true;
-            this.MTK.Checked = true;
-            this.MTK.Location = new System.Drawing.Point(516, 786);
-            this.MTK.Name = "MTK";
-            this.MTK.Size = new System.Drawing.Size(77, 28);
-            this.MTK.TabIndex = 54;
-            this.MTK.TabStop = true;
-            this.MTK.Text = "MTK";
-            this.MTK.UseVisualStyleBackColor = true;
-            // 
-            // ZHANXUN
-            // 
-            this.ZHANXUN.AutoSize = true;
-            this.ZHANXUN.Location = new System.Drawing.Point(613, 786);
-            this.ZHANXUN.Name = "ZHANXUN";
-            this.ZHANXUN.Size = new System.Drawing.Size(89, 28);
-            this.ZHANXUN.TabIndex = 55;
-            this.ZHANXUN.TabStop = true;
-            this.ZHANXUN.Text = "展讯";
-            this.ZHANXUN.UseVisualStyleBackColor = true;
-            // 
             // Make_GetTestFileData
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 57 - 1
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.cs

@@ -93,7 +93,8 @@ namespace UAS_MES_NEW.Make
                     string ms_prodcode = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_id='" + oMsid + "'").ToString();
                     DataTable dt = new DataTable();
                     BaseUtil.GetDataFromDevice("GETFILE", WatchPath.Text + " ./" + DateTime.Now.ToString("yyyy-MM-dd") + @"/" + sncode.Text);
-                    string[] files = Directory.GetFiles(Application.StartupPath + "/" + DateTime.Now.ToString("yyyy-MM-dd") + @"/" + sncode.Text+"/factory", "*.csv");
+                    Console.WriteLine(Application.StartupPath + "/" + DateTime.Now.ToString("yyyy-MM-dd") + @"/" + sncode.Text);
+                    string[] files = Directory.GetFiles(Application.StartupPath + "/" + DateTime.Now.ToString("yyyy-MM-dd") + @"/" + sncode.Text + "", "*.csv");
                     BaseUtil.OpenCSVFile(ref dt, files[0]);
                     //移除标题行
                     dt.Rows.RemoveAt(0);
@@ -128,6 +129,61 @@ namespace UAS_MES_NEW.Make
                         }
                         dh.ExecuteSql("insert into STEPTESTDETAIL(std_id,std_sn,std_indate,std_class,std_testtimes,std_testresult,std_badcode) values(STEPTESTDETAIL_seq.nextval,'" + sncode.Text + "',sysdate,'" + dt.Rows[i]["std_class"].ToString() + "','','" + dt.Rows[i]["std_testresult"].ToString() + "','')", "insert");
                     }
+                    //IMEI核对
+                    dt = (DataTable)dh.ExecuteSql("select mil_imei1,mil_imei2 from makeimeilist where mil_psn='" + PSN.Text + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        string imei1 = dt.Rows[0]["mil_imei1"].ToString();
+                        string imei2 = dt.Rows[0]["mil_imei2"].ToString();
+                        if (IMEI1.Text == imei1 && IMEI1.Text != "")
+                        {
+                            OperateResult.AppendText(PSN.Text + "【IMEI1】比对成功\n", Color.Green);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(PSN.Text + "读取【IMEI1】:"+IMEI1.Text+",系统导入:"+imei1+",比对失败\n", Color.Red);
+                        }
+                        if (IMEI2.Text == imei2 && IMEI2.Text != "")
+                        {
+                            OperateResult.AppendText(PSN.Text + "【IMEI2】比对成功\n", Color.Green);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(PSN.Text + "读取【IMEI2】:" + IMEI2.Text + ",系统导入:" + imei2 + ",比对失败\n", Color.Red);
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(PSN.Text + "未导入IMEI\n",Color.Red);
+                    }
+                    //MAC核对
+                    dt = (DataTable)dh.ExecuteSql("select mal_mac,mal_bt from makeaddresslist where mal_sncode='" + PSN.Text + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        string mac = dt.Rows[0]["mal_mac"].ToString();
+                        string bt = dt.Rows[0]["mal_bt"].ToString();
+                        if (MAC.Text == mac && MAC.Text != "")
+                        {
+                            OperateResult.AppendText(PSN.Text + "【MAC】比对成功\n", Color.Green);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(PSN.Text + "读取【MAC】:" + MAC.Text + ",系统导入:" + mac + ",比对失败\n", Color.Red);
+                        }
+                        if (BT.Text == bt && BT.Text != "")
+                        {
+                            OperateResult.AppendText(PSN.Text + "【BT】比对成功\n", Color.Green);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(PSN.Text + "读取【BT】:" + BT.Text + ",系统导入:" + bt + ",比对失败\n", Color.Red);
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(PSN.Text + "未导入MAC/BT\n",Color.Red);
+                    }
+
                     //if (Aging.Text == "")
                     //{
                     //    OperateResult.AppendText(">>" + sncode.Text + "设备未进行老化测试\n");