Forráskód Böngészése

添加ADB指令获取Log文件信息

callm 3 éve
szülő
commit
9b7785c674

+ 123 - 94
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.Designer.cs

@@ -42,6 +42,16 @@ namespace UAS_MES_NEW.Make
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.CheckItemDGV = new System.Windows.Forms.DataGridView();
+            this.std_class = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_testresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_sn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_mac = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_bt = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_imei1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_imei2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_googlekey = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_videotest = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.std_version = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label6 = new System.Windows.Forms.Label();
             this.WatchPath = new System.Windows.Forms.TextBox();
             this.PSN = new System.Windows.Forms.Label();
@@ -71,19 +81,11 @@ namespace UAS_MES_NEW.Make
             this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ReSet = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
-            this.std_class = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_testresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_sn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_mac = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_bt = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_imei1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_imei2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_googlekey = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_videotest = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.std_version = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.MTK = new System.Windows.Forms.RadioButton();
+            this.ZHANXUN = new System.Windows.Forms.RadioButton();
             ((System.ComponentModel.ISupportInitialize)(this.CheckItemDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -225,6 +227,89 @@ namespace UAS_MES_NEW.Make
             this.CheckItemDGV.TabIndex = 33;
             this.CheckItemDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.CheckItemDGV_CellPainting);
             // 
+            // std_class
+            // 
+            this.std_class.DataPropertyName = "std_class";
+            this.std_class.HeaderText = "检测项";
+            this.std_class.MinimumWidth = 140;
+            this.std_class.Name = "std_class";
+            this.std_class.ReadOnly = true;
+            this.std_class.Width = 150;
+            // 
+            // std_testresult
+            // 
+            this.std_testresult.DataPropertyName = "std_testresult";
+            this.std_testresult.HeaderText = "测试结果";
+            this.std_testresult.MinimumWidth = 150;
+            this.std_testresult.Name = "std_testresult";
+            this.std_testresult.ReadOnly = true;
+            this.std_testresult.Width = 150;
+            // 
+            // std_sn
+            // 
+            this.std_sn.DataPropertyName = "std_sn";
+            this.std_sn.HeaderText = "SN";
+            this.std_sn.MinimumWidth = 100;
+            this.std_sn.Name = "std_sn";
+            this.std_sn.ReadOnly = true;
+            this.std_sn.Visible = false;
+            this.std_sn.Width = 200;
+            // 
+            // std_mac
+            // 
+            this.std_mac.DataPropertyName = "std_mac";
+            this.std_mac.HeaderText = "MAC";
+            this.std_mac.MinimumWidth = 100;
+            this.std_mac.Name = "std_mac";
+            this.std_mac.Visible = false;
+            this.std_mac.Width = 200;
+            // 
+            // std_bt
+            // 
+            this.std_bt.DataPropertyName = "std_bt";
+            this.std_bt.HeaderText = "BT";
+            this.std_bt.MinimumWidth = 100;
+            this.std_bt.Name = "std_bt";
+            this.std_bt.Visible = false;
+            this.std_bt.Width = 200;
+            // 
+            // std_imei1
+            // 
+            this.std_imei1.DataPropertyName = "std_imei1";
+            this.std_imei1.HeaderText = "IMEI1";
+            this.std_imei1.MinimumWidth = 100;
+            this.std_imei1.Name = "std_imei1";
+            this.std_imei1.Visible = false;
+            // 
+            // std_imei2
+            // 
+            this.std_imei2.DataPropertyName = "std_imei2";
+            this.std_imei2.HeaderText = "IMEI2";
+            this.std_imei2.MinimumWidth = 100;
+            this.std_imei2.Name = "std_imei2";
+            this.std_imei2.Visible = false;
+            // 
+            // std_googlekey
+            // 
+            this.std_googlekey.DataPropertyName = "std_googlekey";
+            this.std_googlekey.HeaderText = "GoogleKey";
+            this.std_googlekey.Name = "std_googlekey";
+            this.std_googlekey.Visible = false;
+            // 
+            // std_videotest
+            // 
+            this.std_videotest.DataPropertyName = "std_videotest";
+            this.std_videotest.HeaderText = "老化测试";
+            this.std_videotest.Name = "std_videotest";
+            this.std_videotest.Visible = false;
+            // 
+            // std_version
+            // 
+            this.std_version.DataPropertyName = "std_version";
+            this.std_version.HeaderText = "软件版本";
+            this.std_version.Name = "std_version";
+            this.std_version.Visible = false;
+            // 
             // label6
             // 
             this.label6.AutoSize = true;
@@ -242,7 +327,7 @@ namespace UAS_MES_NEW.Make
             this.WatchPath.Name = "WatchPath";
             this.WatchPath.Size = new System.Drawing.Size(258, 35);
             this.WatchPath.TabIndex = 36;
-            this.WatchPath.Text = "/storage/emulated/0/elink/";
+            this.WatchPath.Text = "/sdcard/factory";
             // 
             // PSN
             // 
@@ -506,89 +591,6 @@ namespace UAS_MES_NEW.Make
             this.ReSet.Text = "恢复出厂设置";
             this.ReSet.UseVisualStyleBackColor = true;
             // 
-            // std_class
-            // 
-            this.std_class.DataPropertyName = "std_class";
-            this.std_class.HeaderText = "检测项";
-            this.std_class.MinimumWidth = 140;
-            this.std_class.Name = "std_class";
-            this.std_class.ReadOnly = true;
-            this.std_class.Width = 150;
-            // 
-            // std_testresult
-            // 
-            this.std_testresult.DataPropertyName = "std_testresult";
-            this.std_testresult.HeaderText = "测试结果";
-            this.std_testresult.MinimumWidth = 150;
-            this.std_testresult.Name = "std_testresult";
-            this.std_testresult.ReadOnly = true;
-            this.std_testresult.Width = 150;
-            // 
-            // std_sn
-            // 
-            this.std_sn.DataPropertyName = "std_sn";
-            this.std_sn.HeaderText = "SN";
-            this.std_sn.MinimumWidth = 100;
-            this.std_sn.Name = "std_sn";
-            this.std_sn.ReadOnly = true;
-            this.std_sn.Visible = false;
-            this.std_sn.Width = 200;
-            // 
-            // std_mac
-            // 
-            this.std_mac.DataPropertyName = "std_mac";
-            this.std_mac.HeaderText = "MAC";
-            this.std_mac.MinimumWidth = 100;
-            this.std_mac.Name = "std_mac";
-            this.std_mac.Visible = false;
-            this.std_mac.Width = 200;
-            // 
-            // std_bt
-            // 
-            this.std_bt.DataPropertyName = "std_bt";
-            this.std_bt.HeaderText = "BT";
-            this.std_bt.MinimumWidth = 100;
-            this.std_bt.Name = "std_bt";
-            this.std_bt.Visible = false;
-            this.std_bt.Width = 200;
-            // 
-            // std_imei1
-            // 
-            this.std_imei1.DataPropertyName = "std_imei1";
-            this.std_imei1.HeaderText = "IMEI1";
-            this.std_imei1.MinimumWidth = 100;
-            this.std_imei1.Name = "std_imei1";
-            this.std_imei1.Visible = false;
-            // 
-            // std_imei2
-            // 
-            this.std_imei2.DataPropertyName = "std_imei2";
-            this.std_imei2.HeaderText = "IMEI2";
-            this.std_imei2.MinimumWidth = 100;
-            this.std_imei2.Name = "std_imei2";
-            this.std_imei2.Visible = false;
-            // 
-            // std_googlekey
-            // 
-            this.std_googlekey.DataPropertyName = "std_googlekey";
-            this.std_googlekey.HeaderText = "GoogleKey";
-            this.std_googlekey.Name = "std_googlekey";
-            this.std_googlekey.Visible = false;
-            // 
-            // std_videotest
-            // 
-            this.std_videotest.DataPropertyName = "std_videotest";
-            this.std_videotest.HeaderText = "老化测试";
-            this.std_videotest.Name = "std_videotest";
-            this.std_videotest.Visible = false;
-            // 
-            // std_version
-            // 
-            this.std_version.DataPropertyName = "std_version";
-            this.std_version.HeaderText = "软件版本";
-            this.std_version.Name = "std_version";
-            this.std_version.Visible = false;
-            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
@@ -626,11 +628,36 @@ namespace UAS_MES_NEW.Make
             this.OperateResult.TabIndex = 27;
             this.OperateResult.Text = "";
             // 
+            // MTK
+            // 
+            this.MTK.AutoSize = true;
+            this.MTK.Checked = true;
+            this.MTK.Location = new System.Drawing.Point(516, 786);
+            this.MTK.Name = "MTK";
+            this.MTK.Size = new System.Drawing.Size(77, 28);
+            this.MTK.TabIndex = 54;
+            this.MTK.TabStop = true;
+            this.MTK.Text = "MTK";
+            this.MTK.UseVisualStyleBackColor = true;
+            // 
+            // ZHANXUN
+            // 
+            this.ZHANXUN.AutoSize = true;
+            this.ZHANXUN.Location = new System.Drawing.Point(613, 786);
+            this.ZHANXUN.Name = "ZHANXUN";
+            this.ZHANXUN.Size = new System.Drawing.Size(89, 28);
+            this.ZHANXUN.TabIndex = 55;
+            this.ZHANXUN.TabStop = true;
+            this.ZHANXUN.Text = "展讯";
+            this.ZHANXUN.UseVisualStyleBackColor = true;
+            // 
             // Make_GetTestFileData
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1772, 866);
+            this.Controls.Add(this.ZHANXUN);
+            this.Controls.Add(this.MTK);
             this.Controls.Add(this.Version);
             this.Controls.Add(this.label23);
             this.Controls.Add(this.Aging);
