callm 4 жил өмнө
parent
commit
163ccf9f7b

+ 340 - 0
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.Designer.cs

@@ -0,0 +1,340 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_GetTestFileData
+    {
+        /// <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.pr_detail = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.remain_qty = new System.Windows.Forms.Label();
+            this.mcd_okqty = new System.Windows.Forms.Label();
+            this.ma_prodcode = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.CheckItemDGV = new System.Windows.Forms.DataGridView();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = 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.std_class = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_testtimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_testresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckItemDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_detail.Location = new System.Drawing.Point(1258, 38);
+            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, 41);
+            this.pr_detail.TabIndex = 31;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(64, 788);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(53, 35);
+            this.label10.TabIndex = 28;
+            this.label10.Text = "SN";
+            // 
+            // remain_qty
+            // 
+            this.remain_qty.AutoSize = true;
+            this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.remain_qty.Location = new System.Drawing.Point(204, 130);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.remain_qty.Name = "remain_qty";
+            this.remain_qty.Size = new System.Drawing.Size(0, 41);
+            this.remain_qty.TabIndex = 26;
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.mcd_okqty.Location = new System.Drawing.Point(724, 130);
+            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(0, 41);
+            this.mcd_okqty.TabIndex = 25;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_prodcode.Location = new System.Drawing.Point(724, 38);
+            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, 41);
+            this.ma_prodcode.TabIndex = 24;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.Location = new System.Drawing.Point(204, 38);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 41);
+            this.ma_code.TabIndex = 23;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label5.Location = new System.Drawing.Point(574, 130);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(210, 41);
+            this.label5.TabIndex = 22;
+            this.label5.Text = "当前工单计数";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label4.Location = new System.Drawing.Point(54, 130);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(114, 41);
+            this.label4.TabIndex = 21;
+            this.label4.Text = "剩余数";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label3.Location = new System.Drawing.Point(1102, 38);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 20;
+            this.label3.Text = "产品名称";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label2.Location = new System.Drawing.Point(570, 38);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 19;
+            this.label2.Text = "产品编号";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label1.Location = new System.Drawing.Point(50, 38);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 18;
+            this.label1.Text = "工单编号";
+            // 
+            // CheckItemDGV
+            // 
+            this.CheckItemDGV.AllowUserToAddRows = false;
+            this.CheckItemDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.CheckItemDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.std_class,
+            this.std_testtimes,
+            this.std_testresult,
+            this.std_badcode});
+            this.CheckItemDGV.Location = new System.Drawing.Point(57, 199);
+            this.CheckItemDGV.Name = "CheckItemDGV";
+            this.CheckItemDGV.RowTemplate.Height = 37;
+            this.CheckItemDGV.Size = new System.Drawing.Size(1128, 562);
+            this.CheckItemDGV.TabIndex = 33;
+            this.CheckItemDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.CheckItemDGV_CellPainting);
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "psr_type";
+            this.dataGridViewTextBoxColumn1.HeaderText = "检测项";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 150;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "psr_systemvalue";
+            this.dataGridViewTextBoxColumn2.HeaderText = "系统值";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 460;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "psr_systemvalue";
+            this.dataGridViewTextBoxColumn3.HeaderText = "本机值";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 460;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(1102, 130);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 32;
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(144, 788);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(334, 35);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 29;
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // 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(1265, 199);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(454, 562);
+            this.OperateResult.TabIndex = 27;
+            this.OperateResult.Text = "";
+            // 
+            // std_class
+            // 
+            this.std_class.DataPropertyName = "std_class";
+            this.std_class.HeaderText = "检测项";
+            this.std_class.MinimumWidth = 130;
+            this.std_class.Name = "std_class";
+            this.std_class.ReadOnly = true;
+            this.std_class.Width = 150;
+            // 
+            // std_testtimes
+            // 
+            this.std_testtimes.DataPropertyName = "std_testtimes";
+            this.std_testtimes.HeaderText = "测试次数";
+            this.std_testtimes.MinimumWidth = 200;
+            this.std_testtimes.Name = "std_testtimes";
+            this.std_testtimes.ReadOnly = true;
+            this.std_testtimes.Width = 468;
+            // 
+            // std_testresult
+            // 
+            this.std_testresult.DataPropertyName = "std_testresult";
+            this.std_testresult.HeaderText = "测试结果";
+            this.std_testresult.MinimumWidth = 200;
+            this.std_testresult.Name = "std_testresult";
+            this.std_testresult.ReadOnly = true;
+            this.std_testresult.Width = 467;
+            // 
+            // std_badcode
+            // 
+            this.std_badcode.DataPropertyName = "std_badcode";
+            this.std_badcode.HeaderText = "故障代码";
+            this.std_badcode.MinimumWidth = 200;
+            this.std_badcode.Name = "std_badcode";
+            this.std_badcode.Width = 200;
+            // 
+            // Make_GetTestFileData
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1772, 866);
+            this.Controls.Add(this.CheckItemDGV);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.remain_qty);
+            this.Controls.Add(this.mcd_okqty);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Make_GetTestFileData";
+            this.Tag = "Make!ReadWriteInfo";
+            this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.CheckItemDGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label pr_detail;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Label remain_qty;
+        private System.Windows.Forms.Label mcd_okqty;
+        private System.Windows.Forms.Label ma_prodcode;
+        private System.Windows.Forms.Label ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.DataGridView CheckItemDGV;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_class;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_testtimes;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_testresult;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_badcode;
+    }
+}

