From 9242d0da6005e070b0197a26b12ba24d1361466d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 04 9月 2024 14:21:35 +0800
Subject: [PATCH] 修复
---
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs
index dcaed5a..cbd170b 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs
@@ -1,5 +1,7 @@
锘�
+using iWare.Wms.Core;
using iWare_SCADA_Model;
+using log4net;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -69,6 +71,28 @@
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 = "璇荤爜鍊煎紓甯�",
+ PieceLogType = (int)PieceLogTypeEnum.璇荤爜鍊煎紓甯�,
+ PieceLogTypeName = PieceLogTypeEnum.璇荤爜鍊煎紓甯�.ToString()
+ };
+ using (DbModel db = new DbModel())
+ {
+ db.WorkPieceLog.Add(workPieceLog);
+ db.SaveChanges();
+ }
+ }
}
catch (Exception ex)
{
--
Gitblit v1.9.3