@@ -732,5 +759,7 @@ namespace UAS_MES_NEW.Make
         private System.Windows.Forms.DataGridViewTextBoxColumn std_googlekey;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_videotest;
         private System.Windows.Forms.DataGridViewTextBoxColumn std_version;
+        private System.Windows.Forms.RadioButton MTK;
+        private System.Windows.Forms.RadioButton ZHANXUN;
     }
 }

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

@@ -81,6 +81,15 @@ namespace UAS_MES_NEW.Make
                     {
                         ma_code.Text = omakeCode;
                         LoadCollectedNum();
+                        //发送对应平台的指令
+                        if (MTK.Checked)
+                        {
+                            BaseUtil.GetDataFromDevice("MTK");
+                        }
+                        else
+                        {
+                            BaseUtil.GetDataFromDevice("ZHANXUN");
+                        }
                         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);
@@ -140,7 +149,7 @@ namespace UAS_MES_NEW.Make
                                 BaseUtil.SetFormValue(Controls, dt);
                                 //将SN,时间,结果记录在页面
                                 //记录日志
-                                //ftp.UpLoadFile(Application.StartupPath, sncode.Text + ".csv", "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/" + ms_prodcode + "/");
+                                ftp.UpLoadFile(Application.StartupPath, sncode.Text + ".csv", "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/" + ms_prodcode + "/");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "标签核对", "参数核对成功", sncode.Text, "");
                                 //SN核对成功
                                 //>> 请输入SN

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

@@ -147,4 +147,34 @@
   <metadata name="std_version.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">
+    <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">
+    <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">
+    <value>True</value>
+  </metadata>
+  <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_videotest.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="std_version.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 12 - 0
UAS_MES_PW/PublicMethod/BaseUtil.cs

@@ -1478,6 +1478,18 @@ namespace UAS_MES_NEW.PublicMethod
                     value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
                     p.Close();
                     break;
+                case "MTK":
+                    p.StartInfo.Arguments = " shell am start -n elink.com/elink.com.MainActivity";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "ZHANXUN":
+                    p.StartInfo.Arguments = " shell am start -n com.sprd.validationtools/com.sprd.validationtools.ValidationToolsMainActivity";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
                 default:
                     break;
             }