Browse Source

优化三方插件包

yhluo 5 days ago
parent
commit
39f53efb8c

+ 5 - 4
UAS_MES_YTDZ/CustomControl/BaseForm/ClickToCloseForm.Designer.cs

@@ -35,17 +35,18 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 12F);
-            this.label1.Location = new System.Drawing.Point(56, 70);
+            this.label1.Location = new System.Drawing.Point(63, 84);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(0, 20);
+            this.label1.Size = new System.Drawing.Size(0, 24);
             this.label1.TabIndex = 0;
             // 
             // ClickToCloseForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(517, 288);
+            this.ClientSize = new System.Drawing.Size(806, 346);
             this.Controls.Add(this.label1);
+            this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.Name = "ClickToCloseForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "ClickToCloseForm";

+ 235 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_Humiture.Designer.cs

@@ -0,0 +1,235 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_Humiture
+    {
+        /// <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.components = new System.ComponentModel.Container();
+            this.MsgBox = new System.Windows.Forms.TableLayoutPanel();
+            this.TopBox = new System.Windows.Forms.Panel();
+            this.onStart = new System.Windows.Forms.Button();
+            this.timeVal = new System.Windows.Forms.TextBox();
+            this.IpPortUrlVal = new System.Windows.Forms.TextBox();
+            this.timeLab = new System.Windows.Forms.Label();
+            this.IpPortUrlLab = new System.Windows.Forms.Label();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.Msg4 = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Msg2 = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Msg3 = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Msg1 = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.timeLab1 = new System.Windows.Forms.Label();
+            this.claerBtn = new System.Windows.Forms.Button();
+            this.MsgBox.SuspendLayout();
+            this.TopBox.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // MsgBox
+            // 
+            this.MsgBox.ColumnCount = 2;
+            this.MsgBox.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.MsgBox.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.MsgBox.Controls.Add(this.Msg4, 1, 1);
+            this.MsgBox.Controls.Add(this.Msg2, 1, 0);
+            this.MsgBox.Controls.Add(this.Msg3, 0, 1);
+            this.MsgBox.Controls.Add(this.Msg1, 0, 0);
+            this.MsgBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.MsgBox.Location = new System.Drawing.Point(0, 252);
+            this.MsgBox.Name = "MsgBox";
+            this.MsgBox.RowCount = 2;
+            this.MsgBox.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 51.85185F));
+            this.MsgBox.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 48.14815F));
+            this.MsgBox.Size = new System.Drawing.Size(1280, 468);
+            this.MsgBox.TabIndex = 9;
+            // 
+            // TopBox
+            // 
+            this.TopBox.Controls.Add(this.claerBtn);
+            this.TopBox.Controls.Add(this.timeLab1);
+            this.TopBox.Controls.Add(this.onStart);
+            this.TopBox.Controls.Add(this.timeVal);
+            this.TopBox.Controls.Add(this.IpPortUrlVal);
+            this.TopBox.Controls.Add(this.timeLab);
+            this.TopBox.Controls.Add(this.IpPortUrlLab);
+            this.TopBox.Dock = System.Windows.Forms.DockStyle.Top;
+            this.TopBox.Location = new System.Drawing.Point(0, 0);
+            this.TopBox.Name = "TopBox";
+            this.TopBox.Size = new System.Drawing.Size(1280, 252);
+            this.TopBox.TabIndex = 10;
+            // 
+            // onStart
+            // 
+            this.onStart.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.onStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.onStart.Location = new System.Drawing.Point(388, 174);
+            this.onStart.Name = "onStart";
+            this.onStart.Size = new System.Drawing.Size(120, 35);
+            this.onStart.TabIndex = 9;
+            this.onStart.Text = "开启获取";
+            this.onStart.UseVisualStyleBackColor = true;
+            this.onStart.Click += new System.EventHandler(this.onStart_Click);
+            // 
+            // timeVal
+            // 
+            this.timeVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.timeVal.Location = new System.Drawing.Point(155, 115);
+            this.timeVal.Name = "timeVal";
+            this.timeVal.Size = new System.Drawing.Size(65, 31);
+            this.timeVal.TabIndex = 2;
+            // 
+            // IpPortUrlVal
+            // 
+            this.IpPortUrlVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.IpPortUrlVal.Location = new System.Drawing.Point(155, 62);
+            this.IpPortUrlVal.Name = "IpPortUrlVal";
+            this.IpPortUrlVal.Size = new System.Drawing.Size(355, 31);
+            this.IpPortUrlVal.TabIndex = 0;
+            // 
+            // timeLab
+            // 
+            this.timeLab.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.timeLab.Location = new System.Drawing.Point(103, 114);
+            this.timeLab.Name = "timeLab";
+            this.timeLab.Size = new System.Drawing.Size(59, 28);
+            this.timeLab.TabIndex = 3;
+            this.timeLab.Text = "时间:";
+            // 
+            // IpPortUrlLab
+            // 
+            this.IpPortUrlLab.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.IpPortUrlLab.Location = new System.Drawing.Point(61, 65);
+            this.IpPortUrlLab.Name = "IpPortUrlLab";
+            this.IpPortUrlLab.Size = new System.Drawing.Size(101, 28);
+            this.IpPortUrlLab.TabIndex = 1;
+            this.IpPortUrlLab.Text = "请求地址:";
+            // 
+            // timer1
+            // 
+            this.timer1.Interval = 60000;
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+            // 
+            // Msg4
+            // 
+            this.Msg4.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.Msg4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Msg4.Location = new System.Drawing.Point(644, 246);
+            this.Msg4.Margin = new System.Windows.Forms.Padding(4);
+            this.Msg4.Name = "Msg4";
+            this.Msg4.Size = new System.Drawing.Size(632, 218);
+            this.Msg4.TabIndex = 56;
+            this.Msg4.Text = "";
+            // 
+            // Msg2
+            // 
+            this.Msg2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.Msg2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Msg2.Location = new System.Drawing.Point(644, 4);
+            this.Msg2.Margin = new System.Windows.Forms.Padding(4);
+            this.Msg2.Name = "Msg2";
+            this.Msg2.Size = new System.Drawing.Size(632, 234);
+            this.Msg2.TabIndex = 55;
+            this.Msg2.Text = "";
+            // 
+            // Msg3
+            // 
+            this.Msg3.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.Msg3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Msg3.Location = new System.Drawing.Point(4, 246);
+            this.Msg3.Margin = new System.Windows.Forms.Padding(4);
+            this.Msg3.Name = "Msg3";
+            this.Msg3.Size = new System.Drawing.Size(632, 218);
+            this.Msg3.TabIndex = 54;
+            this.Msg3.Text = "";
+            // 
+            // Msg1
+            // 
+            this.Msg1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.Msg1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Msg1.Location = new System.Drawing.Point(4, 4);
+            this.Msg1.Margin = new System.Windows.Forms.Padding(4);
+            this.Msg1.Name = "Msg1";
+            this.Msg1.Size = new System.Drawing.Size(632, 234);
+            this.Msg1.TabIndex = 53;
+            this.Msg1.Text = "";
+            // 
+            // timeLab1
+            // 
+            this.timeLab1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.timeLab1.Location = new System.Drawing.Point(222, 114);
+            this.timeLab1.Name = "timeLab1";
+            this.timeLab1.Size = new System.Drawing.Size(59, 28);
+            this.timeLab1.TabIndex = 10;
+            this.timeLab1.Text = "分钟";
+            // 
+            // claerBtn
+            // 
+            this.claerBtn.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.claerBtn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.claerBtn.Location = new System.Drawing.Point(244, 174);
+            this.claerBtn.Name = "claerBtn";
+            this.claerBtn.Size = new System.Drawing.Size(120, 35);
+            this.claerBtn.TabIndex = 11;
+            this.claerBtn.Text = "清除提示";
+            this.claerBtn.UseVisualStyleBackColor = true;
+            this.claerBtn.Click += new System.EventHandler(this.claerBtn_Click);
+            // 
+            // Make_Humiture
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1280, 720);
+            this.Controls.Add(this.MsgBox);
+            this.Controls.Add(this.TopBox);
+            this.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Make_Humiture";
+            this.Text = "Make_Humiture";
+            this.Load += new System.EventHandler(this.Make_Humiture_Load);
+            this.MsgBox.ResumeLayout(false);
+            this.TopBox.ResumeLayout(false);
+            this.TopBox.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TableLayoutPanel MsgBox;
+        private CustomControl.RichText.RichTextAutoBottom Msg3;
+        private CustomControl.RichText.RichTextAutoBottom Msg1;
+        private System.Windows.Forms.Panel TopBox;
+        private CustomControl.RichText.RichTextAutoBottom Msg4;
+        private CustomControl.RichText.RichTextAutoBottom Msg2;
+        private System.Windows.Forms.Timer timer1;
+        private System.Windows.Forms.Label IpPortUrlLab;
+        private System.Windows.Forms.TextBox IpPortUrlVal;
+        private System.Windows.Forms.Label timeLab;
+        private System.Windows.Forms.TextBox timeVal;
+        private System.Windows.Forms.Button onStart;
+        private System.Windows.Forms.Label timeLab1;
+        private System.Windows.Forms.Button claerBtn;
+    }
+}

