Browse Source

Merge branch 'master' of repos.ubtob.net:usoft/mes-client

caosy 4 years ago
parent
commit
05afaffeaa

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

@@ -398,7 +398,7 @@ namespace UAS_LabelMachine
             string pib_outboxcode2 = "";
 
             int BoxNum = LabelInfDataTable.Select("pib_outboxcode2='" + OutBoxNum.Text + "'").Length;
-            if (ConnectToMachine)
+            //if (!ConnectToMachine)
             {
                 if (BoxNum + CodeCount > OutboxCapacity.Value && AutoSetOutBox.Checked)
                 {
@@ -472,38 +472,38 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            else
-            {
-                if (OutBoxNum.Text == "新增")
-                {
-                    string maxoutbox = dh.getFieldDataByCondition("prodiobarcode", "max(to_number(pib_outboxcode2))", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
-                    //如果没有则从开始插入
-                    if (maxoutbox == "")
-                    {
-                        pib_outboxcode2 = "1";
-                    }
-                    else
-                    {
-                        pib_outboxcode2 = (int.Parse(maxoutbox) + 1).ToString();
-                    }
-                }
-                else
-                {
-                    pib_outboxcode2 = OutBoxNum.Text;
-                }
-                if (!AutoPrintOutBox.Checked)
-                {
-                    if (BoxNum + CodeCount > OutboxCapacity.Value)
-                    {
-                        string close = MessageBox.Show(this.ParentForm, "箱号【" + OutBoxNum.Text + "】后超数量为" + (BoxNum + CodeCount) + ",超出容量" + OutboxCapacity.Value + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
-                        if (close != "Yes")
-                        {
-                            Input.SelectAll();
-                            return;
-                        }
-                    }
-                }
-            }
+            //else
+            //{
+            //    if (OutBoxNum.Text == "新增")
+            //    {
+            //        string maxoutbox = dh.getFieldDataByCondition("prodiobarcode", "max(to_number(pib_outboxcode2))", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
+            //        //如果没有则从开始插入
+            //        if (maxoutbox == "")
+            //        {
+            //            pib_outboxcode2 = "1";
+            //        }
+            //        else
+            //        {
+            //            pib_outboxcode2 = (int.Parse(maxoutbox) + 1).ToString();
+            //        }
+            //    }
+            //    else
+            //    {
+            //        pib_outboxcode2 = OutBoxNum.Text;
+            //    }
+            //    if (!AutoPrintOutBox.Checked)
+            //    {
+            //        if (BoxNum + CodeCount > OutboxCapacity.Value)
+            //        {
+            //            string close = MessageBox.Show(this.ParentForm, "箱号【" + OutBoxNum.Text + "】后超数量为" + (BoxNum + CodeCount) + ",超出容量" + OutboxCapacity.Value + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            //            if (close != "Yes")
+            //            {
+            //                Input.SelectAll();
+            //                return;
+            //            }
+            //        }
+            //    }
+            //}
             if (OutBoxNum.Text == "全部")
             {
                 MessageBox.Show("请选择指定箱号或者新增");
@@ -707,7 +707,7 @@ namespace UAS_LabelMachine
                         pibid += PIBID[i];
                 }
                 if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                    SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
+                     SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                 for (int j = 0; j < SingleReport.Parameters.Count; j++)
                 {
                     SingleReport.SetParameterValue(SingleReport.Parameters[j].Name, "");
@@ -950,7 +950,7 @@ namespace UAS_LabelMachine
                     if (pibid != "")
                     {
                         if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                            SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
+                             SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                         for (int j = 0; j < SingleReport.Parameters.Count; j++)
                         {
                             SingleReport.SetParameterValue(SingleReport.Parameters[j].Name, "");
@@ -1563,7 +1563,7 @@ namespace UAS_LabelMachine
                 if (ComBoxClickChangeLabelDoc)
                 {
                     if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                        SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
+                         SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                 }
             }
             catch (Exception) { }

+ 43 - 73
UAS_CheckWork/Form1.Designer.cs

@@ -32,12 +32,7 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.txtPort = new System.Windows.Forms.TextBox();
-            this.txtIP = new System.Windows.Forms.TextBox();
-            this.btnConnect = new System.Windows.Forms.Button();
             this.lblState = new System.Windows.Forms.Label();
-            this.showDataGrid = new System.Windows.Forms.DataGridView();
-            this.cl_cardcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cl_time = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.getAllData = new System.Windows.Forms.Button();
             this.allData = new System.Windows.Forms.BindingSource(this.components);
             this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -45,7 +40,8 @@
             this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
             this.Master = new System.Windows.Forms.ComboBox();
             this.label3 = new System.Windows.Forms.Label();
-            ((System.ComponentModel.ISupportInitialize)(this.showDataGrid)).BeginInit();
+            this.OperateResult = new System.Windows.Forms.RichTextBox();
+            this.IP = new System.Windows.Forms.ComboBox();
             ((System.ComponentModel.ISupportInitialize)(this.allData)).BeginInit();
             this.SuspendLayout();
             // 
@@ -53,7 +49,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(334, 34);
+            this.label2.Location = new System.Drawing.Point(386, 38);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(82, 41);
@@ -64,7 +60,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(48, 32);
+            this.label1.Location = new System.Drawing.Point(48, 38);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(47, 41);
@@ -73,75 +69,24 @@
             // 
             // txtPort
             // 
-            this.txtPort.Location = new System.Drawing.Point(430, 34);
+            this.txtPort.Location = new System.Drawing.Point(476, 38);
             this.txtPort.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.txtPort.Name = "txtPort";
             this.txtPort.Size = new System.Drawing.Size(70, 35);
             this.txtPort.TabIndex = 12;
-            // 
-            // txtIP
-            // 
-            this.txtIP.Location = new System.Drawing.Point(116, 34);
-            this.txtIP.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
-            this.txtIP.Name = "txtIP";
-            this.txtIP.Size = new System.Drawing.Size(194, 35);
-            this.txtIP.TabIndex = 11;
-            // 
-            // btnConnect
-            // 
-            this.btnConnect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnConnect.Location = new System.Drawing.Point(558, 30);
-            this.btnConnect.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
-            this.btnConnect.Name = "btnConnect";
-            this.btnConnect.Size = new System.Drawing.Size(100, 50);
-            this.btnConnect.TabIndex = 10;
-            this.btnConnect.Text = "连接";
-            this.btnConnect.UseVisualStyleBackColor = true;
-            this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
+            this.txtPort.Text = "4370";
             // 
             // lblState
             // 
             this.lblState.AutoSize = true;
             this.lblState.ForeColor = System.Drawing.Color.Crimson;
-            this.lblState.Location = new System.Drawing.Point(718, 44);
+            this.lblState.Location = new System.Drawing.Point(613, 49);
             this.lblState.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblState.Name = "lblState";
             this.lblState.Size = new System.Drawing.Size(142, 24);
             this.lblState.TabIndex = 15;
             this.lblState.Text = "状态:未连接";
             // 
-            // showDataGrid
-            // 
-            this.showDataGrid.AllowUserToAddRows = false;
-            this.showDataGrid.AllowUserToDeleteRows = false;
-            this.showDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.showDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.cl_cardcode,
-            this.cl_time});
-            this.showDataGrid.Enabled = false;
-            this.showDataGrid.Location = new System.Drawing.Point(34, 116);
-            this.showDataGrid.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
-            this.showDataGrid.Name = "showDataGrid";
-            this.showDataGrid.RowTemplate.Height = 30;
-            this.showDataGrid.Size = new System.Drawing.Size(1734, 756);
-            this.showDataGrid.TabIndex = 16;
-            this.showDataGrid.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.showDataGrid_DataError);
-            // 
-            // cl_cardcode
-            // 
-            this.cl_cardcode.DataPropertyName = "cl_cardcode";
-            this.cl_cardcode.HeaderText = "卡号";
-            this.cl_cardcode.Name = "cl_cardcode";
-            this.cl_cardcode.Width = 200;
-            // 
-            // cl_time
-            // 
-            this.cl_time.DataPropertyName = "cl_time";
-            this.cl_time.HeaderText = "打卡时间";
-            this.cl_time.MinimumWidth = 250;
-            this.cl_time.Name = "cl_time";
-            this.cl_time.Width = 250;
-            // 
             // getAllData
             // 
             this.getAllData.BackColor = System.Drawing.SystemColors.ControlLightLight;
@@ -175,7 +120,7 @@
             // 
             this.Master.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.Master.FormattingEnabled = true;
-            this.Master.Location = new System.Drawing.Point(1018, 41);
+            this.Master.Location = new System.Drawing.Point(929, 52);
             this.Master.Name = "Master";
             this.Master.Size = new System.Drawing.Size(480, 32);
             this.Master.TabIndex = 19;
@@ -184,35 +129,63 @@
             // 
             this.label3.AutoSize = true;
             this.label3.ForeColor = System.Drawing.Color.Black;
-            this.label3.Location = new System.Drawing.Point(905, 44);
+            this.label3.Location = new System.Drawing.Point(816, 55);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(106, 24);
             this.label3.TabIndex = 20;
             this.label3.Text = "选择账套";
             // 
+            // OperateResult
+            // 
+            this.OperateResult.Location = new System.Drawing.Point(55, 136);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1693, 734);
+            this.OperateResult.TabIndex = 21;
+            this.OperateResult.Text = "";
+            // 
+            // IP
+            // 
+            this.IP.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.IP.FormattingEnabled = true;
+            this.IP.Items.AddRange(new object[] {
+            "192.168.2.230",
+            "192.168.2.231",
+            "192.168.2.232",
+            "192.168.1.4",
+            "192.168.1.241",
+            "192.168.1.153",
+            "192.168.1.182",
+            "192.168.1.183",
+            "192.168.1.75",
+            "192.168.1.181",
+            "192.168.1.219",
+            "192.168.1.244"});
+            this.IP.Location = new System.Drawing.Point(111, 44);
+            this.IP.Name = "IP";
+            this.IP.Size = new System.Drawing.Size(268, 32);
+            this.IP.TabIndex = 22;
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1781, 902);
+            this.Controls.Add(this.IP);
+            this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.Master);
             this.Controls.Add(this.ExportEmp);
             this.Controls.Add(this.getAllData);