+ 172 - 0
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.cs

@@ -0,0 +1,172 @@
+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_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_GetTestFileData : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        LogStringBuilder sql;
+
+        string oErrorMessage = "";
+
+        string omakeCode = "";
+
+        string oMsid = "";
+        public Make_GetTestFileData()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_LabelCheck_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            //聚焦SN号
+            sncode.Focus();
+            //打开界面提示用户:请输入SN 
+            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+            sql = new LogStringBuilder();
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+
+        private void Make_LabelCheck_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断是enter事件
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    return;
+                }
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out oErrorMessage))
+                {
+                    if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sncode.Text, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                    {
+                        DataTable dt = new DataTable();
+                        BaseUtil.OpenCSVFile(ref dt, @"C:\Users\callm\Desktop\品网\2019_04_04_19_59_18_788.csv");
+                        //移除标题行
+                        dt.Rows.RemoveAt(0);
+                        //设置列名绑定数据
+                        dt.Columns[0].ColumnName = "std_class";
+                        dt.Columns[1].ColumnName = "std_testtimes";
+                        dt.Columns[2].ColumnName = "std_testresult";
+                        dt.Columns[3].ColumnName = "std_badcode";
+                        CheckItemDGV.DataSource = dt;
+                        bool Result = true;
+                        for (int i = 0; i < dt.Rows.Count; i++)
+                        {
+                            if (dt.Rows[i]["std_testresult"].ToString() != "OK")
+                            {
+                                Result = false;
+                            }
+                            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_testtimes"].ToString() + "','" + dt.Rows[i]["std_testresult"].ToString() + "','" + dt.Rows[i]["std_badcode"].ToString() + "')", "insert");
+                        }
+                        if (Result)
+                        {
+                            if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, sncode.Text, "", "OK", User.UserCode, out oErrorMessage))
+                            {
+                                //提示正确返回时传递的信息
+                                if (oErrorMessage.Contains("AFTERSUCCESS"))
+                                    OperateResult.AppendText(">>" + oErrorMessage + "\n");
+                                //根据工单号查询makecraftdetail 表中的 mcd_okqty 计数,剩余数为ma_qty - nvl(mcd_inqty,0),刷新页面中工单信息的显示
+                                sql.Clear();
+                                sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode,pr_detail,");
+                                sql.Append("ma_qty - nvl(mcd_okqty, 0) remain_qty from make left join makecraftdetail on ");
+                                sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + omakeCode + "'  and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                BaseUtil.SetFormValue(Controls, dt);
+                                //将SN,时间,结果记录在页面
+                                //记录日志
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "标签核对", "参数核对成功", sncode.Text, "");
+                                //SN核对成功
+                                //>> 请输入SN
+                                OperateResult.AppendText("<<"+sncode.Text+"信息核对成功\n", Color.Green, sncode);
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                SetCheck set = new SetCheck("OK", Color.Green);
+                                BaseUtil.SetFormCenter(set);
+                                set.ShowDialog();
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                            }
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>序列号" + sncode.Text + "测试不通过\n", Color.Red, sncode);
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                }
+            }
+        }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
+
+        private void CheckItemDGV_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
+        {
+            //系统值和
+            if (e.ColumnIndex >= 0)
+            {
+                if (CheckItemDGV.Columns[e.ColumnIndex].Name == "std_testresult")
+                {
+                    if (e.RowIndex >= 0)
+                    {
+                        if (CheckItemDGV.Rows[e.RowIndex].Cells["std_testresult"].Value != null && (CheckItemDGV.Rows[e.RowIndex].Cells["std_testresult"].Value.ToString() == "OK"))
+                        {
+                            e.Graphics.FillRectangle(Brushes.ForestGreen, e.CellBounds);
+                            Rectangle border = e.CellBounds;
+                            border.Width -= 1;
+                            e.Graphics.DrawRectangle(Pens.Black, border);
+                            e.PaintContent(e.CellBounds);
+                            e.Handled = true;
+                        }
+                        else
+                        {
+                            e.Graphics.FillRectangle(Brushes.OrangeRed, e.CellBounds);
+                            Rectangle border = e.CellBounds;
+                            border.Width -= 1;
+                            e.Graphics.DrawRectangle(Pens.Black, border);
+                            e.PaintContent(e.CellBounds);
+                            e.Handled = true;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 144 - 0
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.resx

@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="std_class.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_testtimes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_testresult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_badcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_class.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_testtimes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_testresult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_badcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 319 - 0
UAS_MES_PW/FunctionCode/Make/Make_ReadWriteInfo.Designer.cs

@@ -0,0 +1,319 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_ReadWriteInfo
+    {
+        /// <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.pr_detail = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.remain_qty = new System.Windows.Forms.Label();
+            this.mcd_okqty = new System.Windows.Forms.Label();
+            this.ma_prodcode = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.CheckItemDGV = new System.Windows.Forms.DataGridView();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = 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.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_item = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_info = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckItemDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_detail.Location = new System.Drawing.Point(1258, 38);
+            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, 41);
+            this.pr_detail.TabIndex = 31;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(64, 788);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(53, 35);
+            this.label10.TabIndex = 28;
+            this.label10.Text = "SN";
+            // 
+            // remain_qty
+            // 
+            this.remain_qty.AutoSize = true;
+            this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.remain_qty.Location = new System.Drawing.Point(204, 130);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.remain_qty.Name = "remain_qty";
+            this.remain_qty.Size = new System.Drawing.Size(0, 41);
+            this.remain_qty.TabIndex = 26;
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.mcd_okqty.Location = new System.Drawing.Point(724, 130);
+            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(0, 41);
+            this.mcd_okqty.TabIndex = 25;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_prodcode.Location = new System.Drawing.Point(724, 38);
+            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, 41);
+            this.ma_prodcode.TabIndex = 24;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.Location = new System.Drawing.Point(204, 38);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 41);
+            this.ma_code.TabIndex = 23;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label5.Location = new System.Drawing.Point(574, 130);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(210, 41);
+            this.label5.TabIndex = 22;
+            this.label5.Text = "当前工单计数";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label4.Location = new System.Drawing.Point(54, 130);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(114, 41);
+            this.label4.TabIndex = 21;
+            this.label4.Text = "剩余数";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label3.Location = new System.Drawing.Point(1102, 38);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 20;
+            this.label3.Text = "产品名称";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label2.Location = new System.Drawing.Point(570, 38);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 19;
+            this.label2.Text = "产品编号";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label1.Location = new System.Drawing.Point(50, 38);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 18;
+            this.label1.Text = "工单编号";
+            // 
+            // CheckItemDGV
+            // 
+            this.CheckItemDGV.AllowUserToAddRows = false;
+            this.CheckItemDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.CheckItemDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.ms_item,
+            this.ms_info});
+            this.CheckItemDGV.Location = new System.Drawing.Point(57, 199);
+            this.CheckItemDGV.Name = "CheckItemDGV";
+            this.CheckItemDGV.RowTemplate.Height = 37;
+            this.CheckItemDGV.Size = new System.Drawing.Size(1128, 562);
+            this.CheckItemDGV.TabIndex = 33;
+            this.CheckItemDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.CheckItemDGV_CellPainting);
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "psr_type";
+            this.dataGridViewTextBoxColumn1.HeaderText = "检测项";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 150;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "psr_systemvalue";
+            this.dataGridViewTextBoxColumn2.HeaderText = "系统值";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 460;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(1102, 130);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 32;
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(144, 788);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(334, 35);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 29;
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // 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(1265, 199);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(454, 562);
+            this.OperateResult.TabIndex = 27;
+            this.OperateResult.Text = "";
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "psr_systemvalue";
+            this.dataGridViewTextBoxColumn3.HeaderText = "本机值";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 460;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            // 
+            // ms_item
+            // 
+            this.ms_item.DataPropertyName = "ms_item";
+            this.ms_item.HeaderText = "检测项";
+            this.ms_item.MinimumWidth = 130;
+            this.ms_item.Name = "ms_item";
+            this.ms_item.ReadOnly = true;
+            this.ms_item.Width = 150;
+            // 
+            // ms_info
+            // 
+            this.ms_info.DataPropertyName = "ms_info";
+            this.ms_info.HeaderText = "参数值";
+            this.ms_info.MinimumWidth = 300;
+            this.ms_info.Name = "ms_info";
+            this.ms_info.ReadOnly = true;
+            this.ms_info.Width = 468;
+            // 
+            // Make_ReadWriteInfo
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1772, 866);
+            this.Controls.Add(this.CheckItemDGV);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.remain_qty);
+            this.Controls.Add(this.mcd_okqty);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Make_ReadWriteInfo";
+            this.Tag = "Make!ImeiCheck";
+            this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.CheckItemDGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label pr_detail;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Label remain_qty;
+        private System.Windows.Forms.Label mcd_okqty;
+        private System.Windows.Forms.Label ma_prodcode;
+        private System.Windows.Forms.Label ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.DataGridView CheckItemDGV;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ms_item;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ms_info;
+    }
+}

