领胜LDS 键盘AOI检测项目
patrick.xu
2021-08-02 a383b2288dcfb90e9aa1dcf796e41d9c6be1e429
src/Bro.M071.Process/M071Process_MES.cs
@@ -9,6 +9,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Bro.M071.Process
{
@@ -229,7 +230,7 @@
                LogAsync(DateTime.Now, $"{pMeasure.Barcode}产品检测数据上传", JsonConvert.SerializeObject(paras));
            }
            string result = "-3";
            string result = "-1";
            int repeatTime = 3;
            do
@@ -245,7 +246,7 @@
                    repeatTime--;
                    Thread.Sleep(100); 
                    result = "-3";
                    result = "-1";
                }
            } while (repeatTime > 0);
@@ -254,6 +255,11 @@
            LogAsync(DateTime.Now, $"{barcode}产品检测数据上传,{result}|{mesReturn.ToString()}", $"耗时:{sw.ElapsedMilliseconds}ms");
            OnCheckHintUpload?.Invoke("检测数据" + mesReturn.ToString(), mesReturn != MESUploadReturn.上传成功);
            if (mesReturn != MESUploadReturn.上传成功)
            {
                MessageBox.Show($"{barcode}产品数据上传失败,{mesReturn.ToString()}\r\n请检查网络连接或确认问题后重新检测", "上传异常", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private string GetMESAlignmentData(ProductionMeasurement pMeasure)