-            this.Controls.Add(this.showDataGrid);
             this.Controls.Add(this.lblState);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.txtPort);
-            this.Controls.Add(this.txtIP);
-            this.Controls.Add(this.btnConnect);
             this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Name = "Form1";
             this.Text = "Form1";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             this.Load += new System.EventHandler(this.Form1_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.showDataGrid)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.allData)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -224,19 +197,16 @@
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.TextBox txtPort;
-        private System.Windows.Forms.TextBox txtIP;
-        private System.Windows.Forms.Button btnConnect;
         private System.Windows.Forms.Label lblState;
-        private System.Windows.Forms.DataGridView showDataGrid;
         private System.Windows.Forms.Button getAllData;
         private System.Windows.Forms.BindingSource allData;
         private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn cl_cardcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn cl_time;
         private System.Windows.Forms.Button ExportEmp;
         private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
         private System.Windows.Forms.ComboBox Master;
         private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.RichTextBox OperateResult;
+        private System.Windows.Forms.ComboBox IP;
     }
 }
 

+ 41 - 54
UAS_CheckWork/Form1.cs

@@ -22,6 +22,8 @@ namespace UAS_CheckWork
         //开启线程
         Thread InitGetInfo;
 
+        List<string> IPAddress = new List<string>();
+
         public Form1()
         {
             InitializeComponent();
@@ -30,8 +32,20 @@ namespace UAS_CheckWork
 
         private void Form1_Load(object sender, EventArgs e)
         {
+            IPAddress.Add("192.168.2.230");
+            IPAddress.Add("192.168.2.231");
+            IPAddress.Add("192.168.2.232");
+            IPAddress.Add("192.168.1.4");
+            IPAddress.Add("192.168.1.241");
+            IPAddress.Add("192.168.1.153");
+            IPAddress.Add("192.168.1.182");
+            IPAddress.Add("192.168.1.183");
+            IPAddress.Add("192.168.1.75");
+            IPAddress.Add("192.168.1.181");
+            IPAddress.Add("192.168.1.219");
+            IPAddress.Add("192.168.1.244");
+
             CheckForIllegalCrossThreadCalls = false;//可跨线程
-            txtIP.Text = Properties.Settings.Default.IP;
             txtPort.Text = Properties.Settings.Default.Port;
             dh = new DataHelper();
             DataTable dt = (DataTable)dh.ExecuteSql("select ma_user,ma_function from master", "select");
@@ -40,59 +54,31 @@ namespace UAS_CheckWork
             Master.ValueMember = "ma_user";
         }
 
-        private void btnConnect_Click(object sender, EventArgs e)
-        {
-            Properties.Settings.Default.IP = txtIP.Text;
-            Properties.Settings.Default.Port = txtPort.Text;
-            Properties.Settings.Default.Save();
-            if (txtIP.Text.Trim() == "" || txtPort.Text.Trim() == "")
-            {
-                MessageBox.Show("请先输入IP和端口", "Error");
-                return;
-            }
-            int idwErrorCode = 0;
-
-            Cursor = Cursors.WaitCursor;
-            if (btnConnect.Text == "断开连接")
-            {
-                axCZKEM1.Disconnect();
-                bIsConnected = false;
-                btnConnect.Text = "连接";
-                lblState.Text = "状态:未连接";
-                Cursor = Cursors.Default;
-                return;
-            }
-            bIsConnected = axCZKEM1.Connect_Net(txtIP.Text, Convert.ToInt32(txtPort.Text));
-            if (bIsConnected)
-            {
-                btnConnect.Text = "断开连接";
-                btnConnect.Refresh();
-                lblState.Text = "状态:已连接";
-                iMachineNumber = 1;//In fact,when you are using the tcp/ip communication,this parameter will be ignored,that is any integer will all right.Here we use 1.
-                axCZKEM1.RegEvent(iMachineNumber, 65535);//Here you can register the realtime events that you want to be triggered(the parameters 65535 means registering all)
-            }
-            else
-            {
-                axCZKEM1.GetLastError(ref idwErrorCode);
-                MessageBox.Show("无法连接设备,ErrorCode=" + idwErrorCode.ToString(), "Error");
-            }
-            Cursor = Cursors.Default;
-        }
-
         private void getAllData_Click(object sender, EventArgs e)
         {
             string master = Master.SelectedValue.ToString();
-            DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID="+master+";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=yitoadt.wicp.io)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=" + master + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=yitoadt.wicp.io)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             dh = new DataHelper();
-            if (!bIsConnected)
+            int idwErrorCode = 0;
+            for (int i = 0; i < IPAddress.Count; i++)
             {
-                MessageBox.Show("请先连接设备", "Error");
-                return;
+                bIsConnected = axCZKEM1.Connect_Net(IPAddress.ToArray()[i], Convert.ToInt32(txtPort.Text));
+                if (bIsConnected)
+                {
+                    lblState.Text = "状态:已连接";
+                    iMachineNumber = 1;//In fact,when you are using the tcp/ip communication,this parameter will be ignored,that is any integer will all right.Here we use 1.
+                    axCZKEM1.RegEvent(iMachineNumber, 65535);//Here you can register the realtime events that you want to be triggered(the parameters 65535 means registering all)
+                    InitGetInfo = new Thread(InPrint);
+                    SetLoadingWindow stw = new SetLoadingWindow(InitGetInfo, "正在同步数据...");
+                    stw.StartPosition = FormStartPosition.CenterParent;
+                    stw.ShowDialog();
+                }
+                else
+                {
+                    axCZKEM1.GetLastError(ref idwErrorCode);
+                    OperateResult.AppendText("无法连接设备,"+ IPAddress.ToArray()[i] + "ErrorCode=" + idwErrorCode.ToString() + "\n");
+                }
             }
-            InitGetInfo = new Thread(InPrint);
-            SetLoadingWindow stw = new SetLoadingWindow(InitGetInfo, "正在同步数据...");
-            stw.StartPosition = FormStartPosition.CenterParent;
-            stw.ShowDialog();
         }
 
         private void InPrint()
