WIN-GH9CEESPLTB\Administrator il y a 1 mois
Parent
commit
5085f6f8fd

+ 5 - 0
MainForm/ClassFile/ProjectClass/GlobalContext.cs

@@ -156,6 +156,7 @@ namespace MainForm
         public static bool IsSendCheckOneData;   // 启用上传点检
         public static bool IsSendWorkingData;    // 启用上传状态
         public static bool IsSendAlarmData;      // 启用上传报警
+        public static bool IsSendProcessDetail;    // 启用上传出战明细
         public static bool IsUseMESRoute;   // 启用边线MES软件
         public static bool MESIsConnect;  // MES是否正常连接
         public static string MESLaserLPath;   // 三点激光数据本地存放地址
@@ -328,6 +329,9 @@ namespace MainForm
                 s8_work_station = IniFile.INIGetStringValue(FilePath, "Station", "s8_work_station", "");  // [S4_5] ⼯站
                 s8_device_code = IniFile.INIGetStringValue(FilePath, "Station", "s8_device_code", "");    // [S4_5] 装备编码
                 s8_station = IniFile.INIGetStringValue(FilePath, "Station", "s8_station", "");            // [S4_5] ⼯位Id
+                s9_work_station = IniFile.INIGetStringValue(FilePath, "Station", "s9_work_station", "");  // [S4_5] ⼯站
+                s9_device_code = IniFile.INIGetStringValue(FilePath, "Station", "s9_device_code", "");    // [S4_5] 装备编码
+                s9_station = IniFile.INIGetStringValue(FilePath, "Station", "s9_station", "");            // [S4_5] ⼯位Id
                 // 设备
                 IsUsePLC1 = bool.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "IsUsePLC1", "false"));
                 IsUsePLC2 = bool.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "IsUsePLC2", "false"));
@@ -413,6 +417,7 @@ namespace MainForm
                 IsSendWorkingData = bool.Parse(IniFile.INIGetStringValue(FilePath, "MES", "IsSendWorkingData", ConstIsSend));
                 IsSendAlarmData = bool.Parse(IniFile.INIGetStringValue(FilePath, "MES", "IsSendAlarmData", ConstIsSend));
                 IsUseMESRoute = bool.Parse(IniFile.INIGetStringValue(FilePath, "MES", "IsUseMESRoute", ConstIsSend));
+                IsSendProcessDetail = bool.Parse(IniFile.INIGetStringValue(FilePath, "MES", "IsSendProcessDetail", ConstIsSend));
 
                 // MQTT
                 IsUseIot = bool.Parse(IniFile.INIGetStringValue(FilePath, "MQTT", "IsUseIot", "false"));

+ 0 - 1
MainForm/ClassFile/XiaomiAPI_MES/XiaomiMESHttp_UpLoadFile.cs

@@ -242,7 +242,6 @@ namespace MainForm.ClassFile.XiaomiAPI_MES
             mqttPayLoad.Add("tag", payload.tag);
             mqttPayLoad.Add("reference_info", Newtonsoft.Json.JsonConvert.SerializeObject(new object[] { new { pass_station_id = payload.pass_station_id } }));
 
-
             fileMetadata.Add("bucket", file.bucket);
             fileMetadata.Add("name", file.name);
             fileMetadata.Add("uuid", file.uuid);

+ 64 - 65
MainForm/FaForm/Form_Home.Designer.cs

@@ -30,12 +30,15 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form_Home));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
             this.panel1 = new System.Windows.Forms.Panel();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.state_r = new System.Windows.Forms.Label();
+            this.state_l = new System.Windows.Forms.Label();
+            this.lblDeviceStates2 = new Sunny.UI.UILabel();
             this.lblDeviceStates = new Sunny.UI.UILabel();
             this.txt_CurSupplierCode = new System.Windows.Forms.TextBox();
             this.label20 = new System.Windows.Forms.Label();
@@ -78,9 +81,6 @@
             this.colTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.imageListState = new System.Windows.Forms.ImageList(this.components);
-            this.lblDeviceStates2 = new Sunny.UI.UILabel();
-            this.label4 = new System.Windows.Forms.Label();
-            this.label5 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             this.groupBox3.SuspendLayout();
             this.panel2.SuspendLayout();
@@ -126,8 +126,8 @@
             // 
             // groupBox3
             // 
-            this.groupBox3.Controls.Add(this.label5);
-            this.groupBox3.Controls.Add(this.label4);
+            this.groupBox3.Controls.Add(this.state_r);
+            this.groupBox3.Controls.Add(this.state_l);
             this.groupBox3.Controls.Add(this.lblDeviceStates2);
             this.groupBox3.Controls.Add(this.lblDeviceStates);
             this.groupBox3.Controls.Add(this.txt_CurSupplierCode);
@@ -147,12 +147,44 @@
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "当前加工订单信息";
             // 
