quanzhou
2025-10-21 745d1ce73a3b27d2a3507843c8060755a0c95765
src/Bro.M141.Process/M141Process_ImageCheck.cs
@@ -36,7 +36,7 @@
        ManualResetEvent set2 = new ManualResetEvent(false);
        public event Action<string> StartPrinter;
        [ProcessMethod("ImageCheck", "ImageCheckOperation", "通用图片检测操作", InvokeType.TestInvoke)]
        public ResponseMessage ImageCheckOperation(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
@@ -496,7 +496,6 @@
                Plc1.WriteSingleAddress(1526, mysqlhelper.GetS2Result(productList[0].SEQUENCE) ? 1 : 2, out _);
                LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"产品{string.Join(",", productList.Select(u => u.PID))}检测反馈{mysqlhelper.GetS2Result(productList[0].SEQUENCE)}");
            }
            else
            {
@@ -713,8 +712,8 @@
            ResponseMessage msg = new ResponseMessage();
            Plc2 = invokeDevice as PLCBase;
            string message = "";
            StartPrinter.Invoke(message);
            string message = "nothing";
            StartPrint(message);
            return msg;
        }
@@ -867,17 +866,20 @@
        private void UpdateProductResultAsync(ProductModel p)
        private void UpdateProductResultAsync(ProductModel p, string name)
        {
            UpdateProductResult(p, out bool isOK);
            _taskFactory.StartNew(() =>
            {
                _csvHead = p.GetCSVHead(ref _specHeadList, ref _positionList);
                CSVRecordAsync($"ProductRecord_{DateTime.Now.ToString("yyyyMMdd")}.csv", p.GetCSVData(_specHeadList, _positionList), _csvHead);
                //CSVRecordAsync($"ProductRecord_{DateTime.Now.ToString("yyyyMMdd")}.csv", p.GetCSVData(_specHeadList, _positionList), _csvHead);
                CSVRecordAsync(name, p.GetCSVData(_specHeadList, _positionList), _csvHead);
                //_manager_P_Product.UpdateProductResult(p.ID, p.PID, p.SN, p.Result);
            });
            //连续NG数据记录
            CheckContinuousNGAlarmAsync(p);
        }
@@ -989,6 +991,10 @@
    }
}