@@ -105,7 +91,7 @@ namespace UAS_CheckWork
                 DataTable dt = new DataTable();
                 dt.Columns.Add("cl_cardcode");
                 dt.Columns.Add("cl_time");
-                showDataGrid.DataSource = dt;
+
                 string SerialNum = "";
                 axCZKEM1.GetSerialNumber(axCZKEM1.MachineNumber, out SerialNum);
                 string LastDate = dh.getFieldDataByCondition("cardlog", "to_char(max(cl_time),'yyyy-MM-dd HH24:mi:ss')", "cl_address='考勤机数据导入' and cl_code='" + SerialNum + "'").ToString();
@@ -155,20 +141,21 @@ namespace UAS_CheckWork
                 }
                 if (cl_time.Count > 0)
                     dh.BatchInsert(sql.ToString(), new string[] { "cl_cardcode", "cl_time", "cl_machinenum" }, cl_cardcode.ToArray(), cl_time.ToArray(), cl_machinenum.ToArray());
-                showDataGrid.DataSource = dt;
                 if (dt.Rows.Count > 0)
                 {
-                    MessageBox.Show("数据同步成功");
+                    OperateResult.AppendText(SerialNum + "数据同步成功\n");
                 }
                 else
                 {
-                    MessageBox.Show("没有需要同步的数据");
+                    OperateResult.AppendText(SerialNum + "没有需要同步的数据\n");
                 }