+ 168 - 0
UAS_MES_PW/FunctionCode/Make/Make_ReadWriteInfo.cs

@@ -0,0 +1,168 @@
+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_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_ReadWriteInfo : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        LogStringBuilder sql;
+
+        string oErrorMessage = "";
+
+        string omakeCode = "";
+
+        string oMsid = "";
+        public Make_ReadWriteInfo()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_LabelCheck_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            //聚焦SN号
+            sncode.Focus();
+            //打开界面提示用户:请输入SN 
+            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+            sql = new LogStringBuilder();
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+
+        private void Make_LabelCheck_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断是enter事件
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    return;
+                }
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out oErrorMessage))
+                {
+                    //判断序列号下一工序(CHECKSTEPSNANDMACODE)
+                    if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sncode.Text, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                    {
+                        string BARCODE = "";
+                        string MAC = "";
+                        string BT = "";
+                        string IMEI0 = "";
+                        string IMEI1 = "";
+                        BaseUtil.GetWriteInfo(@"C:\Users\callm\Desktop\品网\SN Writer(1).log", out BARCODE, out MAC, out BT, out IMEI0, out IMEI1);
+                        DataTable dt = new DataTable();
+                        dt.Columns.Add("ms_item");
+                        dt.Columns.Add("ms_info");
+
+                        if (BARCODE != "")
+                        {
+                            DataRow dr = dt.NewRow();
+                            dr["ms_item"] = "SN";
+                            dr["ms_info"] = BARCODE;
+                            dt.Rows.Add(dr);
+                        }
+                        if (MAC != "")
+                        {
+                            DataRow dr = dt.NewRow();
+                            dr["ms_item"] = "MAC";
+                            dr["ms_info"] = MAC;
+                            dt.Rows.Add(dr);
+                        }
+                        if (BT != "")
+                        {
+                            DataRow dr = dt.NewRow();
+                            dr["ms_item"] = "BT";
+                            dr["ms_info"] = BT;
+                            dt.Rows.Add(dr);
+                        }
+                        if (IMEI0 != "")
+                        {
+                            DataRow dr = dt.NewRow();
+                            dr["ms_item"] = "IMEI0";
+                            dr["ms_info"] = IMEI0;
+                            dt.Rows.Add(dr);
+                        }
+                        if (IMEI1 != "")
+                        {
+                            DataRow dr = dt.NewRow();
+                            dr["ms_item"] = "IMEI1";
+                            dr["ms_info"] = IMEI1;
+                            dt.Rows.Add(dr);
+                        }
+                        CheckItemDGV.DataSource = dt;
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                }
+            }
+        }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
+
+        private void CheckItemDGV_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
+        {
+            //系统值和
+            if (e.ColumnIndex >= 0)
+            {
+                if (CheckItemDGV.Columns[e.ColumnIndex].Name == "psr_systemvalue" || CheckItemDGV.Columns[e.ColumnIndex].Name == "psr_localvalue")
+                {
+                    if (e.RowIndex >= 0)
+                    {
+                        if (CheckItemDGV.Rows[e.RowIndex].Cells["psr_systemvalue"].Value != null && (CheckItemDGV.Rows[e.RowIndex].Cells["psr_systemvalue"].Value.ToString() == CheckItemDGV.Rows[e.RowIndex].Cells["psr_localvalue"].Value.ToString()))
+                        {
+                            e.Graphics.FillRectangle(Brushes.ForestGreen, e.CellBounds);
+                            Rectangle border = e.CellBounds;
+                            border.Width -= 1;
+                            e.Graphics.DrawRectangle(Pens.Black, border);
+                            e.PaintContent(e.CellBounds);
+                            e.Handled = true;
+                        }
+                        else
+                        {
+                            e.Graphics.FillRectangle(Brushes.OrangeRed, e.CellBounds);
+                            Rectangle border = e.CellBounds;
+                            border.Width -= 1;
+                            e.Graphics.DrawRectangle(Pens.Black, border);
+                            e.PaintContent(e.CellBounds);
+                            e.Handled = true;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 126 - 0
UAS_MES_PW/FunctionCode/Make/Make_ReadWriteInfo.resx

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="ms_item.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_info.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 52 - 0
UAS_MES_PW/FunctionCode/Query/Query_SOP.Designer.cs

@@ -0,0 +1,52 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_SOP
+    {
+        /// <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.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.SuspendLayout();
+            // 
+            // Query_SOP
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1494, 1075);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Query_SOP";
+            this.Tag = "Query!SpecialReport";
+            this.Text = "Query_SpecialReport";
+            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+    }
+}

+ 41 - 0
UAS_MES_PW/FunctionCode/Query/Query_SOP.cs

@@ -0,0 +1,41 @@
+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_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_SOP : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        public Query_SOP()
+        {
+            InitializeComponent();
+        }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+         
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+         
+        }
+
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 123 - 0
UAS_MES_PW/FunctionCode/Query/Query_SOP.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 147 - 1
UAS_MES_PW/PublicMethod/BaseUtil.cs

@@ -12,6 +12,7 @@ using System.Net;
 using System.Net.Sockets;
 using System.Reflection;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading;
 using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
@@ -161,7 +162,7 @@ namespace UAS_MES_NEW.PublicMethod
                     string controlName = ctl[i].Name;
                     string controlsTag = ctl[i].Tag == null ? "" : ctl[i].Tag.ToString();
                     //默认给TextBox和Label赋值
-                    if (ctl[i] is TextBox || ctl[i] is Label || ctl[i] is SearchTextBox || ctl[i] is MaCodeSearchTextBox || ctl[i] is EnterTextBox || ctl[i] is TextBoxGeneratePaCode || ctl[i] is NumericUpDown || ctl[i] is TextBoxWithTextArea ||ctl[i] is RichTextBox)
+                    if (ctl[i] is TextBox || ctl[i] is Label || ctl[i] is SearchTextBox || ctl[i] is MaCodeSearchTextBox || ctl[i] is EnterTextBox || ctl[i] is TextBoxGeneratePaCode || ctl[i] is NumericUpDown || ctl[i] is TextBoxWithTextArea || ctl[i] is RichTextBox)
                     {
                         for (int j = 0; j < dt.Columns.Count; j++)
                         {
@@ -1375,5 +1376,150 @@ namespace UAS_MES_NEW.PublicMethod
                 }
             }
         }
+
+        public static string GetDataFromDevice(string Param)
+        {
+            String cmd = System.Windows.Forms.Application.StartupPath + "\\adb.exe";
+            Process p = new Process();
+            p.StartInfo = new System.Diagnostics.ProcessStartInfo();
+            p.StartInfo.FileName = cmd;//设定程序名
+            p.StartInfo.UseShellExecute = false; //关闭shell的使用
+            p.StartInfo.RedirectStandardInput = true; //重定向标准输入
+            p.StartInfo.RedirectStandardOutput = true; //重定向标准输出
+            p.StartInfo.RedirectStandardError = true; //重定向错误输出
+            p.StartInfo.CreateNoWindow = true;//设置不显示窗口
+            string value = "";
+            switch (Param)
+            {
+                case "IMEI":
+                    p.StartInfo.Arguments = " shell \n su \n service call iphonesubinfo 1";
+                    p.Start();
+                    string IMEI = p.StandardOutput.ReadToEnd();
+                    foreach (Match item in Regex.Matches(IMEI, "'\\S+"))
+                    {
+                        value += item.Value.Replace(".", "").Replace("'", "").Replace(")", "");
+                    }
+                    p.Close();
+                    break;
+                case "POWER":
+                    p.StartInfo.Arguments = "  shell dumpsys battery";
+                    p.Start();
+                    value = Regex.Match(p.StandardOutput.ReadToEnd().ToUpper(), "LEVEL: \\d+").Value.Replace("LEVEL: ", "");
+                    p.Close();
+                    break;
+                case "MAC":
+                    p.StartInfo.Arguments = "  shell cat /sys/class/net/wlan0/address";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "BT":
+                    p.StartInfo.Arguments = "  shell  settings get secure bluetooth_address";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "SPEC":
+                    p.StartInfo.Arguments = "  -d shell getprop ro.product.model";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "VERSION":
+                    p.StartInfo.Arguments = "  shell getprop ro.build.display.id";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "CUS_VERSION":
+                    p.StartInfo.Arguments = "  shell getprop ro.elinktek.version.release";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "SN":
+                    p.StartInfo.Arguments = " shell getprop ro.serialno";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                default:
+                    break;
+            }
+            Console.WriteLine(Param + " : " + value.Trim());
+            return value.Trim();
+        }
+
+        public static void GetWriteInfo(string FilePath, out string BARCODE, out string MAC, out string BT, out string IMEI0, out string IMEI1)
+        {
+            MAC = "";
+            BT = "";
+            IMEI0 = "";
+            IMEI1 = "";
+            BARCODE = "";
+            string txt = "";
+            StreamReader sr = new StreamReader(FilePath);
+
+            while (!sr.EndOfStream)
+            {
+                string str = sr.ReadLine().ToUpper();
+                txt += str + "\n";
+            }
+            IMEI0 = Regex.Match(txt, "IMEI[0] = \\S[0-9]{15}\\S").Value.Replace("IMEI[", "").Replace("]", "");
+            IMEI1 = Regex.Match(txt, "IMEI[0] = \\S[0-9]{15}\\S").Value.Replace("IMEI[", "").Replace("]", "");
+            MAC = Regex.Match(txt, "WIFIADDRESS = \\[\\S+\\]").Value.Replace("WIFIADDRESS = [", "").Replace("]", "").Replace(":", "");
+            BT = Regex.Match(txt, "BTADDRESS = \\[\\S+\\]").Value.Replace("BTADDRESS = [", "").Replace("]", "").Replace(":", "");
+            BARCODE = Regex.Match(txt, "BARCODE = \\[\\S+\\]").Value.Replace("BARCODE = [", "").Replace("]", "").Replace(":", "");
+        }
+
+        public static bool OpenCSVFile(ref DataTable mycsvdt, string filepath)
+        {
+            string strpath = filepath; //csv文件的路径
+            try
+            {
+                int intColCount = 0;
+                bool blnFlag = true;
+
+                DataColumn mydc;
+                DataRow mydr;
+
+                string strline;
+                string[] aryline;
+                StreamReader mysr = new StreamReader(strpath, System.Text.Encoding.Default);
+
+                while ((strline = mysr.ReadLine()) != null)
+                {
+                    aryline = strline.Split(new char[] { ',' });
+
+                    //给datatable加上列名
+                    if (blnFlag)
+                    {
+                        blnFlag = false;
+                        intColCount = aryline.Length;
+                        int col = 0;
+                        for (int i = 0; i < aryline.Length; i++)
+                        {
+                            col = i + 1;
+                            mydc = new DataColumn(col.ToString());
+                            mycsvdt.Columns.Add(mydc);
+                        }
+                    }
+
+                    //填充数据并加入到datatable中
+                    mydr = mycsvdt.NewRow();
+                    for (int i = 0; i < intColCount; i++)
+                    {
+                        mydr[i] = aryline[i];
+                    }
+                    if(mydr[0].ToString()!="")
+                    mycsvdt.Rows.Add(mydr);
+                }
+                return true;
+            }
+            catch (Exception)
+            {
+                return false;
+            }
+        }
     }
 }

