DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
@@ -134,12 +134,10 @@ //string hostname = Environment.MachineName; object value = plcService.ReadValuePoint(_dataCaptureConfig.DbNumber, _dataCaptureConfig.Offset, PLCManger.GetTypeForString(_dataCaptureConfig.DataCaptureColumnType)); if (value_01.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) {//当上一标记位0,当前获取标记为1时, //触发操作, 并给静态变量赋值为1 //业务代码 threadStatusMonitor.Threadlastmodifytime = DateTime.Now; WorkPieceLog wplog = new WorkPieceLog(); WorkPieceLog wplog = null; if (value.ToString().ToUpper().Equals("TRUE")) { wplog = new WorkPieceLog(); wplog.Id = Yitter.IdGenerator.YitIdHelper.NextId(); wplog.WorkingProcedure = WorkingProcedure; wplog.EquipmentID = _dataCaptureConfig.EquipmentID; ; @@ -176,6 +174,13 @@ MonitorHelper.MonitorTestForOP3501(_dataCaptureConfig, value, colConfig, wplog); //监控上线 MonitorHelper.MonitorTestForLine(_dataCaptureConfig, value, colConfig, wplog.WorkPieceID); } if (value_01.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) {//当上一标记位0,当前获取标记为1时, //触发操作, 并给静态变量赋值为1 //业务代码 threadStatusMonitor.Threadlastmodifytime = DateTime.Now; //特殊处理OP50 【Editby shaocx,2024-08-16】 string sideValue = GetSideForOP50(plcService, wplog); DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs
@@ -1,5 +1,6 @@ using iWare_SCADA_Model; using log4net; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -69,6 +70,26 @@ Log4NetHelper.WriteInfoLog(_LogType, str); //不正常的码写入数据库 var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(workPieceID); if (isRight == false) { WorkPieceLog workPieceLog = new WorkPieceLog() { Id = Yitter.IdGenerator.YitIdHelper.NextId(), WorkPieceID = workPieceID, WorkingProcedure = _dataCaptureConfig.WorkingProcedure, CreatedTime = DateTime.Now, CreatedUserName = _dataCaptureConfig.DataCapturePointCode, MyRemarks = "读码值异常", Remarks = "读码值异常" }; using (DbModel db = new DbModel()) { db.WorkPieceLog.Add(workPieceLog); db.SaveChanges(); } } } catch (Exception ex) { DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceLog.cs
@@ -117,6 +117,10 @@ [StringLength(255)] public string Remarks { get; set; } [StringLength(255)] public string MyRemarks { get; set; } public DateTimeOffset? CreatedTime { get; set; } public DateTimeOffset? UpdatedTime { get; set; }