+                axCZKEM1.Disconnect();
+                bIsConnected = false;
             }
             else
             {
                 axCZKEM1.GetLastError(ref idwErrorCode);
-                MessageBox.Show("Unable to get data,ErrorCode=" + idwErrorCode.ToString(), "Error");
+                OperateResult.AppendText("Unable to get data,ErrorCode=" + idwErrorCode.ToString() + "\n");
             }
         }
 
@@ -181,7 +168,7 @@ namespace UAS_CheckWork
         {
             if (!bIsConnected)
             {
-                MessageBox.Show("请先连接设备", "Error");
+                OperateResult.AppendText("请先连接设备\n");
                 return;
             }
             folderBrowserDialog1.Description = "选择导出的路径";

+ 0 - 12
UAS_CheckWork/Form1.resx

@@ -117,18 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="cl_cardcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cl_time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cl_cardcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cl_time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="allData.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>

+ 12 - 6
UAS_CheckWork/UAS_CheckWork.csproj

@@ -30,7 +30,7 @@
     <BootstrapperEnabled>true</BootstrapperEnabled>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
+    <PlatformTarget>x64</PlatformTarget>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
@@ -56,11 +56,6 @@
     <NoWin32Manifest>true</NoWin32Manifest>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Interop.zkemkeeper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <EmbedInteropTypes>False</EmbedInteropTypes>
-      <HintPath>bin\Debug\Interop.zkemkeeper.dll</HintPath>
-    </Reference>
     <Reference Include="NPOI">
       <HintPath>tool\NPOI.dll</HintPath>
     </Reference>
@@ -158,6 +153,17 @@
       <Install>false</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <COMReference Include="zkemkeeper">
+      <Guid>{FE9DED34-E159-408E-8490-B720A5E632C7}</Guid>
+      <VersionMajor>1</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>False</EmbedInteropTypes>
+    </COMReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 303 - 19
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.Designer.cs

@@ -44,6 +44,22 @@ namespace UAS_MES_NEW.Make
             this.CheckItemDGV = new System.Windows.Forms.DataGridView();
             this.label6 = new System.Windows.Forms.Label();
             this.WatchPath = new System.Windows.Forms.TextBox();
+            this.PSN = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.MAC = new System.Windows.Forms.Label();
+            this.label11 = new System.Windows.Forms.Label();
+            this.BT = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
+            this.IMEI1 = new System.Windows.Forms.Label();
+            this.label15 = new System.Windows.Forms.Label();
+            this.IMEI2 = new System.Windows.Forms.Label();
+            this.label17 = new System.Windows.Forms.Label();
+            this.GoogleKey = new System.Windows.Forms.Label();
+            this.label19 = new System.Windows.Forms.Label();
+            this.Aging = new System.Windows.Forms.Label();
+            this.label21 = new System.Windows.Forms.Label();
+            this.Version = new System.Windows.Forms.Label();
+            this.label23 = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -51,6 +67,9 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            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();
@@ -59,6 +78,9 @@ namespace UAS_MES_NEW.Make
             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();
@@ -69,7 +91,7 @@ namespace UAS_MES_NEW.Make
             // 
             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.Location = new System.Drawing.Point(1258, 11);
             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);
