From c34f8f93417c5a0125f9c55ba3d347411995ac13 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 10 9月 2024 15:05:32 +0800 Subject: [PATCH] 1 --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 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 8c7be60..5db4e79 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/MonitorHelper.cs @@ -1,4 +1,5 @@ 锘� +using iWare.Wms.Core; using iWare_SCADA_Model; using log4net; using Newtonsoft.Json; @@ -50,7 +51,7 @@ /// <summary> - /// 鐩戞帶涓婄嚎 + /// 鐩戞帶鐐逛綅 /// </summary> /// <param name="value"></param> /// <returns></returns> @@ -65,30 +66,34 @@ var str = ""; - str += $",涓婄嚎鑾峰彇浜岀淮鐮佸�� ,鍊兼槸{workPieceID}"; + str += $",鑾峰彇浜岀淮鐮佸�� ,鍊兼槸{workPieceID}"; //str += $",鏁翠綋瀵硅薄 wplog鏄瘂JsonConvert.SerializeObject(wplog)}"; Log4NetHelper.WriteInfoLog(_LogType, str); //涓嶆甯哥殑鐮佸啓鍏ユ暟鎹簱 var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(workPieceID); + PieceLogTypeEnum pieceLogTypeEnum = PieceLogTypeEnum.姝e父; 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(); - } + pieceLogTypeEnum = PieceLogTypeEnum.璇荤爜鍊煎紓甯�; + } + WorkPieceLog workPieceLog = new WorkPieceLog() + { + Id = Yitter.IdGenerator.YitIdHelper.NextId(), + WorkPieceID = workPieceID, + WorkingProcedure = _dataCaptureConfig.WorkingProcedure, + CreatedTime = DateTime.Now, + CreatedUserName = _dataCaptureConfig.DataCapturePointCode, + MyRemarks = "", + Remarks = pieceLogTypeEnum.ToString(), + PieceLogType = (int)pieceLogTypeEnum, + PieceLogTypeName = pieceLogTypeEnum.ToString() + }; + using (DbModel db = new DbModel()) + { + db.WorkPieceLog.Add(workPieceLog); + db.SaveChanges(); } } catch (Exception ex) -- Gitblit v1.9.3