+ 240 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_Humiture.cs

@@ -0,0 +1,240 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net.Http;
+using System.Runtime.InteropServices.ComTypes;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using UAS_MES_NEW.CustomControl.RichText;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_Humiture : Form
+    {
+        public Make_Humiture()
+        {
+            InitializeComponent();
+        }
+
+        string url = "https://www.zzguorun.top/Platform/";
+        string secret = "GR682e728acdb269da22754ec9b78d6214";
+
+        List<string> clientId = new List<string>();
+        List<string> clientName = new List<string>();
+
+        DataHelper dh;
+
+        private void Make_Humiture_Load(object sender, EventArgs e)
+        {
+            IpPortUrlVal.Text = url;
+
+            dh = SystemInf.dh;
+        }
+
+        private void onStart_Click(object sender, EventArgs e)
+        {
+            if (string.IsNullOrEmpty(IpPortUrlVal.Text))
+            {
+                ShowMsg(Msg1, 0, "请输出请求地址");
+                IpPortUrlVal.Focus();
+                IpPortUrlVal.SelectAll();
+                return;
+            }
+            if (string.IsNullOrEmpty(timeVal.Text))
+            {
+                ShowMsg(Msg1, 0, "请输出获取间隔时间");
+                timeVal.Focus();
+                timeVal.SelectAll();
+                return;
+            }
+
+            if (onStart.Text == "获取中")
+            {
+                IpPortUrlVal.Enabled = true;
+                timeVal.Enabled = true;
+                onStart.Text = "开启获取";
+                timer1.Stop();
+            }
+            else
+            {
+                IpPortUrlVal.Enabled = false;
+                timeVal.Enabled  = false;
+                onStart.Text = "获取中";
+                double time = Convert.ToDouble(timeVal.Text) * 60000;
+                timer1.Interval = Convert.ToInt32(time);
+                ShowMsg(Msg1, 2, $"执行间隔:{timer1.Interval}毫秒");
+                timer1.Start();
+            }
+        }
+        private async void timer1_Tick(object sender, EventArgs e)
+        {
+            try
+            {
+                if (clientId.Count == 0)
+                {
+                    clientId.Clear();
+                    clientName.Clear();
+
+                    string apiUrl = IpPortUrlVal.Text.Trim() + "getAllEquipsInfo";
+                    var dataObject = new
+                    {
+                        secret = secret
+                    };
+                    string result = await HttpHelper.PostAsync(apiUrl, dataObject);
+                    JsonDocument doc = JsonDocument.Parse(result);
+                    JsonElement root = doc.RootElement;
+
+                    JsonElement dataArr = root.GetProperty("data");
+                    if (dataArr.ValueKind == JsonValueKind.Array)
+                    {
+                        foreach (JsonElement item in dataArr.EnumerateArray())
+                        {
+                            clientId.Add(item.GetProperty("clientid").ToString());
+                            clientName.Add(item.GetProperty("clientname").ToString());
+                        }
+                    }
+
+                    JsonElement nameElement = root.GetProperty("status");
+                    if (nameElement.ToString() == "200")
+                    {
+                        ShowMsg(Msg1, 1, $"获取温湿度设备成功,已获取到{dataArr.GetArrayLength()}个");
+                    }
+                }
+
+                string basrUrl = IpPortUrlVal.Text.Trim() + "getEquipDetails";
+                for(int i = 0;i < clientId.Count;i++)
+                {
+                    var paramsObj = new
+                    {
+                        secret = secret,
+                        clientId = clientId[i]
+                    };
+                    string result = await HttpHelper.PostAsync(basrUrl, paramsObj);
+                    JsonDocument doc = JsonDocument.Parse(result);
+                    JsonElement root = doc.RootElement;
+
+                    JsonElement nameElement = root.GetProperty("status");
+                    if (nameElement.ToString() == "200")
+                    {
+                        switch (i)
+                        {
+                            case 1:
+                                ShowMsg(Msg2, 1, $"温湿度设备:{clientName[i]},已获取并记录运行信息");
+                                break;
+                            case 2:
+                                ShowMsg(Msg3, 1, $"温湿度设备:{clientName[i]},已获取并记录运行信息");
+                                break;
+                            case 3:
+                                ShowMsg(Msg4, 1, $"温湿度设备:{clientName[i]},已获取并记录运行信息");
+                                break;
+                            default:
+                                ShowMsg(Msg1, 1, $"温湿度设备:{clientName[i]},已获取并记录运行信息");
+                                break;
+                        }
+                    }
+                    else
+                    {
+                        switch (i)
+                        {
+                            case 1:
+                                ShowMsg(Msg2, 0, $"温湿度设备:{clientName[i]},获取运行数据异常,请检查设备");
+                                break;
+                            case 2:
+                                ShowMsg(Msg3, 0, $"温湿度设备:{clientName[i]},获取运行数据异常,请检查设备");
+                                break;
+                            case 3:
+                                ShowMsg(Msg4, 0, $"温湿度设备:{clientName[i]},获取运行数据异常,请检查设备");
+                                break;
+                            default:
+                                ShowMsg(Msg1, 0, $"温湿度设备:{clientName[i]},获取运行数据异常,请检查设备");
+                                break;
+                        }
+                    }
+
+                    JsonElement chart = root.GetProperty("data").GetProperty("equip").GetProperty("chart");
+
+                    JsonElement checkPoint1_T = chart.GetProperty("检测点01").GetProperty("当前温度");
+                    JsonElement checkPoint1_H = chart.GetProperty("检测点01").GetProperty("当前湿度");
+
+                    JsonElement checkPoint2_T = chart.GetProperty("检测点02").GetProperty("当前温度");
+                    JsonElement checkPoint2_H = chart.GetProperty("检测点02").GetProperty("当前湿度");
+
+                    JsonElement checkPoint3_T = chart.GetProperty("检测点03").GetProperty("当前温度");
+                    JsonElement checkPoint3_H = chart.GetProperty("检测点03").GetProperty("当前湿度");
+
+                    JsonElement checkPoint4_T = chart.GetProperty("检测点04").GetProperty("当前温度");
+                    JsonElement checkPoint4_H = chart.GetProperty("检测点04").GetProperty("当前湿度");
+
+                    JsonElement checkPoint5_T = chart.GetProperty("检测点05").GetProperty("当前温度");
+                    JsonElement checkPoint5_H = chart.GetProperty("检测点05").GetProperty("当前湿度");
+
+                    JsonElement average = chart.GetProperty("环境平均湿度");
+
+                    dh.ExecuteSql($@"INSERT INTO HUMITURE (HU_ID,HU_INDATE,CHECKPOINT1_T,CHECKPOINT1_H,CHECKPOINT2_T,CHECKPOINT2_H,CHECKPOINT3_T,CHECKPOINT3_H,
+                                CHECKPOINT4_T,CHECKPOINT4_H,CHECKPOINT5_T,CHECKPOINT5_H,AVERAGE,EQUITYPE,EQUIID) VALUES 
+                                (HUMITURE_SEQ.NEXTVAL,sysdate,'{checkPoint1_T.ToString()}','{checkPoint1_H.ToString()}','{checkPoint2_T.ToString()}','{checkPoint2_H.ToString()}','{checkPoint3_T.ToString()}','{checkPoint3_H.ToString()}',
+                                 '{checkPoint4_T.ToString()}','{checkPoint4_H.ToString()}','{checkPoint5_T.ToString()}','{checkPoint5_H.ToString()}','{average.ToString()}','{clientName[i]}','{clientId[i]}')", "insert");
+
+                }
+            }
+            catch(Exception ex)
+            {
+                ShowMsg(Msg1, 0, $"获取数据时发生错误: {ex.Message}");
+            }
+        }
+
+
+        private void claerBtn_Click(object sender, EventArgs e)
+        {
+            Msg1.Clear();
+            Msg2.Clear();
+            Msg3.Clear();
+            Msg4.Clear();
+        }
+
+        private void ShowMsg(RichTextAutoBottom msgBox, int type, string msg)
+        {
+            msg = msg.Replace("\r", "").Replace("\n", "");
+            string msgTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            string showMsg = $"{msgTime}: {msg}\n";
+
+            if (type == 0)
+            {
+                msgBox.AppendText(showMsg, Color.Red);
+                msgBox.SelectionStart = msgBox.Text.Length;
+                msgBox.ScrollToCaret();
+            }
+            else if (type == 1)
+            {
+                msgBox.AppendText(showMsg, Color.Green);
+                msgBox.SelectionStart = msgBox.Text.Length;
+                msgBox.ScrollToCaret();
+            }
+            else if (type == 2)
+            {
+                msgBox.AppendText(showMsg, Color.YellowGreen);
+                msgBox.SelectionStart = msgBox.Text.Length;
+                msgBox.ScrollToCaret();
+            }
+        }
+        public static class HttpHelper
+        {
+            public static async Task<string> PostAsync<T>(string url, T data)
+            {
+                var client = new HttpClient();
+                string json = JsonSerializer.Serialize(data);
+                var content = new StringContent(json, Encoding.UTF8, "application/json");
+                var response = await client.PostAsync(url, content);
+                response.EnsureSuccessStatusCode();
+                return await response.Content.ReadAsStringAsync();
+            }
+        }
+
+    }
+}