+            // state_r
+            // 
+            this.state_r.AutoSize = true;
+            this.state_r.Location = new System.Drawing.Point(1066, 123);
+            this.state_r.Name = "state_r";
+            this.state_r.Size = new System.Drawing.Size(123, 30);
+            this.state_r.TabIndex = 103;
+            this.state_r.Text = "设备状态:";
+            this.state_r.Visible = false;
+            // 
+            // state_l
+            // 
+            this.state_l.AutoSize = true;
+            this.state_l.Location = new System.Drawing.Point(1066, 61);
+            this.state_l.Name = "state_l";
+            this.state_l.Size = new System.Drawing.Size(123, 30);
+            this.state_l.TabIndex = 102;
+            this.state_l.Text = "设备状态:";
+            // 
+            // lblDeviceStates2
+            // 
+            this.lblDeviceStates2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.lblDeviceStates2.Font = new System.Drawing.Font("微软雅黑", 10.8F);
+            this.lblDeviceStates2.ForeColor = System.Drawing.Color.Blue;
+            this.lblDeviceStates2.Location = new System.Drawing.Point(1196, 115);
+            this.lblDeviceStates2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblDeviceStates2.Name = "lblDeviceStates2";
+            this.lblDeviceStates2.Size = new System.Drawing.Size(261, 50);
+            this.lblDeviceStates2.TabIndex = 101;
+            this.lblDeviceStates2.Text = "未初始状态";
+            this.lblDeviceStates2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
             // lblDeviceStates
             // 
             this.lblDeviceStates.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.lblDeviceStates.Font = new System.Drawing.Font("微软雅黑", 10.8F);
             this.lblDeviceStates.ForeColor = System.Drawing.Color.Blue;
-            this.lblDeviceStates.Location = new System.Drawing.Point(1196, 51);
+            this.lblDeviceStates.Location = new System.Drawing.Point(1196, 53);
             this.lblDeviceStates.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblDeviceStates.Name = "lblDeviceStates";
             this.lblDeviceStates.Size = new System.Drawing.Size(261, 50);
@@ -590,14 +622,14 @@
             this.systemLog.AllowUserToResizeRows = false;
             this.systemLog.BackgroundColor = System.Drawing.Color.White;
             this.systemLog.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.systemLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.systemLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
             this.systemLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.systemLog.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.colDate,
@@ -609,19 +641,19 @@
             this.systemLog.Location = new System.Drawing.Point(3, 32);
             this.systemLog.Name = "systemLog";
             this.systemLog.ReadOnly = true;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.systemLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
+            dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.systemLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle11;
             this.systemLog.RowHeadersVisible = false;
             this.systemLog.RowHeadersWidth = 51;
             this.systemLog.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.systemLog.RowsDefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.systemLog.RowsDefaultCellStyle = dataGridViewCellStyle12;
             this.systemLog.RowTemplate.Height = 27;
             this.systemLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.systemLog.Size = new System.Drawing.Size(1533, 435);
@@ -629,8 +661,8 @@
             // 
             // colDate
             // 
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.colDate.DefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.colDate.DefaultCellStyle = dataGridViewCellStyle10;
             this.colDate.HeaderText = "日期";
             this.colDate.MinimumWidth = 6;
             this.colDate.Name = "colDate";
@@ -664,39 +696,6 @@
             this.imageListState.Images.SetKeyName(1, "light_green.png");
             this.imageListState.Images.SetKeyName(2, "light_red.png");
             // 
-            // lblDeviceStates2
-            // 
-            this.lblDeviceStates2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.lblDeviceStates2.Font = new System.Drawing.Font("微软雅黑", 10.8F);
-            this.lblDeviceStates2.ForeColor = System.Drawing.Color.Blue;
-            this.lblDeviceStates2.Location = new System.Drawing.Point(1196, 113);
-            this.lblDeviceStates2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.lblDeviceStates2.Name = "lblDeviceStates2";
-            this.lblDeviceStates2.Size = new System.Drawing.Size(261, 50);
-            this.lblDeviceStates2.TabIndex = 101;
-            this.lblDeviceStates2.Text = "未初始状态";
-            this.lblDeviceStates2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(1066, 61);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(123, 30);
-            this.label4.TabIndex = 102;
-            this.label4.Text = "设备状态:";
-            this.label4.Visible = false;
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(1066, 123);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(123, 30);
-            this.label5.TabIndex = 103;
-            this.label5.Text = "设备状态:";
-            this.label5.Visible = false;
-            // 
             // Form_Home
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -796,8 +795,8 @@
         //private Sunny.UI.UILabel uiLabel3;
         private Sunny.UI.UILabel uiLabel1;
         private Sunny.UI.UILabel lblDeviceStates;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label state_r;
