From c34f8f93417c5a0125f9c55ba3d347411995ac13 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 10 9月 2024 15:05:32 +0800 Subject: [PATCH] 1 --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs | 80 +++++++++++++++++++++------------------- 1 files changed, 42 insertions(+), 38 deletions(-) diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs index 3919573..2ffc05d 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs @@ -139,46 +139,50 @@ //鐩戞帶涓婄嚎 MonitorHelper.MonitorTestForLine(_dataCaptureConfig, value, colConfig, wplog.WorkPieceID); } - //if (wplog != null) - //{ - // var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(wplog.WorkPieceID); - // if (isRight) - // { - #region 涓氬姟澶勭悊 - - if (SystemValue.value_OP1003.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) - {//褰撲笂涓�鏍囪浣�0锛屽綋鍓嶈幏鍙栨爣璁颁负1鏃讹紝 - //瑙﹀彂鎿嶄綔, 骞剁粰闈欐�佸彉閲忚祴鍊间负1 - //涓氬姟浠g爜 - - if (wplog.WorkPieceID.Length != 22) - {//鑾峰彇鍒扮殑宸ヤ欢鍙峰紓甯� - Log4NetHelper.WriteErrorLog(PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), $" {DataCapturePointCode}宸ュ簭鐩戞帶璇荤爜鏍囪 璇诲彇宸ヤ欢鐮佹暟鎹椂寮傚父锛�"); - continue; - } - - //#region 宸ユ帶鏈鸿鍙栬川閲忎俊鎭� - - - ////鎵弿鍏变韩鐩綍骞跺皢鏂扮殑鏂囦欢鎵弿杩斿洖 - //var newFiles = FileHelper.DetectNewFilesCSV("", 10, DateTimeHelper.GetDateTime(), DateTimeHelper.GetDateTime()); - //foreach (System.IO.FileInfo file in newFiles) - //{ - // var datatable = CSVHelper.ReadCSV(file.FullName); - //} - - //#endregion - - - //鏇存柊WorkPieceInfo琛ㄤ互鍙婃彃鍏orkPieceLog琛ㄥ拰WorkPieceInfoLog琛� - QualityInfoCompleteManager.QualityInfoComplete(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); - threadStatusMonitor.Threadstatue = 1; + else + { + SystemValue.value_OP1003 = value.ToString(); } - SystemValue.value_OP1003 = value.ToString(); + if (wplog != null) + { + var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(wplog.WorkPieceID); + if (isRight) + { + #region 涓氬姟澶勭悊 - #endregion - // } - //} + if (SystemValue.value_OP1003.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) + {//褰撲笂涓�鏍囪浣�0锛屽綋鍓嶈幏鍙栨爣璁颁负1鏃讹紝 + //瑙﹀彂鎿嶄綔, 骞剁粰闈欐�佸彉閲忚祴鍊间负1 + //涓氬姟浠g爜 + + if (wplog.WorkPieceID.Length != 22) + {//鑾峰彇鍒扮殑宸ヤ欢鍙峰紓甯� + Log4NetHelper.WriteErrorLog(PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), $" {DataCapturePointCode}宸ュ簭鐩戞帶璇荤爜鏍囪 璇诲彇宸ヤ欢鐮佹暟鎹椂寮傚父锛�"); + continue; + } + + //#region 宸ユ帶鏈鸿鍙栬川閲忎俊鎭� + + + ////鎵弿鍏变韩鐩綍骞跺皢鏂扮殑鏂囦欢鎵弿杩斿洖 + //var newFiles = FileHelper.DetectNewFilesCSV("", 10, DateTimeHelper.GetDateTime(), DateTimeHelper.GetDateTime()); + //foreach (System.IO.FileInfo file in newFiles) + //{ + // var datatable = CSVHelper.ReadCSV(file.FullName); + //} + + //#endregion + + + //鏇存柊WorkPieceInfo琛ㄤ互鍙婃彃鍏orkPieceLog琛ㄥ拰WorkPieceInfoLog琛� + QualityInfoCompleteManager.QualityInfoComplete(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); + threadStatusMonitor.Threadstatue = 1; + } + SystemValue.value_OP1003 = value.ToString(); + + #endregion + } + } } SystemValue.lbl_Alert_OP1003 = $"abcdefg:{RandomHelper.GenerateRandomCode(4)}"; -- Gitblit v1.9.3