+ 123 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_Humiture.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="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 427 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_ParseLog.Designer.cs

@@ -0,0 +1,427 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_ParseLog
+    {
+        /// <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.Device = new System.Windows.Forms.ComboBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.txtPath = new System.Windows.Forms.TextBox();
+            this.Choose = new System.Windows.Forms.Button();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.FileBox = new System.Windows.Forms.GroupBox();
+            this.Clear = new System.Windows.Forms.Button();
+            this.Delete = new System.Windows.Forms.Button();
+            this.Generate = new System.Windows.Forms.Button();
+            this.SN6 = new System.Windows.Forms.TextBox();
+            this.SN5 = new System.Windows.Forms.TextBox();
+            this.SN4 = new System.Windows.Forms.TextBox();
+            this.SN3 = new System.Windows.Forms.TextBox();
+            this.SN2 = new System.Windows.Forms.TextBox();
+            this.SN1 = new System.Windows.Forms.TextBox();
+            this.onWatch = new System.Windows.Forms.Button();
+            this.claerBtn = new System.Windows.Forms.Button();
+            this.allParse = new System.Windows.Forms.Button();
+            this.label3 = new System.Windows.Forms.Label();
+            this.lstOk = new System.Windows.Forms.ListBox();
+            this.lstFiles = new System.Windows.Forms.ListBox();
+            this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog();
+            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.panel1.SuspendLayout();
+            this.FileBox.SuspendLayout();
+            this.tableLayoutPanel1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // Device
+            // 
+            this.Device.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.Device.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Device.FormattingEnabled = true;
+            this.Device.Items.AddRange(new object[] {
+            "AOI设备",
+            "X-ray设备",
+            "CCD设备"});
+            this.Device.Location = new System.Drawing.Point(193, 88);
+            this.Device.Name = "Device";
+            this.Device.Size = new System.Drawing.Size(387, 39);
+            this.Device.TabIndex = 2;
+            this.Device.SelectedIndexChanged += new System.EventHandler(this.Device_SelectedIndexChanged);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(61, 92);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(101, 30);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "设备类型";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(61, 154);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(123, 30);
+            this.label2.TabIndex = 4;
+            this.label2.Text = "文件夹路径";
+            // 
+            // txtPath
+            // 
+            this.txtPath.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtPath.Location = new System.Drawing.Point(193, 154);
+            this.txtPath.Name = "txtPath";
+            this.txtPath.Size = new System.Drawing.Size(387, 35);
+            this.txtPath.TabIndex = 3;
+            // 
+            // Choose
+            // 
+            this.Choose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Choose.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Choose.Location = new System.Drawing.Point(601, 155);
+            this.Choose.Name = "Choose";
+            this.Choose.Size = new System.Drawing.Size(122, 38);
+            this.Choose.TabIndex = 4;
+            this.Choose.Text = "选择";
+            this.Choose.UseVisualStyleBackColor = true;
+            this.Choose.Click += new System.EventHandler(this.Choose_Click);
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            this.openFileDialog1.RestoreDirectory = true;
+            // 
+            // panel1
+            // 
+            this.panel1.BackColor = System.Drawing.SystemColors.Control;
+            this.panel1.Controls.Add(this.FileBox);
+            this.panel1.Controls.Add(this.onWatch);
+            this.panel1.Controls.Add(this.claerBtn);
+            this.panel1.Controls.Add(this.LockMakeCode);
+            this.panel1.Controls.Add(this.ma_code);
+            this.panel1.Controls.Add(this.allParse);
+            this.panel1.Controls.Add(this.label3);
+            this.panel1.Controls.Add(this.Device);
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Controls.Add(this.Choose);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.txtPath);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(1600, 296);
+            this.panel1.TabIndex = 7;
+            // 
+            // FileBox
+            // 
+            this.FileBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.FileBox.Controls.Add(this.Clear);
+            this.FileBox.Controls.Add(this.Delete);
+            this.FileBox.Controls.Add(this.Generate);
+            this.FileBox.Controls.Add(this.SN6);
+            this.FileBox.Controls.Add(this.SN5);
+            this.FileBox.Controls.Add(this.SN4);
+            this.FileBox.Controls.Add(this.SN3);
+            this.FileBox.Controls.Add(this.SN2);
+            this.FileBox.Controls.Add(this.SN1);
+            this.FileBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FileBox.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.FileBox.Location = new System.Drawing.Point(801, 25);
+            this.FileBox.Name = "FileBox";
+            this.FileBox.Size = new System.Drawing.Size(759, 244);
+            this.FileBox.TabIndex = 10;
+            this.FileBox.TabStop = false;
+            this.FileBox.Text = "Xray序列号文件名生成";
+            this.FileBox.Visible = false;
+            // 
+            // Clear
+            // 
+            this.Clear.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Clear.Location = new System.Drawing.Point(329, 193);
+            this.Clear.Name = "Clear";
+            this.Clear.Size = new System.Drawing.Size(117, 36);
+            this.Clear.TabIndex = 8;
+            this.Clear.Text = "一键清理";
+            this.Clear.UseVisualStyleBackColor = true;
+            this.Clear.Click += new System.EventHandler(this.Clear_Click);
+            // 
+            // Delete
+            // 
+            this.Delete.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Delete.Location = new System.Drawing.Point(489, 193);
+            this.Delete.Name = "Delete";
+            this.Delete.Size = new System.Drawing.Size(117, 36);
+            this.Delete.TabIndex = 7;
+            this.Delete.Text = "一键删除";
+            this.Delete.UseVisualStyleBackColor = true;
+            this.Delete.Click += new System.EventHandler(this.Delete_Click);
+            // 
+            // Generate
+            // 
+            this.Generate.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Generate.Location = new System.Drawing.Point(174, 193);
+            this.Generate.Name = "Generate";
+            this.Generate.Size = new System.Drawing.Size(117, 36);
+            this.Generate.TabIndex = 6;
+            this.Generate.Text = "一键生成";
+            this.Generate.UseVisualStyleBackColor = true;
+            this.Generate.Click += new System.EventHandler(this.Generate_Click);
+            // 
+            // SN6
+            // 
+            this.SN6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN6.Location = new System.Drawing.Point(522, 128);
+            this.SN6.Name = "SN6";
+            this.SN6.Size = new System.Drawing.Size(222, 31);
+            this.SN6.TabIndex = 5;
+            this.SN6.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN6_KeyDown);
+            // 
+            // SN5
+            // 
+            this.SN5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN5.Location = new System.Drawing.Point(271, 128);
+            this.SN5.Name = "SN5";
+            this.SN5.Size = new System.Drawing.Size(222, 31);
+            this.SN5.TabIndex = 4;
+            this.SN5.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN5_KeyDown);
+            // 
+            // SN4
+            // 
+            this.SN4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN4.Location = new System.Drawing.Point(20, 128);
+            this.SN4.Name = "SN4";
+            this.SN4.Size = new System.Drawing.Size(222, 31);
+            this.SN4.TabIndex = 3;
+            this.SN4.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN4_KeyDown);
+            // 
+            // SN3
+            // 
+            this.SN3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN3.Location = new System.Drawing.Point(522, 55);
+            this.SN3.Name = "SN3";
+            this.SN3.Size = new System.Drawing.Size(222, 31);
+            this.SN3.TabIndex = 2;
+            this.SN3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN3_KeyDown);
+            // 
+            // SN2
+            // 
+            this.SN2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN2.Location = new System.Drawing.Point(271, 55);
+            this.SN2.Name = "SN2";
+            this.SN2.Size = new System.Drawing.Size(222, 31);
+            this.SN2.TabIndex = 1;
+            this.SN2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN2_KeyDown);
+            // 
+            // SN1
+            // 
+            this.SN1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN1.Location = new System.Drawing.Point(20, 55);
+            this.SN1.Name = "SN1";
+            this.SN1.Size = new System.Drawing.Size(222, 31);
+            this.SN1.TabIndex = 0;
+            this.SN1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN1_KeyDown);
+            // 
+            // onWatch
+            // 
+            this.onWatch.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.onWatch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.onWatch.Location = new System.Drawing.Point(66, 232);
+            this.onWatch.Name = "onWatch";
+            this.onWatch.Size = new System.Drawing.Size(122, 38);
+            this.onWatch.TabIndex = 8;
+            this.onWatch.Text = "开启解析";
+            this.onWatch.UseVisualStyleBackColor = true;
+            this.onWatch.Click += new System.EventHandler(this.onWatch_Click);
+            // 
+            // claerBtn
+            // 
+            this.claerBtn.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.claerBtn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.claerBtn.Location = new System.Drawing.Point(391, 231);
+            this.claerBtn.Name = "claerBtn";
+            this.claerBtn.Size = new System.Drawing.Size(122, 38);
+            this.claerBtn.TabIndex = 7;
+            this.claerBtn.Text = "清除";
+            this.claerBtn.UseVisualStyleBackColor = true;
+            this.claerBtn.Click += new System.EventHandler(this.claerBtn_Click);
+            // 
+            // allParse
+            // 
+            this.allParse.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.allParse.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.allParse.Location = new System.Drawing.Point(230, 232);
+            this.allParse.Name = "allParse";
+            this.allParse.Size = new System.Drawing.Size(122, 38);
+            this.allParse.TabIndex = 5;
+            this.allParse.Text = "批量解析";
+            this.allParse.UseVisualStyleBackColor = true;
+            this.allParse.Click += new System.EventHandler(this.allParse_Click);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(61, 26);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(101, 30);
+            this.label3.TabIndex = 6;
+            this.label3.Text = "归属工单";
+            // 
+            // lstOk
+            // 
+            this.lstOk.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.lstOk.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lstOk.FormattingEnabled = true;
+            this.lstOk.ItemHeight = 28;
+            this.lstOk.Location = new System.Drawing.Point(3, 3);
+            this.lstOk.Name = "lstOk";
+            this.lstOk.Size = new System.Drawing.Size(1594, 296);
+            this.lstOk.TabIndex = 1;
+            // 
+            // lstFiles
+            // 
+            this.lstFiles.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.lstFiles.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+            this.lstFiles.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lstFiles.FormattingEnabled = true;
+            this.lstFiles.ItemHeight = 22;
+            this.lstFiles.Location = new System.Drawing.Point(3, 305);
+            this.lstFiles.Name = "lstFiles";
+            this.lstFiles.Size = new System.Drawing.Size(1594, 296);
+            this.lstFiles.TabIndex = 0;
+            this.lstFiles.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lstFiles_DrawItem);
+            // 
+            // openFileDialog2
+            // 
+            this.openFileDialog2.FileName = "openFileDialog2";
+            // 
+            // tableLayoutPanel1
+            // 
+            this.tableLayoutPanel1.ColumnCount = 1;
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+            this.tableLayoutPanel1.Controls.Add(this.lstOk, 0, 0);
+            this.tableLayoutPanel1.Controls.Add(this.lstFiles, 0, 1);
+            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 296);
+            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+            this.tableLayoutPanel1.RowCount = 2;
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(1600, 604);
+            this.tableLayoutPanel1.TabIndex = 8;
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(523, 30);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(72, 28);
+            this.LockMakeCode.TabIndex = 1;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.BackColor = System.Drawing.SystemColors.Control;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(193, 25);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(320, 42);
+            this.ma_code.TabIndex = 0;
+            this.ma_code.TableName = null;
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // Make_ParseLog
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.Window;
+            this.ClientSize = new System.Drawing.Size(1600, 900);
+            this.Controls.Add(this.tableLayoutPanel1);
+            this.Controls.Add(this.panel1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Make_ParseLog";
+            this.Text = "Make_ParseLog";
+            this.Load += new System.EventHandler(this.Make_ParseLog_Load);
+            this.panel1.ResumeLayout(true);
+            this.panel1.PerformLayout();
+            this.FileBox.ResumeLayout(true);
+            this.FileBox.PerformLayout();
+            this.tableLayoutPanel1.ResumeLayout(true);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox Device;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox txtPath;
+        private System.Windows.Forms.Button Choose;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Button allParse;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private System.Windows.Forms.OpenFileDialog openFileDialog2;
+        private System.Windows.Forms.ListBox lstFiles;
+        private System.Windows.Forms.Button claerBtn;
+        private System.Windows.Forms.Button onWatch;
+        private System.Windows.Forms.ListBox lstOk;
+        private System.Windows.Forms.GroupBox FileBox;
+        private System.Windows.Forms.TextBox SN1;
+        private System.Windows.Forms.TextBox SN6;
+        private System.Windows.Forms.TextBox SN5;
+        private System.Windows.Forms.TextBox SN4;
+        private System.Windows.Forms.TextBox SN3;
+        private System.Windows.Forms.TextBox SN2;
+        private System.Windows.Forms.Button Generate;
+        private System.Windows.Forms.Button Delete;
+        private System.Windows.Forms.Button Clear;
+        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+    }
+}

