From a6aaad96f92dbf9c6ae2c81072509981cc97e6d7 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 03 12月 2025 11:38:45 +0800
Subject: [PATCH] 消警处理
---
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs | 81 +++++++++++++++++++++-------------------
1 files changed, 43 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 9b5d01b..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
@@ -1,4 +1,5 @@
锘縰sing iWare_SCADA_BusinessLogical.BLL;
+using iWare_SCADA_BusinessLogical.BLL.Important;
using iWare_SCADA_BusinessLogical.Utils;
using iWare_SCADA_Model;
using System;
@@ -138,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琛�
- WorkPieceInfoManager.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