@@ -90,7 +112,7 @@ namespace UAS_MES_NEW.Make
             // 
             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.Location = new System.Drawing.Point(204, 103);
             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);
@@ -100,7 +122,7 @@ namespace UAS_MES_NEW.Make
             // 
             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.Location = new System.Drawing.Point(724, 103);
             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);
@@ -110,7 +132,7 @@ namespace UAS_MES_NEW.Make
             // 
             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.Location = new System.Drawing.Point(724, 11);
             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);
@@ -120,7 +142,7 @@ namespace UAS_MES_NEW.Make
             // 
             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.Location = new System.Drawing.Point(204, 11);
             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);
@@ -130,7 +152,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(574, 130);
+            this.label5.Location = new System.Drawing.Point(574, 103);
             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);
@@ -141,7 +163,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label4.Location = new System.Drawing.Point(54, 130);
+            this.label4.Location = new System.Drawing.Point(54, 103);
             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);
@@ -152,7 +174,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label3.Location = new System.Drawing.Point(1102, 38);
+            this.label3.Location = new System.Drawing.Point(1102, 11);
             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);
@@ -163,7 +185,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label2.Location = new System.Drawing.Point(570, 38);
+            this.label2.Location = new System.Drawing.Point(570, 11);
             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);
@@ -174,7 +196,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(50, 38);
+            this.label1.Location = new System.Drawing.Point(50, 11);
             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);
@@ -192,11 +214,14 @@ namespace UAS_MES_NEW.Make
             this.std_mac,
             this.std_bt,
             this.std_imei1,
-            this.std_imei2});
-            this.CheckItemDGV.Location = new System.Drawing.Point(57, 199);
+            this.std_imei2,
+            this.std_googlekey,
+            this.std_videotest,
+            this.std_version});
+            this.CheckItemDGV.Location = new System.Drawing.Point(12, 154);
             this.CheckItemDGV.Name = "CheckItemDGV";
             this.CheckItemDGV.RowTemplate.Height = 37;
-            this.CheckItemDGV.Size = new System.Drawing.Size(1128, 562);
+            this.CheckItemDGV.Size = new System.Drawing.Size(712, 607);
             this.CheckItemDGV.TabIndex = 33;
             this.CheckItemDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.CheckItemDGV_CellPainting);
             // 
@@ -219,6 +244,175 @@ namespace UAS_MES_NEW.Make
             this.WatchPath.TabIndex = 36;
             this.WatchPath.Text = "/storage/emulated/0/elink/";
             // 