+ 994 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_ParseLog.cs

@@ -0,0 +1,994 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Security.AccessControl;
+using System.Security.Principal;
+using System.Text;
+using System.Web.Services.Description;
+using System.Web.UI.WebControls;
+using System.Windows.Forms;
+using UAS_MES_NEW.CustomControl.ButtonUtil;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_ParseLog : Form
+    {
+        public Make_ParseLog()
+        {
+            InitializeComponent();
+        }
+
+        FileSystemWatcher watcher;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable Dbfind;
+        DataTable dt;
+
+        DataHelper dh;
+        string currFileType = "", equiType = "";
+
+        string SN, omakeCode, oMsid, oErrorMessage = "";
+        List<string> fileList = new List<string>();
+
+        Timer ChangeWoTimer;
+
+        string outFileMsg;
+
+        private void Make_ParseLog_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+            Choose.Enabled = false;
+            fileList.Add("E:\\AOIMes\\Mes");
+            fileList.Add("E:\\UAS");
+            fileList.Add("");
+
+            ChangeWoTimer = new Timer();
+            ChangeWoTimer.Interval = 30000;
+            ChangeWoTimer.Tick += ChangeWoFunc;
+
+            watcher = new FileSystemWatcher();
+            watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite;
+            watcher.Created += OnFileCreated;
+            watcher.Changed += OnFileChanged;
+            /*watcher.Deleted += OnFileChanged;
+            watcher.Renamed += OnFileChanged;*/
+
+            //设置锁定工单
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
+            //工单号放大镜配置
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,pr_code # 产品编号,pr_detail # 产品名称";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_detail" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
+        }
+
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            //获取工单的其他信息
+            sql.Clear();
+            sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_detail,");
+            sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+            sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+            {
+                BaseUtil.SetFormValue(this.Controls, dt);
+            }
+        }
+
+        private void Device_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (Device.SelectedIndex == -1) return;
+
+            if(ChangeWoTimer.Enabled)   ChangeWoTimer.Stop();
+            onWatch.Enabled = true;
+            FileBox.Visible = false;
+
+            switch (Device.SelectedIndex)
+            {
+                case 0:
+                    currFileType = "Txt";
+                    equiType = "AOI";
+                    /*ChangeWoTimer.Start();
+                    ChangeWoFunc(null, null);*/
+                    break;
+                case 1:
+                    currFileType = "bmp";
+                    equiType = "Xray";
+                    onWatch.Enabled = false;
+                    FileBox.Visible = true;
+                    break;
+                case 2:
+                    currFileType = "jpg";
+                    equiType = "CCD";
+                    break;
+            }
+
+            txtPath.Text = fileList[Device.SelectedIndex];
+            txtPath.Focus();
+            txtPath.SelectAll();
+            ma_code.Enabled = true;
+            Choose.Enabled = true;
+            txtPath.Enabled = false;
+        }
+
+        private void Choose_Click(object sender, EventArgs e)
+        {
+            using (var dialog = new FolderBrowserDialog())
+            {
+                if (dialog.ShowDialog() == DialogResult.OK)
+                {
+                    txtPath.Text = dialog.SelectedPath;
+                    txtPath.Enabled = false;
+                    Device.Enabled = false;
+                    watcher.EnableRaisingEvents = false;
+                }
+            }
+        }
+
+        private void claerBtn_Click(object sender, EventArgs e)
+        {
+            lstFiles.Items.Clear();
+        }
+
+        private void allParse_Click(object sender, EventArgs e)
+        {
+            if (String.IsNullOrEmpty(ma_code.Text))
+            {
+                ma_code.Focus();
+                MessageBox.Show(this.ParentForm, "请选择归属工单", "提示");
+                return;
+            }
+
+            if (Device.SelectedIndex == -1)
+            {
+                Device.Focus();
+                Device.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择设备", "提示");
+                return;
+            }
+            if (String.IsNullOrEmpty(txtPath.Text))
+            {
+                txtPath.Focus();
+                txtPath.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择解析路径", "提示");
+                return;
+            }
+            string[] txtFiles;
+            if (equiType == "Xray")
+            {
+                txtFiles = Directory.GetDirectories(txtPath.Text);
+                if (txtFiles.Length == 0)
+                {
+                    LogMessage(0, $"当前路径{txtPath.Text},没有{equiType}设备输出的文件夹");
+                    return;
+                }
+            }
+            else
+            {
+                txtFiles = Directory.GetFiles(txtPath.Text, $"*.{currFileType}");
+                if (txtFiles.Length == 0)
+                {
+                    LogMessage(0, $"当前{txtPath.Text},没有{equiType}设备输出的{currFileType.ToLower()}文件");
+                    return;
+                }
+            }
+            RefreshFileList();
+        }
+
+        private void onWatch_Click(object sender, EventArgs e)
+        {
+            if (String.IsNullOrEmpty(ma_code.Text))
+            {
+                ma_code.Focus();
+                MessageBox.Show(this.ParentForm, "请选择归属工单", "提示");
+                return;
+            }
+            if (Device.SelectedIndex == -1)
+            {
+                Device.Focus();
+                Device.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择设备", "提示");
+                return;
+            }
+            if (String.IsNullOrEmpty(txtPath.Text))
+            {
+                txtPath.Focus();
+                txtPath.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择解析路径", "提示");
+                return;
+            }
+            try
+            {
+                watcher.Path = txtPath.Text;
+                watcher.Filter = $"*.{currFileType}";
+                if (onWatch.Text == "开启解析")
+                {
+                    watcher.EnableRaisingEvents = true;
+                    onWatch.Text = "关闭解析";
+                }
+                else
+                {
+                    watcher.EnableRaisingEvents = false;
+                    onWatch.Text = "开启解析";
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(this.ParentForm, ex.Message, "警告");
+            }
+        }
+
+        private void OnFileCreated(object sender, FileSystemEventArgs e)
+        {
+            RefreshFileList();
+        }
+
+        private void OnFileChanged(object sender, FileSystemEventArgs e)
+        {
+            if (e.ChangeType == WatcherChangeTypes.Changed)
+            {
+                RefreshFileList();
+            }
+        }
+
+        private void RefreshFileList()
+        {
+            if (lstFiles.InvokeRequired)
+            {
+                lstFiles.Invoke(new Action(RefreshFileList));
+                lstFiles.BeginInvoke(new Action(RefreshFileList));
+                return;
+            }
+
+            try
+            {
+                if (!Directory.Exists(txtPath.Text))
+                {
+                    LogMessage(0, $"目录不存在: {txtPath.Text}");
+                    return;
+                }
+
+                string[] txtFiles;
+                if (equiType == "Xray")
+                {
+                    txtFiles = Directory.GetDirectories(txtPath.Text);
+                }
+                else
+                {
+                    txtFiles = Directory.GetFiles(txtPath.Text, $"*.{currFileType}");
+                }
+                if (txtFiles.Length == 0)
+                {
+                    return;
+                }
+
+                foreach (string file in txtFiles)
+                {
+                    if (equiType == "Xray")
+                    {
+                        if (Path.GetFileName(file).Contains("Log_")) continue;
+
+                        if (!Directory.Exists(file))
+                        {
+                            LogMessage(0, $"文件夹不存在: {file}");
+                        }
+
+                        outFileMsg = CheckFolderPermissions(file);
+
+                        if (outFileMsg != "OK")
+                        {
+                            if(!outFileMsg.Contains("文件被占用"))
+                            {
+                                LogMessage(0, outFileMsg);
+                            }
+                            continue;
+                        }
+                    }else if (equiType == "CCD")
+                    {
+                        outFileMsg = CheckFileAccess(file);
+                        if (outFileMsg != "OK")
+                        {
+                            //LogMessage(0, outFileMsg);
+                            //continue;
+                        }
+                    }
+                    else
+                    {
+                        if (!File.Exists(file))
+                        {
+                            LogMessage(0, $"文件不存在: {file}");
+                        }
+
+                        if (File.ReadAllText(file).Length == 0)
+                        {
+                            continue;
+                        }
+                    }
+
+                    if (equiType == "AOI")
+                    {
+                        using (FileStream fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+                        using (StreamReader SR = new StreamReader(fileStream, Encoding.GetEncoding("GBK")))
+                        {
+                            string Content = SR.ReadToEnd();
+                            SR.Close();
+                            SR.Dispose();
+                            List<Log> logArr = new List<Log>() { };
+                            string[] lines = Content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
+                            int fileNum = string.IsNullOrEmpty(lines[lines.Length - 1]) ? lines.Length - 1 : lines.Length;
+                            Log itemLog = new Log() { };
+                            foreach (var item in lines)
+                            {
+                                if (string.IsNullOrEmpty(item)) continue;
+
+                                if (Array.IndexOf(lines, item) == 1) itemLog.SN = item.Split(':')[1].ToString().Trim().Replace(";", ";");
+                                if (Array.IndexOf(lines, item) == 2) itemLog.TestTime = item.Split(':')[1].Split('.')[0].ToString().Trim();
+                                if (Array.IndexOf(lines, item) == 3) itemLog.Result = item.Split(':')[1].ToString().Trim();
+                                if (Array.IndexOf(lines, item) == 4) itemLog.Side = item.Split(':')[1].ToString().Trim();
+
+                                if (item.IndexOf("元件位置") > -1)
+                                {
+                                    LogItem list = new LogItem();
+                                    int ind = Array.IndexOf(lines, item);
+                                    list.Location = lines[ind].Split(':')[1].ToString().Trim();
+                                    list.ReelNo = lines[ind + 1].Split(':')[1].ToString().Trim();
+                                    list.FirstType = lines[ind + 2].Split(':')[1].ToString().Trim();
+                                    list.SceondType = lines[ind + 3].Split(':')[1].ToString().Trim();
+                                    list.Name = lines[ind + 4].Split(':')[1].ToString().Trim();
+                                    itemLog.LogItemList.Add(list);
+                                }
+                            }
+                            logArr.Add(itemLog);
+                            if (logArr.Count == 0)
+                            {
+                                break;
+                            }
+
+                            if (InsertDb(logArr, file, fileNum))
+                            {
+                                if (ConsoleLog(Content, file, logArr[0].SN))
+                                {
+                                    File.WriteAllText(file, string.Empty);
+                                    outFileMsg = CheckFileAccess(file);
+                                    if (outFileMsg == "OK")
+                                    {
+                                        File.Delete(file);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    else if (equiType == "Xray")
+                    {
+                        if (Path.GetFileName(file).Contains('_'))
+                        {
+                            SN = Path.GetFileName(file).Split('_')[1].Replace(";", ";");
+                            string[] floderFile = Directory.GetFiles(file, $"*.{currFileType}");
+                            foreach (string floderFileItem in floderFile)
+                            {
+                                if (UploadImageToFtp(floderFileItem, SN))
+                                {
+                                    //if (!LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                                    //{
+                                    //    LogMessage(0, $"核对NG:{oErrorMessage}");
+                                    //}
+                                    dh.ExecuteSql($@"INSERT INTO steptestmain (sm_id, sm_sn,sm_makecode,sm_stepcode,sm_indate,sm_machinecode,sm_result) 
+                                    VALUES ( steptestmain_seq.NEXTVAL,'{SN}','{ma_code.Text.Trim()}','{User.UserSourceCode}', sysdate,'Xray', 'http://192.168.1.5:8099/ftp/xray/{DateTime.Now.ToString("yyyyMMdd")}/{SN}/{Path.GetFileName(floderFileItem)}' )", "insert");
+
+                                    if (Array.IndexOf(floderFile, floderFileItem) == floderFile.Length - 1)
+                                    {
+                                        string newFloderName = Path.GetDirectoryName(file);
+                                        Directory.Move(file, Path.Combine(newFloderName, "Log_" + Path.GetFileName(file)));
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    else if(equiType == "CCD")
+                    {
+                        foreach (var fileItem in txtFiles)
+                        {
+                            string imageName = Path.GetFileName(fileItem);
+                            string iName = imageName.Split('_')[0];
+                            if (iName.Length > 14)
+                            {
+                                SN = iName.Length > 14 ? iName.Substring(3) : "";
+                            }
+
+                            if (imageName.ToUpper().Contains("NG"))
+                            {
+                                if (txtFiles.Length != 3)
+                                {
+                                    SN = "";
+                                    return;
+                                }
+                            }
+                            else if(imageName.ToUpper().Contains("OK"))
+                            {
+                                if (txtFiles.Length != 2)
+                                {
+                                    SN = "";
+                                    return;
+                                }
+                            }
+                        }
+
+                        string parentPath = Path.GetDirectoryName(file);
+                        string newFolderPath = Path.Combine(parentPath, "Logs");
+                        if (!Directory.Exists(newFolderPath))
+                        {
+                            Directory.CreateDirectory(newFolderPath);
+                        }
+                        string changeName = Path.Combine(newFolderPath, SN);
+                        if (!Directory.Exists(changeName))
+                        {
+                            Directory.CreateDirectory(changeName);
+                        }
+
+                        string result = Path.GetFileName(file).Split('_')[0];
+
+                        if (result.ToUpper().Contains("NG"))
+                        {
+                            if (UploadImageToFtp(file, SN))
+                            {
+                                dh.ExecuteSql($@"INSERT INTO steptestmain (sm_id, sm_sn,sm_makecode,sm_stepcode,sm_indate,sm_machinecode,sm_result) 
+                                        VALUES (steptestmain_seq.NEXTVAL,'{SN}','{ma_code.Text}','{User.UserSourceCode}', sysdate,'CCD', 'http://192.168.1.5:8088/ftp/ccd/{SN}/{Path.GetFileName(file)}' )", "insert");
+                            }
+                        }
+                        string targetFile = Path.Combine(changeName, Path.GetFileName(file));
+
+                        if (File.Exists(targetFile))
+                        {
+                            File.Delete(targetFile);
+                        }
+                        File.Move(file, targetFile);
+                    }
+                }
+                if (equiType == "CCD")
+                {
+
+                    LogMessage(1, $"序列号: {SN} 图片已处理");
+                }
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"Error: 解析文件列表失败: {ex.Message}");
+            }
+        }
+
+
+        private bool InsertDb(List<Log> logs, string PathName, int fileNum)
+        {
+            try
+            {
+                StringBuilder sql = new StringBuilder();
+                StringBuilder details = new StringBuilder();
+                List<string> param = new List<string>() { };
+                foreach (var item in logs)
+                {
+                    dt = (DataTable)dh.ExecuteSql($"SELECT mp_id FROM makeprocess WHERE mp_sncode = '{item.SN}' AND mp_sourcecode = 'AOI'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        LogMessage(1, $"序列号:{item.SN}已经过站并记录测试信息");
+                        continue;
+                    }
+
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, item.SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                    {
+                        if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, item.SN, "日志解析", item.Result.ToUpper() == "PASS" ? "OK" :"NG", User.UserCode, out oErrorMessage))
+                        {
+                            string outMsg = "";
+                            param.Add(omakeCode);
+                            param.Add(item.SN);
+                            param.Add(User.UserSourceCode);
+                            param.Add(User.UserName);
+                            param.Add(User.CurrentStepCode);
+                            param.Add(item.Result.ToUpper());
+                            param.Add(item.TestTime);
+                            param.Add(item.Side);
+                            param.Add(equiType);
+                            details.Clear();
+                            foreach (LogItem LI in item.LogItemList)
+                            {
+                                details.Append($"{LI.Location}/{LI.ReelNo}/{LI.FirstType}/{LI.SceondType}/{LI.Name};");
+                            }
+                            param.Add(details.ToString());
+                            param.Add(outMsg);
+                            string[] paramList = param.ToArray();
+                            dh.CallProcedure("CS_INSERT_TESTDETAILS", ref paramList);
+                            if (paramList[10].Substring(0, 2) == "OK")
+                            {
+                                LogMessage(1, $"文件: {item.SN} 采集成功, 测试结果为{item.Result},共{item.LogItemList.Count}条信息");
+                            }
+                            else
+                            {
+                                LogMessage(1, paramList[8]);
+                            }
+                            param.Clear();
+
+                            if (logs.IndexOf(item) == logs.Count - 1)
+                            {
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, omakeCode, User.UserLineCode, User.UserSourceCode, "日志解析", "日志解析过站成功", item.SN, "");
+                                return true;
+                            }
+                        }
+                        else
+                        {
+                            LogMessage(0, $"处理过站NG:{oErrorMessage}");
+                            break;
+                        }
+                    }
+                    else
+                    {
+                        LogMessage(0, $"过站核对NG:{oErrorMessage}");
+                        break;
+                    }
+                }
+                return false;
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"Error,处理解析写入: {ex.Message}");
+                return false;
+            }
+        }
+
+        private void ChangeWoFunc(object sender, EventArgs e)
+        {
+            try
+            {
+                sql.Clear();
+                sql.Append($"SELECT dl_macode FROM deviceline WHERE dl_linecode = '{User.UserLineCode}'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0 && !String.IsNullOrEmpty(dt.Rows[0]["dl_macode"].ToString()))
+                {
+                    ma_code.Text = dt.Rows[0]["dl_macode"].ToString().Trim();
+                    return;
+                }
+
+                LogMessage(0, $"NG,自动识别更新工单");
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"Error,自动切换工单: {ex.Message}");
+            }
+        }
+
+        private bool ConsoleLog(string Content, string PathName,string SN)
+        {
+            try
+            {
+                string sourcePaht = Path.GetDirectoryName(PathName);
+                string changeName = Path.Combine(sourcePaht, $"{SN}.{currFileType}");
+
+                string newFolderName = "Logs";
+                string newFolderPath = Path.Combine(sourcePaht, newFolderName);
+
+                if (!Directory.Exists(newFolderPath))
+                {
+                    Directory.CreateDirectory(newFolderPath);
+                }
+
+                string newFileName = "Log_" + Path.GetFileName(changeName);
+                string newFilePath = Path.Combine(newFolderPath, newFileName);
+
+                File.AppendAllText(newFilePath, Content + Environment.NewLine);
+                return true;
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(this.ParentForm, ex.Message, "警告");
+                return false;
+            }
+        }
+
+        private void LogMessage(int type, string message)
+        {
+            if (type == 0)
+            {
+                if (lstFiles.InvokeRequired)
+                {
+                    lstFiles.Invoke(new Action<int, string>(LogMessage), new object[] { type, message });
+                    return;
+                }
+                lstFiles.Items.Add($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {message}");
+                lstFiles.TopIndex = lstFiles.Items.Count - 1;
+            }
+            else
+            {
+                if (lstOk.InvokeRequired)
+                {
+                    lstOk.Invoke(new Action<int, string>(LogMessage), new object[] { type, message });
+                    return;
+                }
+                lstOk.Items.Add($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {message}");
+                lstOk.TopIndex = lstOk.Items.Count - 1;
+            }
+        }
+        private void lstFiles_DrawItem(object sender, DrawItemEventArgs e)
+        {
+            if (e.Index < 0) return;
+
+            e.DrawBackground();
+            string txt = lstFiles.Items[e.Index].ToString().ToUpper();
+            Brush color = Brushes.Black;
+            if (txt.Contains("NG"))
+            {
+                color = Brushes.Red;
+            }
+            else if (txt.Contains("ERROR"))
+            {
+                color = Brushes.Red;
+            }
+            else
+            {
+                color = Brushes.Green;
+            }
+            e.DrawFocusRectangle();
+            e.Graphics.DrawString(lstFiles.Items[e.Index].ToString(), e.Font, color, e.Bounds, StringFormat.GenericDefault);
+        }
+
+        public bool UploadImageToFtp(string localFilePath, string Sn)
+        {
+            string ftpServer;
+
+            ftpServer = equiType == "Xray" ? "ftp://10.8.0.215:21/xray/" : "ftp://10.8.0.215:21/ccd/";
+            ftpServer = equiType == "Xray" ? "ftp://192.168.1.5:21/xray/" : "ftp://192.168.1.5:21/ccd/";
+
+            string username = "vsftpd";
+            string password = "vsftpd3ef41637hy";
+
+            string ftpTimePath = $"{ftpServer.TrimEnd('/')}/{DateTime.Now.ToString("yyyyMMdd")}";
+            string outResult = CreateFtpDirectoryIfNotExists(ftpTimePath, username, password);
+            if (outResult.Substring(0, 2) != "OK")
+            {
+                LogMessage(0, outResult);
+                return false;
+            }
+
+            string ftpFullPath = $"{ftpTimePath}/{Sn}";
+            outResult = CreateFtpDirectoryIfNotExists(ftpFullPath, username, password);
+            if (outResult.Substring(0, 2) != "OK")
+            {
+                LogMessage(0, outResult);
+                return false;
+            }
+
+            string remoteFileName = Path.GetFileName(localFilePath);
+            string uri = $"{ftpFullPath}/{remoteFileName}";
+
+            try
+            {
+                var request = (FtpWebRequest)WebRequest.Create(uri);
+                request.Method = WebRequestMethods.Ftp.UploadFile;
+                request.Credentials = new NetworkCredential(username, password);
+                request.UsePassive = true;
+                request.UseBinary = true;
+                request.KeepAlive = false;
+
+                using (var fileStream = File.OpenRead(localFilePath))
+                using (var requestStream = request.GetRequestStream())
+                {
+                    byte[] buffer = new byte[4096];
+                    int bytesRead;
+                    while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) > 0)
+                    {
+                        requestStream.Write(buffer, 0, bytesRead);
+                    }
+                }
+
+                using (var response = (FtpWebResponse)request.GetResponse())
+                {
+                    LogMessage(1, $"文件: {localFilePath}上传成功,状态{response.StatusDescription}");
+                    return true;
+                }
+            }
+            catch (WebException ex)
+            {
+                if (ex.Response is FtpWebResponse response)
+                {
+                    LogMessage(0, $"NG,FTP 错误码: {(int)response.StatusCode} - {response.StatusDescription}");
+                }
+                else
+                {
+                    LogMessage(0, $"NG,Web异常: {ex.Message}");
+                }
+                return false;
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"NG,上传失败: {ex.Message}");
+                return false;
+            }
+        }
+
+        private string CreateFtpDirectoryIfNotExists(string ftpDirectoryPath, string username, string password)
+        {
+            try
+            {
+                FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftpDirectoryPath);
+                request.Method = WebRequestMethods.Ftp.MakeDirectory;
+                request.Credentials = new NetworkCredential(username, password);
+                request.UsePassive = true;
+                request.UseBinary = true;
+                request.KeepAlive = false;
+
+                using (FtpWebResponse response = (FtpWebResponse)request.GetResponse())
+                {
+                    response.Close();
+                    return "OK,目录创建成功: " + response.StatusDescription;
+                }
+            }
+            catch (WebException ex)
+            {
+                if (ex.Response is FtpWebResponse response && response.StatusCode == FtpStatusCode.ActionNotTakenFileUnavailable)
+                {
+                    return "OK,目录已存在: " + response.StatusDescription;
+                }
+                else
+                {
+                    return "NG,创建目录时发生错误: " + ex.Message;
+                }
+            }
+        }
+
+        private void Delete_Click(object sender, EventArgs e)
+        {
+            if (!Directory.Exists(txtPath.Text))
+            {
+                LogMessage(0, $"删除路径不存在: {txtPath.Text}");
+                return;
+            }
+            List<string> DeleteList = new List<string>() { };
+            if (!string.IsNullOrEmpty(SN1.Text)) DeleteList.Add("1-1_" + SN1.Text);
+            if (!string.IsNullOrEmpty(SN2.Text)) DeleteList.Add("1-2_" + SN2.Text);
+            if (!string.IsNullOrEmpty(SN3.Text)) DeleteList.Add("1-3_" + SN3.Text);
+            if (!string.IsNullOrEmpty(SN4.Text)) DeleteList.Add("2-1_" + SN4.Text);
+            if (!string.IsNullOrEmpty(SN5.Text)) DeleteList.Add("2-2_" + SN5.Text);
+            if (!string.IsNullOrEmpty(SN6.Text)) DeleteList.Add("2-3_" + SN6.Text);
+
+            string DeletePath;
+            int DeleteCount = 0;
+            foreach (var item in DeleteList)
+            {
+                DeletePath = Path.Combine(txtPath.Text, item);
+                if (DeletePath == txtPath.Text)
+                {
+                    LogMessage(0, $"NG,路径{DeletePath}中,没有 {item} 文件夹");
+                    continue;
+                }
+                if (Directory.Exists(DeletePath))
+                {
+                    try
+                    {
+                        Directory.Delete(DeletePath);
+                    }
+                    catch (IOException ex)
+                    {
+                        LogMessage(0, $"NG,文件夹{item}存有文件,{ex.Message}");
+                        continue;
+                    }
+                    catch (Exception ex)
+                    {
+                        LogMessage(0, $"NG,删除异常,{ex.Message}");
+                        continue;
+                    }
+                    DeleteCount++;
+
+                    if (SN1.Text == item) SN1.Text = "";
+                    if (SN2.Text == item) SN2.Text = "";
+                    if (SN3.Text == item) SN3.Text = "";
+                    if (SN4.Text == item) SN4.Text = "";
+                    if (SN5.Text == item) SN5.Text = "";
+                    if (SN6.Text == item) SN6.Text = "";
+                }
+            }
+            if(DeleteCount != 0)
+            {
+                LogMessage(0, $"一键删除文件夹成功,共 {DeleteCount}个");
+                return;
+            }
+            else
+            {
+                LogMessage(0, $"NG,请扫描SN序列号删除文件夹");
+            }
+        }
+
+        private void Clear_Click(object sender, EventArgs e)
+        {
+            SN1.Text = "";
+            SN2.Text = "";
+            SN3.Text = "";
+            SN4.Text = "";
+            SN5.Text = "";
+            SN6.Text = "";
+            SN1.Focus();
+            SN1.SelectAll();
+        }
+
+        private void Generate_Click(object sender, EventArgs e)
+        {
+            if (!Directory.Exists(txtPath.Text))
+            {
+                LogMessage(0, $"NG,生成路径不存在: {txtPath.Text}");
+                return;
+            }
+
+            List<string> GenerateList = new List<string>() { };
+            if (!string.IsNullOrEmpty(SN1.Text)) GenerateList.Add("1-1_" + SN1.Text);
+            if (!string.IsNullOrEmpty(SN2.Text)) GenerateList.Add("1-2_" + SN2.Text);
+            if (!string.IsNullOrEmpty(SN3.Text)) GenerateList.Add("1-3_" + SN3.Text);
+            if (!string.IsNullOrEmpty(SN4.Text)) GenerateList.Add("2-1_" + SN4.Text);
+            if (!string.IsNullOrEmpty(SN5.Text)) GenerateList.Add("2-2_" + SN5.Text);
+            if (!string.IsNullOrEmpty(SN6.Text)) GenerateList.Add("2-3_" + SN6.Text);
+
+            string GeneratePath;
+            int GenerateCount = 0;
+            foreach (var item in GenerateList)
+            {
+                GeneratePath = Path.Combine(txtPath.Text, item);
+                if (GeneratePath == txtPath.Text)
+                {
+                    LogMessage(0, $"NG,请扫描SN序列号创建文件夹");
+                    continue;
+                }
+                if (Directory.Exists(GeneratePath))
+                {
+                    LogMessage(0, $"NG,路径{txtPath.Text}已有{item}文件夹");
+                    continue;
+                }
+                Directory.CreateDirectory(GeneratePath);
+                GenerateCount++;
+            }
+            if(GenerateCount != 0) LogMessage(0, $"一键生成文件夹成功,共 {GenerateCount}个");
+        }
+
+        private void SN1_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+
+            if (string.IsNullOrEmpty(SN1.Text)) return;
+
+            SN2.Focus();
+            SN2.SelectAll();
+        }
+
+        private void SN2_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+
+            if (string.IsNullOrEmpty(SN2.Text)) return;
+
+            SN3.Focus();
+            SN3.SelectAll();
+        }
+
+        private void SN3_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+
+            if (string.IsNullOrEmpty(SN3.Text)) return;
+
+            SN4.Focus();
+            SN4.SelectAll();
+        }
+
+        private void SN4_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+
+            if (string.IsNullOrEmpty(SN4.Text)) return;
+
+            SN5.Focus();
+            SN5.SelectAll();
+        }
+
+        private void SN5_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+
+            if (string.IsNullOrEmpty(SN5.Text)) return;
+
+            SN6.Focus();
+            SN6.SelectAll();
+        }
+
+        private void SN6_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+
+            if (string.IsNullOrEmpty(SN6.Text)) return;
+
+            Generate.Focus();
+        }
+
+        public string CheckFileAccess(string filePath)
+        {
+            try
+            {
+                using (FileStream fileStream = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.None))
+                {
+                    return "OK";
+                }
+            }
+            catch (IOException ex)
+            {
+                return "NG,文件被占用: " + ex.Message;
+            }
+            catch (UnauthorizedAccessException ex)
+            {
+                return "NG,权限不足,无法访问文件: " + ex.Message;
+            }
+            catch (Exception ex)
+            {
+                return "NG," + ex.Message;
+            }
+        }
+        public string CheckFolderPermissions(string path)
+        {
+            try
+            {
+                DirectorySecurity security = Directory.GetAccessControl(path);
+                AuthorizationRuleCollection rules = security.GetAccessRules(true, true, typeof(NTAccount));
+
+                WindowsIdentity currentUser = WindowsIdentity.GetCurrent();
+
+                foreach (FileSystemAccessRule rule in rules)
+                {
+                    if (rule.IdentityReference.Value == currentUser.Name || currentUser.Groups.Contains(rule.IdentityReference))
+                    {
+                        Console.WriteLine($" {rule.IdentityReference.Value}");
+                        Console.WriteLine($"权限类型: {rule.AccessControlType}");
+                        Console.WriteLine($"具体权限: {rule.FileSystemRights}");
+                        Console.WriteLine($"是否继承: {rule.IsInherited}");
+
+                    }
+                }
+                return "OK";
+            }
+            catch (UnauthorizedAccessException ex)
+            {
+                return $"NG,无权限访问文件夹: {ex.Message}";
+            }
+            catch (DirectoryNotFoundException)
+            {
+                return "NG,文件夹不存在";
+            }
+            catch (Exception ex)
+            {
+                return "NG," + ex.Message;
+            }
+        }
+        public class Log
+        {
+            public string SN { set; get; }
+            public string Result { set; get; }
+            public string TestTime { set; get; }
+            public string Side { set; get; }
+            public List<LogItem> LogItemList { set; get; } = new List<LogItem>();
+        }
+
+        public class LogItem
+        {
+            public string Location { set; get; }
+            public string ReelNo { set; get; }
+            public string FirstType { set; get; }
+            public string SceondType { set; get; }
+            public string Name { set; get; }
+        }
+    }
+}