+        private System.Windows.Forms.Label state_l;
         private Sunny.UI.UILabel lblDeviceStates2;
     }
 }

+ 82 - 17
MainForm/FaForm/Form_Home.cs

@@ -46,6 +46,8 @@ using static MainForm.ClassFile.XiaomiAPI_MES.XiaomiMESHttp_UpLoadFile;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
 using System.Reflection;
 using static MainForm.ClassFile.XiaomiAPI_MES.XiaomiMESHttp_StationOutbound.XmMES_StationOutRequest_Body;
+using FaFrameUI;
+using System.Security.Policy;
 
 /*
  * 注:本源码对外提供,所以有些地方使用中文命名方法及变量
@@ -425,6 +427,29 @@ namespace MainForm
                            
                             param.parameter.other.logLevel = 0;
                             param.parameter.other.LogPath = GlobalContext.MqttLogDir;
+
+                            //测试
+                            //param.parameter.fds.address = "http://file-cm.be.mi.com/file/x5/file/upload/mqtt";
+                            //param.parameter.fds.appId = "Auto-Soft";
+                            //param.parameter.fds.appKey = "d11ec2b9-0e7a-4086-a80c-a1ec716e0896";
+                            //param.parameter.mes.address = "cm.pre.mi.com";
+                            //param.parameter.mes.appId = "MIUAT";
+                            //param.parameter.mes.appKey = "6B3D57E2-F062-471F-932B-76C8A79E0D66";
+                            //param.parameter.mqtt.address = "staging-cnbj2-rmq-mqtt.api.xiaomi.com";
+                            //param.parameter.mqtt.port = 80;
+                            //param.parameter.mqtt.username = "AKPKTSQAS46NKE4NHY";
+                            //param.parameter.mqtt.password = "Vfr/yyxVSkCVkHFjvD2rwb3ZOoUh+75KwnfWZX3N";
+                            //param.parameter.equipment.factoryCode = "1";
+                            //param.parameter.equipment.deviceCode = "C-MBA-ADDCU-A-BZJG-0001";
+                            //param.parameter.equipment.stationCode = "Y46-ADDCU-11";
+                            //param.parameter.equipment.project = "801";
+                            //param.parameter.equipment.productMode = "debug";
+                            //param.parameter.other.logLevel = 0;
+                            //param.parameter.other.runMode = "online";
+                            //param.parameter.other.uploadDigitalTwinData = "true";
+                            //param.parameter.other.LogPath = "D:/XiaomiMqttLog";
+                            //param.parameter.other.mqttEnableService = "true";
+
                             XiaomiMqttClient_Extend.ParameterConfig(param);
                         }
                         else
@@ -516,10 +541,10 @@ namespace MainForm
 
                     if (GlobalContext.IsUsePLC3 || GlobalContext.IsUsePLC7)
                     {
-                        uiLabel1.Text = "设备状态(左):";
-                        //uiLabel2.Text = "设备状态(右):";
-                        //uiLabel3.Visible = true;
-                        //uiLabel2.Visible = true;
+                        state_l.Text = "设备状态(左):";
+                        state_r.Text = "设备状态(右):";
+                        state_r.Visible = true;
+                        lblDeviceStates2.Visible = true;
                     }
 
                     AddMessage(LogType.Info, "程序初始化完成");
@@ -1664,15 +1689,17 @@ namespace MainForm
             string sql = processData.ToStringInsert(upload);
             string ret = SQLHelper_New.ExecuteNonQuery(sql, null);
             //AddMessage_Station(stationNameStr, LogType.Info, string.Concat("[[", equipmentCode, "]", stationNameStr, "]保存本地出站数据---" + ret));
-
+            string uuid = "";
             // 上传MES
             if (GlobalContext.IsSendProcessData)
             {
                 try
                 {
                     string id = processData.ID.Copy();
+                    uuid = Guid.NewGuid().ToString();
 
                     XmMES_StationOutRequest_Body outRequest_Body = new XmMES_StationOutRequest_Body();
+                    outRequest_Body.uuidInspection = uuid;
                     outRequest_Body.machineId = machineId; // 装备id(可配置) 
                     outRequest_Body.stationId = stationId; // ⼯位ID(可配置)  
                     outRequest_Body.clientMac = GlobalContext.MacStr; // 客⼾端本机MAC地址,格式:XX-XX-XX-XX-XX-XX
@@ -1685,6 +1712,7 @@ namespace MainForm
                     outRequest_Body.unitData.vehicleData.vehicleType = string.Empty;
                     outRequest_Body.unitData.vehicleData.slot = vehicleSlot;
 
+
                     if (!string.IsNullOrEmpty(partBarcode))
                     {
                         outRequest_Body.unitData.keyMaterial.Add(
@@ -1716,19 +1744,24 @@ namespace MainForm
                         }
                     }
                     //过站明细
-                    if (jsonParm.Length > 0)
+                    if (GlobalContext.IsSendProcessDetail)
                     {
-                        // 解析JSON字符串为字典
-                        var dictionary = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonParm);
-                        foreach (var kvp in dictionary) {
-                            outRequest_Body.unitData.processData.Add(
-                                new XmMES_StationOutRequest_Body.XmStationOut_ProcessData()
-                                {
-                                    dataName = kvp.Key.ToString(),
-                                    dataValue = kvp.Value.ToString()
-                                });
+                        if (jsonParm.Length > 0)
+                        {
+                            // 解析JSON字符串为字典
+                            var dictionary = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonParm);
+                            foreach (var kvp in dictionary)
+                            {
+                                outRequest_Body.unitData.processData.Add(
+                                    new XmMES_StationOutRequest_Body.XmStationOut_ProcessData()
+                                    {
+                                        dataName = kvp.Key.ToString(),
+                                        dataValue = kvp.Value.ToString()
+                                    });
+                            }
                         }
                     }
+                    
 
                     string jsonstr1 = JsonConvert.SerializeObject(outRequest_Body);
 
@@ -1785,6 +1818,34 @@ namespace MainForm
                 }
             }
 
+            if (GlobalContext.IsMqttSendProcessData)
+            {
+                PassStationDetailRequest request = new PassStationDetailRequest();
+                request.pass_station_id = uuid;
+                request.sn = sn;                      // 产品SN
+                request.slot = "";                  // 槽位编码
+                request.test_item_num = "1";
+                request.function_name = "Machine_加⼯模块";
+                request.status = "PASS";
+                (int, string) iotResult = (0, "");
+                if (jsonParm.Length > 0)
+                {
+                    // 解析JSON字符串为字典
+                    var dictionary = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonParm);
+                    foreach (var kvp in dictionary)
+                    {
+                        request.test_item= kvp.Key.ToString();
+                        request.result_val = kvp.Value.ToString();
+                        request.description = request.test_item;
+                        // 上传过站结果
+                        iotResult = XiaomiMqttClient_Extend.Write_PassStationDetail(request);
+                        if (iotResult.Item1 != 0)
+                        {
+                            OnMessage(LogType.Info, $"【IOT过站明细】上传失败!错误原因:{iotResult.Item2},过站明细;产品码[{sn}]  测试项目[{request.test_item}]  测试值[{request.result_val}]");
+                        }
+                    }
+                }
+            }
             return result;
         }
 
@@ -2199,8 +2260,12 @@ namespace MainForm
                         //bucket = "IMAGE/IMAGE/N3/debug/online/PASS/M0002PA-0001/P320N000006B/382f55e9-c2bb";
                         bucket = "/mesCommToPC/pic/left";
                         fileUpload_X5.bucket = bucket;
-                        fileUpload_X5.name = imageFile;
-                        fileUpload_X5.md5 = "";
+                        fileUpload_X5.name = filename;
+                        fileUpload_X5.uuid = guid.ToString();
+                        ///需要上传文件
+                        FileInfo file = new FileInfo(imageFile);
+                        string fileMd5Hex = GetMD5Hex(file);
+                        fileUpload_X5.md5 = fileMd5Hex;
                         fileUpload_X5.uploadCloud = true;
                         fileUpload_X5.informMqtt = true;
 

+ 1 - 1
MainForm/FaForm/Form_Home.resx

@@ -8367,7 +8367,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACQ
-        PgAAAk1TRnQBSQFMAgEBAwEAAdgBCAHYAQgBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
+        PgAAAk1TRnQBSQFMAgEBAwEAAeABCAHgAQgBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
         AwABIAMAAQEBAAEgBgABQP8A/wA8AAP5Af8DzgH/A6gB/wOLAf8DeAH/A3EB/wNxAf8DeAH/A4sB/wOo
         Af8DzwH/A/kB/1AAAfcB+wH3Af8BuwHgAbYB/wGGAcgBfAH/AV0BtQFQAf8BQgGpATMB/wE5AaUBKQH/
         ATkBpQEpAf8BQwGqATQB/wFdAbYBUAH/AYUByAF7Af8BvAHhAbcB/wH3AfsB9wH/UAAB9gH1AfsB/wGw

+ 6 - 4
MainForm/FaForm/Form_MESTest.cs

@@ -965,10 +965,12 @@ namespace MainForm.FaForm
 
         public LoadingForm()
         {
-            this.Text = "请稍等";
-            this.Width = 200;
-            this.Height = 100;
-            this.StartPosition = FormStartPosition.CenterScreen;
+            Text = "请稍候";
+            Size = new Size(200, 100);
+            StartPosition = FormStartPosition.CenterScreen;
+            FormBorderStyle = FormBorderStyle.FixedDialog;
+            ControlBox = false;
+            TopMost = true;
 
             label = new Label
             {