+            // PSN
+            // 
+            this.PSN.AutoSize = true;
+            this.PSN.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.PSN.Location = new System.Drawing.Point(980, 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);
+            this.PSN.TabIndex = 39;
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label8.Location = new System.Drawing.Point(761, 161);
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(62, 41);
+            this.label8.TabIndex = 38;
+            this.label8.Text = "SN";
+            // 
+            // MAC
+            // 
+            this.MAC.AutoSize = true;
+            this.MAC.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.MAC.Location = new System.Drawing.Point(980, 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);
+            this.MAC.TabIndex = 41;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label11.Location = new System.Drawing.Point(761, 234);
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(93, 41);
+            this.label11.TabIndex = 40;
+            this.label11.Text = "MAC";
+            // 
+            // BT
+            // 
+            this.BT.AutoSize = true;
+            this.BT.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.BT.Location = new System.Drawing.Point(980, 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);
+            this.BT.TabIndex = 43;
+            // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label13.Location = new System.Drawing.Point(761, 312);
+            this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(56, 41);
+            this.label13.TabIndex = 42;
+            this.label13.Text = "BT";
+            // 
+            // IMEI1
+            // 
+            this.IMEI1.AutoSize = true;
+            this.IMEI1.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.IMEI1.Location = new System.Drawing.Point(980, 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);
+            this.IMEI1.TabIndex = 45;
+            // 
+            // label15
+            // 
+            this.label15.AutoSize = true;
+            this.label15.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label15.Location = new System.Drawing.Point(761, 386);
+            this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(104, 41);
+            this.label15.TabIndex = 44;
+            this.label15.Text = "IMEI1";
+            // 
+            // IMEI2
+            // 
+            this.IMEI2.AutoSize = true;
+            this.IMEI2.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.IMEI2.Location = new System.Drawing.Point(980, 458);
+            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);
+            this.IMEI2.TabIndex = 47;
+            // 
+            // label17
+            // 
+            this.label17.AutoSize = true;
+            this.label17.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label17.Location = new System.Drawing.Point(761, 458);
+            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);
+            this.label17.TabIndex = 46;
+            this.label17.Text = "IMEI2";
+            // 
+            // GoogleKey
+            // 
+            this.GoogleKey.AutoSize = true;
+            this.GoogleKey.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.GoogleKey.Location = new System.Drawing.Point(980, 529);
+            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);
+            this.GoogleKey.TabIndex = 49;
+            // 
+            // label19
+            // 
+            this.label19.AutoSize = true;
+            this.label19.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label19.Location = new System.Drawing.Point(761, 529);
+            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);
+            this.label19.TabIndex = 48;
+            this.label19.Text = "GoogleKey";
+            // 
+            // Aging
+            // 
+            this.Aging.AutoSize = true;
+            this.Aging.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Aging.Location = new System.Drawing.Point(980, 603);
+            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);
+            this.Aging.TabIndex = 51;
+            // 
+            // label21
+            // 
+            this.label21.AutoSize = true;
+            this.label21.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label21.Location = new System.Drawing.Point(761, 603);
+            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);
+            this.label21.TabIndex = 50;
+            this.label21.Text = "老化时长";
+            // 
+            // Version
+            // 
+            this.Version.AutoSize = true;
+            this.Version.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Version.Location = new System.Drawing.Point(981, 668);
+            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";
+            this.Version.Size = new System.Drawing.Size(0, 41);
+            this.Version.TabIndex = 53;
+            // 
+            // label23
+            // 
+            this.label23.AutoSize = true;
+            this.label23.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label23.Location = new System.Drawing.Point(761, 668);
+            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 = "软件版本";
+            // 
             // dataGridViewTextBoxColumn1
             // 
             this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
@@ -245,6 +439,7 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn3.MinimumWidth = 460;
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.Visible = false;
             // 
             // dataGridViewTextBoxColumn4
             // 
@@ -252,6 +447,7 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn4.HeaderText = "故障代码";
             this.dataGridViewTextBoxColumn4.MinimumWidth = 200;
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.Visible = false;
             this.dataGridViewTextBoxColumn4.Width = 200;
             // 
             // dataGridViewTextBoxColumn5
@@ -260,6 +456,7 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn5.HeaderText = "BT";
             this.dataGridViewTextBoxColumn5.MinimumWidth = 100;
             this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.Visible = false;
             this.dataGridViewTextBoxColumn5.Width = 200;
             // 
             // dataGridViewTextBoxColumn6
@@ -268,6 +465,7 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn6.HeaderText = "IMEI1";
             this.dataGridViewTextBoxColumn6.MinimumWidth = 100;
             this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.Visible = false;
             // 
             // dataGridViewTextBoxColumn7
             // 
@@ -275,6 +473,28 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn7.HeaderText = "IMEI2";
             this.dataGridViewTextBoxColumn7.MinimumWidth = 100;
             this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "std_googlekey";
+            this.dataGridViewTextBoxColumn8.HeaderText = "GoogleKey";
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            this.dataGridViewTextBoxColumn8.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn9
+            // 
+            this.dataGridViewTextBoxColumn9.DataPropertyName = "std_videotest";
+            this.dataGridViewTextBoxColumn9.HeaderText = "老化测试";
+            this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
+            this.dataGridViewTextBoxColumn9.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn10
+            // 
+            this.dataGridViewTextBoxColumn10.DataPropertyName = "std_version";
+            this.dataGridViewTextBoxColumn10.HeaderText = "软件版本";
+            this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
+            this.dataGridViewTextBoxColumn10.Visible = false;
             // 
             // ReSet
             // 