+ 59 - 0
UAS_MES_PW/PublicMethod/LogicHandler.cs

@@ -1346,5 +1346,64 @@ namespace UAS_MES_NEW.PublicMethod
             sql.Append(":SourceCode,:stepcode,:ifreprint,sysdate,:inman)");
             dh.ExecuteSql(sql.ToString(), "insert", printValue, printType, MakeCode, prodCode, sourceCode, stepcode, ifRePrint, userCode);
         }
+
+
+        public static bool GetMobileAllInfo(string iSN, out Dictionary<string, string> oInfo, out string oErrMessage)
+        {
+            oInfo = new Dictionary<string, string>();
+            oErrMessage = "";
+            if (iSN == "")
+            {
+                oErrMessage = "SN不能为空";
+                return false;
+            }
+            //通过序列号获取最近操作的工单号
+            string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode='" + iSN + "'").ToString();
+            if (ms_id != "")
+            {
+                DataTable dt = dh.getFieldsDataByCondition("MakeSerial", new string[] { "ms_id", "ms_mac", "ms_bt", "ms_meid", "ms_netcode", "ms_psn", "ms_imei1", "ms_imei2", "ms_imei3", "ms_othcode1", "ms_othcode2", "ms_othcode3", "ms_othid1", "ms_othid2", "ms_othid3" }, "ms_id='" + ms_id + "'");
+                if (dt.Rows.Count > 0)
+                {
+                    string Code1 = "";
+                    string Code2 = "";
+                    string Code3 = "";
+                    string Code4 = "";
+                    string Code5 = "";
+                    string Code6 = "";
+                    string Code7 = "";
+                    string Code8 = "";
+                    string Code9 = "";
+                    string Code10 = "";
+                    string Code11 = "";
+                    string Code12 = "";
+                    string Code13 = "";
+                    string Code14 = "";
+                    string Code15 = "";
+                    string[] param = new string[] { ms_id, Code1, Code2, Code3, Code4, Code5, Code6, Code7, Code8, Code9, Code10, Code11, Code12, Code13, Code14, Code15 };
+                    string[] ParamName = new string[] { "v_ms_id", "v_i_code1", "v_i_code2", "v_i_code3", "v_i_code4", "v_i_code5", "v_i_code6", "v_i_code7", "v_i_code8", "v_i_code9", "v_i_code10", "v_i_code11", "v_i_code12", "v_i_code13", "v_i_code14", "v_i_code15" };
+                    dh.CallProcedure("GetMobileAllInfo", ParamName, ref param);
+                    for (int i = 1; i < param.Length; i++)
+                    {
+                        //获取出来的参数使用^分割
+                        if (param[i] != "" && param[i] != "null" && param[i] != null)
+                        {
+                            oInfo.Add(param[i].Split('^')[0], param[i].Split('^')[1]);
+                        }
+                    }
+                    oErrMessage = "";
+                    return true;
+                }
+                else
+                {
+                    oErrMessage = "序列号" + iSN + "不存在";
+                    return false;
+                }
+            }
+            else
+            {
+                oErrMessage = "序列号" + iSN + "不存在";
+                return false;
+            }
+        }
     }
 }

