From e4f89a92209ebca77240edaa3b78f66eb6e4b3d5 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 06 9月 2024 08:58:43 +0800
Subject: [PATCH] 修复为null的问题

---
 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_OP6002.cs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_OP6002.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_OP6002.cs
index 62fc0f9..16631df 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_OP6002.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_OP6002.cs
@@ -98,8 +98,9 @@
                                 wplog.EquipmentID = _dataCaptureConfig.EquipmentID; ;
                                 wplog.Remarks = WorkingProcedure;
                                 wplog.MonitoringPoint = DataCapturePointCode;
+                                //wplog.CreatedUserName = DataCapturePointCode;
+                                SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, DataCapturePointCode, DataCapturePointCname);
                                 wplog.CreatedTime = DateTimeHelper.GetDateTime();
-                                wplog.CreatedUserName = DataCapturePointCode;
                                 wplog.UpdatedUserName = Environment.MachineName + "鑷姩" + Thread.CurrentThread.ManagedThreadId.ToString();
                                 wplog.UpdatedTime = DateTimeHelper.GetDateTime();
                                 wplog.IsDeleted = false;
@@ -116,30 +117,35 @@
                                 if (valuecola.ToString().ToUpper().Equals("TRUE"))
                                 {
                                     wplog.CreatedUserName = "OP6002AA";
+                                    SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.CreatedUserName, DataCapturePointCname);
                                     code = plcService.ReadValuePointV2("DB2050.52.0", typeof(string), 22)?.ToString();
                                     quality = plcService.ReadValuePointV2("DB2050.6.0", typeof(string), 2)?.ToString();
                                 }
                                 else if (valuecolb.ToString().ToUpper().Equals("TRUE"))
                                 {
                                     wplog.CreatedUserName = "OP6002BB";
+                                    SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.CreatedUserName, DataCapturePointCname);
                                     code = plcService.ReadValuePointV2("DB2050.76.0", typeof(string), 22)?.ToString();
                                     quality = plcService.ReadValuePointV2("DB2050.6.0", typeof(string), 2)?.ToString();
                                 }
                                 else if (valuecolc.ToString().ToUpper().Equals("TRUE"))
                                 {
                                     wplog.CreatedUserName = "OP6002CC";
+                                    SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.CreatedUserName, DataCapturePointCname);
                                     code = plcService.ReadValuePointV2("DB2050.100.0", typeof(string), 22)?.ToString();
                                     quality = plcService.ReadValuePointV2("DB2050.6.0", typeof(string), 2)?.ToString();
                                 }
                                 else if (valuecold.ToString().ToUpper().Equals("TRUE"))
                                 {
                                     wplog.CreatedUserName = "OP6002DD";
+                                    SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.CreatedUserName, DataCapturePointCname);
                                     code = plcService.ReadValuePointV2("DB2050.124.0", typeof(string), 22)?.ToString();
                                     quality = plcService.ReadValuePointV2("DB2050.6.0", typeof(string), 2)?.ToString();
                                 }
                                 else
                                 {
                                     wplog.CreatedUserName = "OP6002EE";
+                                    SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.CreatedUserName, DataCapturePointCname);
                                 }
 
                                 wplog.WorkPieceID = code;

--
Gitblit v1.9.3