Browse Source

品网测试LOG读取

callm 3 years ago
parent
commit
5cd08dce3a

+ 2 - 2
UAS_MES_PW/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -311,8 +311,8 @@
             // NoteForChange
             // 
             this.NoteForChange.AutoSize = true;
-            this.NoteForChange.Checked = true;
-            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.NoteForChange.Checked = false;
+            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Unchecked;
             this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.NoteForChange.Location = new System.Drawing.Point(22, 78);
             this.NoteForChange.Margin = new System.Windows.Forms.Padding(4);

+ 4 - 2
UAS_MES_PW/FunctionCode/Make/Make_GetTestFileData.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
@@ -70,8 +71,9 @@ namespace UAS_MES_NEW.Make
                     {
                         string ms_prodcode = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_id='" + oMsid + "'").ToString();
                         DataTable dt = new DataTable();
-                        BaseUtil.GetDataFromDevice("GETFILE", WatchPath.Text + sncode.Text + ".csv");
-                        BaseUtil.OpenCSVFile(ref dt, Application.StartupPath + @"\" + sncode.Text + ".csv");
+                        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]);
                         //移除标题行
                         dt.Rows.RemoveAt(0);
                         //设置列名绑定数据

+ 4 - 4
UAS_MES_PW/FunctionCode/Make/Make_Repair.cs

@@ -312,10 +312,10 @@ namespace UAS_MES_NEW.Make
                                 cdstepcode = ms_stepcode;
                             }
                             cd_stepcode.Text = cdstepcode;
-                            if (dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "nvl(cd_ifinput,0)cd_ifinput", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and cd_stepcode = '" + cd_stepcode.Text + "'").ToString() == "-1")
-                                cd_stepcode.Enabled = false;
-                            else
-                                cd_stepcode.Enabled = true;
+                            //if (dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "nvl(cd_ifinput,0)cd_ifinput", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and cd_stepcode = '" + cd_stepcode.Text + "'").ToString() == "-1")
+                            //    cd_stepcode.Enabled = false;
+                            //else
+                            //    cd_stepcode.Enabled = true;
                             LoadBadInfTree(sender, e);
                         }
                         else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);

+ 2 - 2
UAS_MES_PW/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -565,8 +565,8 @@ namespace UAS_MES_NEW.Make
             // NoteForChange
             // 
             this.NoteForChange.AutoSize = true;
-            this.NoteForChange.Checked = true;
-            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.NoteForChange.Checked = false;
+            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Unchecked;
             this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.NoteForChange.Location = new System.Drawing.Point(580, 224);
             this.NoteForChange.Margin = new System.Windows.Forms.Padding(4);

+ 5 - 1
UAS_MES_PW/Login.cs

@@ -10,6 +10,7 @@ using System.Net.Sockets;
 using System.Threading;
 using System.Drawing;
 using UAS_MES_NEW.Properties;
+using System.IO;
 
 namespace UAS_MES_NEW
 {
@@ -50,7 +51,10 @@ namespace UAS_MES_NEW
             CheckForIllegalCrossThreadCalls = false;
             LoadMasterInf = new Thread(LoadMaster);
             LoadMasterInf.Start();
-
+            if (!Directory.Exists(Application.StartupPath + @"\" + DateTime.Now.ToString("yyyy-MM-dd")))
+            {
+                Directory.CreateDirectory(Application.StartupPath + @"\" + DateTime.Now.ToString("yyyy-MM-dd"));
+            }
             //SystemInf.OpenByNet = true;
             //显示上次用户登录的用户名,将输入框定位到密码
             UserName.Text = BaseUtil.GetCacheData("LastLoginUser").ToString();