+ 51 - 0
UAS_MES_PW/UAS_MES_PW.csproj

@@ -550,6 +550,24 @@
     <Compile Include="FunctionCode\Make\Make_FeedingCollectionCombine.Designer.cs">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_GetTestFileData.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_GetTestFileData.Designer.cs">
+      <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ReadWriteInfo.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ReadWriteInfo.Designer.cs">
+      <DependentUpon>Make_ReadWriteInfo.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_InfoCheck.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_InfoCheck.Designer.cs">
+      <DependentUpon>Make_InfoCheck.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_PreFeedingCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -880,6 +898,12 @@
     <Compile Include="FunctionCode\Query\Query_SN.Designer.cs">
       <DependentUpon>Query_SN.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_SOP.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_SOP.Designer.cs">
+      <DependentUpon>Query_SOP.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_SpecialReport.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1279,6 +1303,15 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_FeedingCollectionCombine.resx">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_GetTestFileData.resx">
+      <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ReadWriteInfo.resx">
+      <DependentUpon>Make_ReadWriteInfo.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_InfoCheck.resx">
+      <DependentUpon>Make_InfoCheck.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PreFeedingCollection.resx">
       <DependentUpon>Make_PreFeedingCollection.cs</DependentUpon>
     </EmbeddedResource>