+ 126 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_ParseLog.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="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>224, 17</value>
+  </metadata>
+</root>

+ 49 - 0
UAS_MES_YTDZ/UAS_MES_YTDZ.csproj

@@ -32,6 +32,8 @@
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
     <PublishWizardCompleted>true</PublishWizardCompleted>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>x86</PlatformTarget>
@@ -142,6 +144,9 @@
       <EmbedInteropTypes>False</EmbedInteropTypes>
       <HintPath>Tool\Interop.SpeechLib.dll</HintPath>
     </Reference>
+    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.8, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Bcl.AsyncInterfaces.10.0.8\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+    </Reference>
     <Reference Include="NPOI, Version=1.2.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\NPOI.dll</HintPath>
@@ -153,10 +158,28 @@
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
+    <Reference Include="System.IO.Pipelines, Version=10.0.0.8, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.IO.Pipelines.10.0.8\lib\net462\System.IO.Pipelines.dll</HintPath>
+    </Reference>
     <Reference Include="System.Management" />
+    <Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net.Http" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.ServiceModel" />
+    <Reference Include="System.Text.Encodings.Web, Version=10.0.0.8, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Text.Encodings.Web.10.0.8\lib\net462\System.Text.Encodings.Web.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Json, Version=10.0.0.8, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Text.Json.10.0.8\lib\net462\System.Text.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple" />
     <Reference Include="System.Web" />