@@ -311,6 +531,7 @@ namespace UAS_MES_NEW.Make
             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
@@ -319,6 +540,7 @@ namespace UAS_MES_NEW.Make
             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
@@ -327,6 +549,7 @@ namespace UAS_MES_NEW.Make
             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
@@ -335,6 +558,7 @@ namespace UAS_MES_NEW.Make
             this.std_imei1.HeaderText = "IMEI1";
             this.std_imei1.MinimumWidth = 100;
             this.std_imei1.Name = "std_imei1";
+            this.std_imei1.Visible = false;
             // 
             // std_imei2
             // 
@@ -342,11 +566,33 @@ namespace UAS_MES_NEW.Make
             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;
-            this.StepCount.Location = new System.Drawing.Point(1102, 130);
+            this.StepCount.Location = new System.Drawing.Point(1109, 100);
             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);
@@ -373,10 +619,10 @@ 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(1204, 199);
+            this.OperateResult.Location = new System.Drawing.Point(1477, 154);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(538, 562);
+            this.OperateResult.Size = new System.Drawing.Size(282, 607);
             this.OperateResult.TabIndex = 27;
             this.OperateResult.Text = "";
             // 
@@ -385,6 +631,22 @@ namespace UAS_MES_NEW.Make
             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.Version);
+            this.Controls.Add(this.label23);
+            this.Controls.Add(this.Aging);
+            this.Controls.Add(this.label21);
+            this.Controls.Add(this.GoogleKey);
+            this.Controls.Add(this.label19);
+            this.Controls.Add(this.IMEI2);
+            this.Controls.Add(this.label17);
+            this.Controls.Add(this.IMEI1);
+            this.Controls.Add(this.label15);
+            this.Controls.Add(this.BT);
+            this.Controls.Add(this.label13);
+            this.Controls.Add(this.MAC);
+            this.Controls.Add(this.label11);
+            this.Controls.Add(this.PSN);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.label6);
             this.Controls.Add(this.WatchPath);
             this.Controls.Add(this.ReSet);
@@ -438,6 +700,28 @@ namespace UAS_MES_NEW.Make
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
         private System.Windows.Forms.Label label6;
         private System.Windows.Forms.TextBox WatchPath;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
+        private System.Windows.Forms.Label PSN;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label MAC;
+        private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.Label BT;
+        private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.Label IMEI1;
+        private System.Windows.Forms.Label label15;
+        private System.Windows.Forms.Label IMEI2;
+        private System.Windows.Forms.Label label17;
+        private System.Windows.Forms.Label GoogleKey;
+        private System.Windows.Forms.Label label19;
+        private System.Windows.Forms.Label Aging;
+        private System.Windows.Forms.Label label21;
+        private System.Windows.Forms.Label Version;
+        private System.Windows.Forms.Label label23;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_class;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_testresult;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_sn;
@@ -445,8 +729,8 @@ namespace UAS_MES_NEW.Make
         private System.Windows.Forms.DataGridViewTextBoxColumn std_bt;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_imei1;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_imei2;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_googlekey;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_videotest;
+        private System.Windows.Forms.DataGridViewTextBoxColumn std_version;
     }
 }

+ 33 - 13
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.cs

@@ -55,6 +55,16 @@ namespace UAS_MES_NEW.Make
             asc.controlAutoSize(this);
         }
 
