From 4129099cc52eb307f76cda9dfc24c0c634f6cfc7 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 04 9月 2024 13:38:55 +0800
Subject: [PATCH] 111

---
 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