+    <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Web.Services" />
     <Reference Include="System.Windows.Forms.DataVisualization" />
     <Reference Include="System.Xml.Linq" />
@@ -556,12 +579,24 @@
     <Compile Include="FunctionCode\Make\Make_FeedingCollectionCombine.Designer.cs">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_Humiture.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_Humiture.Designer.cs">
+      <DependentUpon>Make_Humiture.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_NewPo.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="FunctionCode\Make\Make_NewPo.Designer.cs">
       <DependentUpon>Make_NewPo.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_ParseLog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ParseLog.Designer.cs">
+      <DependentUpon>Make_ParseLog.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_PreFeedingCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1319,9 +1354,15 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_FeedingCollectionCombine.resx">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_Humiture.resx">
+      <DependentUpon>Make_Humiture.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_NewPo.resx">
       <DependentUpon>Make_NewPo.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ParseLog.resx">
+      <DependentUpon>Make_ParseLog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PreFeedingCollection.resx">
       <DependentUpon>Make_PreFeedingCollection.cs</DependentUpon>
     </EmbeddedResource>
@@ -1612,6 +1653,7 @@
     <None Include="App.config">
       <SubType>Designer</SubType>
     </None>
+    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings1.Designer.cs</LastGenOutput>
@@ -1814,4 +1856,11 @@
   <Target Name="AfterBuild">
   </Target>
   -->
+  <Import Project="packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets" Condition="Exists('packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets'))" />
+  </Target>
 </Project>

+ 14 - 0
UAS_MES_YTDZ/packages.config

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.8" targetFramework="net48" />
+  <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
+  <package id="System.Buffers" version="4.6.1" targetFramework="net48" />
+  <package id="System.IO.Pipelines" version="10.0.8" targetFramework="net48" />
+  <package id="System.Memory" version="4.6.3" targetFramework="net48" />
+  <package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
+  <package id="System.Text.Encodings.Web" version="10.0.8" targetFramework="net48" />
+  <package id="System.Text.Json" version="10.0.8" targetFramework="net48" />
+  <package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
+  <package id="System.ValueTuple" version="4.6.2" targetFramework="net48" />
+</packages>