+        private void LoadCollectedNum()
+        {
+            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 + "'");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BaseUtil.SetFormValue(Controls, dt);
+        }
+
         private void sncode_KeyDown(object sender, KeyEventArgs e)
         {
             //判断是enter事件
@@ -69,9 +79,11 @@ namespace UAS_MES_NEW.Make
                 {
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sncode.Text, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
                     {
+                        ma_code.Text = omakeCode;
+                        LoadCollectedNum();
                         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);
+                        //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, "*.csv");
                         BaseUtil.OpenCSVFile(ref dt, files[0]);
                         //移除标题行
@@ -84,29 +96,37 @@ namespace UAS_MES_NEW.Make
                         dt.Columns[4].ColumnName = "std_bt";
                         dt.Columns[5].ColumnName = "std_imei1";
                         dt.Columns[6].ColumnName = "std_imei2";
+                        dt.Columns[7].ColumnName = "std_googlekey";
+                        dt.Columns[8].ColumnName = "std_videotest";
+                        dt.Columns[9].ColumnName = "std_version";
+                        dt.DefaultView.Sort = "std_testresult";
                         CheckItemDGV.DataSource = dt;
                         bool Result = true;
-                        string MAC = "";
-                        string BT = "";
-                        string IMEI1 = "";
-                        string IMEI2 = "";
-                        string PSN = "";
+
                         for (int i = 0; i < dt.Rows.Count; i++)
                         {
-                            PSN = dt.Rows[0]["std_sn"].ToString();
-                            MAC = dt.Rows[0]["std_mac"].ToString().Replace(":", "").ToUpper();
-                            BT = dt.Rows[0]["std_bt"].ToString().Replace(":", "").ToUpper();
-                            IMEI1 = dt.Rows[0]["std_imei1"].ToString().Replace("null", "");
-                            IMEI2 = dt.Rows[0]["std_imei2"].ToString().Replace("null", "");
+                            PSN.Text = dt.Rows[0]["std_sn"].ToString();
+                            MAC.Text = dt.Rows[0]["std_mac"].ToString().Replace(":", "").ToUpper();
+                            BT.Text = dt.Rows[0]["std_bt"].ToString().Replace(":", "").ToUpper();
+                            IMEI1.Text = dt.Rows[0]["std_imei1"].ToString().Replace("null", "").Replace("unknow", "");
+                            IMEI2.Text = dt.Rows[0]["std_imei2"].ToString().Replace("null", "").Replace("unknow", "");
+                            GoogleKey.Text = dt.Rows[0]["std_googlekey"].ToString().Replace("null", "").Replace("unknow", "").ToUpper();
+                            Aging.Text = dt.Rows[0]["std_videotest"].ToString().Replace("null", "").Replace("unknow", "").ToUpper();
+                            Version.Text = dt.Rows[0]["std_version"].ToString().Replace("null", "").Replace("unknow", "");
                             if (dt.Rows[i]["std_testresult"].ToString() != "OK" || dt.Rows[i]["std_testresult"].ToString() == "NOTEST")
                             {
                                 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_testresult"].ToString() + "','')", "insert");
                         }
+                        if (Aging.Text == "")
+                        {
+                            OperateResult.AppendText(">>" + sncode.Text + "设备未进行老化测试\n");
+                            return;
+                        }
                         if (Result)
                         {
-                            if (LogicHandler.snChangeAndBurn(sncode.Text, PSN, User.UserSourceCode, User.UserCode, omakeCode, 0, IMEI1, IMEI2, "", "", "", "", "", "", "", MAC, BT, "", "", "", out oErrorMessage))
+                            if (LogicHandler.snChangeAndBurn(sncode.Text, PSN.Text, User.UserSourceCode, User.UserCode, omakeCode, 0, IMEI1.Text, IMEI2.Text, "", "", "", "", "", "", "", MAC.Text, BT.Text, "", "", "", out oErrorMessage))
                             {
                                 //提示正确返回时传递的信息
                                 if (oErrorMessage.Contains("AFTERSUCCESS"))
@@ -124,7 +144,7 @@ namespace UAS_MES_NEW.Make
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "标签核对", "参数核对成功", sncode.Text, "");
                                 //SN核对成功
                                 //>> 请输入SN
-                                OperateResult.AppendText("<<" + sncode.Text + "信息核对成功,转换SN" + PSN + "\n", Color.Green, sncode);
+                                OperateResult.AppendText("<<" + sncode.Text + "信息核对成功,转换SN" + PSN.Text + "\n", Color.Green, sncode);
                                 OperateResult.AppendText(">>请输入SN\n", Color.Black);
                                 SetCheck set = new SetCheck("OK", Color.Green);
                                 BaseUtil.SetFormCenter(set);

+ 3 - 15
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.resx

@@ -138,25 +138,13 @@
   <metadata name="std_imei2.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_testresult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="std_googlekey.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="std_sn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="std_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="std_videotest.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="std_bt.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="std_imei1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="std_imei2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="std_version.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
 </root>

+ 3 - 3
UAS_MES_PW/PublicMethod/BaseUtil.cs

@@ -1573,7 +1573,7 @@ namespace UAS_MES_NEW.PublicMethod
 
                 string strline;
                 string[] aryline;
-                StreamReader mysr = new StreamReader(strpath, System.Text.Encoding.Default);
+                StreamReader mysr = new StreamReader(strpath, System.Text.Encoding.UTF8);
 
                 while ((strline = mysr.ReadLine()) != null)
                 {
@@ -1595,7 +1595,7 @@ namespace UAS_MES_NEW.PublicMethod
 
                     //填充数据并加入到datatable中
                     mydr = mycsvdt.NewRow();
-                    for (int i = 0; i < intColCount; i++)
+                    for (int i = 0; i < aryline.Length; i++)
                     {
                         mydr[i] = aryline[i];
                     }
@@ -1607,7 +1607,7 @@ namespace UAS_MES_NEW.PublicMethod
             }
             catch (Exception ex)
             {
-                Console.WriteLine(ex.Message);
+                Console.WriteLine(ex.Message+ex.StackTrace);
                 return false;
             }
         }