From a19d2fd7d9f52f7daa15b32d434cb86fa7ffb30b Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 09 9月 2024 14:38:34 +0800
Subject: [PATCH] 去掉不用的代码

---
 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
index ea0b238..b333b43 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.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 iWare_SCADA_Model.MiddleModel;
@@ -106,7 +107,7 @@
                     //plcService.Close();
                     //plcService.OpenService();
                 }
-                string value_01 = "";
+                string value_01 = "";//娉ㄦ剰锛氶粯璁ゆ槸FALSE 銆怑ditby shaocx,2024-09-05銆�
                 while (true)
                 {
                     threadStatusMonitor.ErrorMsg = "";
@@ -135,7 +136,9 @@
 
                             object value = plcService.ReadValuePoint(_dataCaptureConfig.DbNumber, _dataCaptureConfig.Offset, PLCManger.GetTypeForString(_dataCaptureConfig.DataCaptureColumnType));
                             WorkPieceLog wplog = null;
-                            if (value.ToString().ToUpper().Equals("TRUE"))
+
+                            var value_bool = value.ToString().ToUpper().Equals("TRUE");
+                            if (value_bool)
                             {
                                 wplog = new WorkPieceLog();
                                 wplog.Id = Yitter.IdGenerator.YitIdHelper.NextId();
@@ -175,6 +178,12 @@
                                 //鐩戞帶涓婄嚎
                                 MonitorHelper.MonitorTestForLine(_dataCaptureConfig, value, colConfig, wplog.WorkPieceID);
                             }
+                            //if (wplog != null)
+                            //{
+                            //    var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(wplog.WorkPieceID);
+                            //    if (isRight)
+                            //    {
+                            #region 澶勭悊涓氬姟
 
                             if (value_01.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE"))
                             {//褰撲笂涓�鏍囪浣�0锛屽綋鍓嶈幏鍙栨爣璁颁负1鏃讹紝
@@ -189,19 +198,22 @@
                                 SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.MonitoringPoint, DataCapturePointCname);
 
                                 //璇诲彇浜岀淮鐮佸悗鏇存柊鏁版嵁搴�
-                                WorkPieceInfoManager.ReadQRcode(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), plcService, _dataCaptureConfig.IsFeedback);
+                                ReadQRcodeManager.ReadQRcode(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), plcService, _dataCaptureConfig.IsFeedback);
 
                                 threadStatusMonitor.Threadstatue = 1;
 
                             }
                             value_01 = value.ToString();
 
+                            #endregion
+                            //    }
+                            //}
                         }
                         threadStatusMonitor.Remarks = $"abcdefg:{RandomHelper.GenerateRandomCode(4)}";
                         if (!_dataCaptureConfig.DataCaptureFrequency.HasValue || _dataCaptureConfig.DataCaptureFrequency < 10)
                         {
-                            threadStatusMonitor.ThreadFrequency = 1000;
-                            Thread.Sleep(1000);
+                            threadStatusMonitor.ThreadFrequency = 700;
+                            Thread.Sleep(700);
                         }
                         else
                         {

--
Gitblit v1.9.3