@@ -1444,6 +1477,9 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_SN.resx">
       <DependentUpon>Query_SN.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_SOP.resx">
+      <DependentUpon>Query_SOP.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport.resx">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </EmbeddedResource>
@@ -1551,6 +1587,8 @@
     <EmbeddedResource Include="PublicForm\SetLoadingWindow.resx">
       <DependentUpon>SetLoadingWindow.cs</DependentUpon>
     </EmbeddedResource>
+    <None Include="adbtool\mke2fs.conf" />
+    <None Include="adbtool\source.properties" />
     <None Include="App.config">
       <SubType>Designer</SubType>
     </None>
@@ -1560,6 +1598,19 @@
     </None>
   </ItemGroup>
   <ItemGroup>
+    <Content Include="adbtool\adb.exe" />
+    <Content Include="adbtool\AdbWinApi.dll" />
+    <Content Include="adbtool\AdbWinUsbApi.dll" />
+    <Content Include="adbtool\dmtracedump.exe" />
+    <Content Include="adbtool\etc1tool.exe" />
+    <Content Include="adbtool\fastboot.exe" />
+    <Content Include="adbtool\hprof-conv.exe" />
+    <Content Include="adbtool\libwinpthread-1.dll" />
+    <Content Include="adbtool\make_f2fs.exe" />
+    <Content Include="adbtool\make_f2fs_casefold.exe" />
+    <Content Include="adbtool\mke2fs.exe" />
+    <Content Include="adbtool\NOTICE.txt" />
+    <Content Include="adbtool\sqlite3.exe" />
     <Content Include="Resources\07.gif" />
     <Content Include="Resources\0802192135.png" />
     <Content Include="Resources\2-0btn_04.png" />