From b27a2ba1ccbd8e2e7b61a700dde5f891ed6ae35d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 05 7月 2024 06:55:15 +0800
Subject: [PATCH] 233
---
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs
index 5d957e3..d277c64 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs
@@ -502,7 +502,7 @@
}
pieceInfo.WorkPieceinitOnlineTime = DateTimeHelper.GetDateTime();
pieceInfo.WorkingProcedurePlan = ConfigHelper.GetConfigString("WorkingProcedureAllStr") ?? "OP05OP10OP20OP30OP35OP40OP50OP60OP70OP80";
- pieceInfo.CreatedUserName = logMiddle.MonitoringPoint;
+ pieceInfo.CreatedUserName = ResetUpdatedUserName(logMiddle);
pieceInfo.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
pieceInfo.WorkingProcedureStartTime = DateTimeHelper.GetDateTime();//
pieceInfo.WorkingProcedureEndTime = null;
@@ -547,7 +547,7 @@
else
{//鏇存柊宸ヤ欢
equinfo.WorkPieceID = logMiddle.WorkPieceID;
- equinfo.UpdatedUserName = logMiddle.MonitoringPoint;
+ equinfo.UpdatedUserName = ResetUpdatedUserName(logMiddle);
equinfo.UpdatedTime = DateTime.Now;
equinfo.OnlineTime = DateTime.Now;
}
@@ -565,7 +565,7 @@
pieceInfo.QualityStateUpdateTime = logMiddle.UpdatedTime.Value.LocalDateTime;
pieceInfo.QualityStateUpdateMode = QualityStateUpdateMode.Auto.ToString();
pieceInfo.Remarks = pieceInfo.Remarks ?? "" + $"{logMiddle.WorkingProcedure}璐ㄩ噺妫�娴嬪畬鎴愪慨鏀�";
- pieceInfo.UpdatedUserName = logMiddle.MonitoringPoint;
+ pieceInfo.UpdatedUserName = ResetUpdatedUserName(logMiddle);
pieceInfo.UpdatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
if (!(pieceInfo.WorkingProcedureStartTime.HasValue && pieceInfo.WorkingProcedureStartTime > DateTime.Parse("1900/01/01")))
{//宸ュ簭寮�濮嬫椂闂存病鏈夊垯璧嬪��
@@ -727,9 +727,9 @@
SetQualityNoOk_WorkPieceProcess(logMiddle, ref process);
process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
- process.CreatedUserName = logMiddle.MonitoringPoint;
+ process.CreatedUserName = ResetUpdatedUserName(logMiddle);
process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
- process.UpdatedUserName = logMiddle.MonitoringPoint;
+ process.UpdatedUserName = ResetUpdatedUserName(logMiddle);
process.UpdatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
process.OperationType = OperationType.鐢熶骇.ToString();
process.QualityDataInfoID = qualityData.Id;
@@ -739,7 +739,7 @@
else
{//鍏朵粬鐨勯兘鍙槸淇敼
pro.QualityDataInfoID = qualityData.Id;
- pro.UpdatedUserName = logMiddle.MonitoringPoint;
+ pro.UpdatedUserName = ResetUpdatedUserName(logMiddle);
pro.UpdatedTime = DateTimeHelper.GetDateTime();
pro.QualityState = pieceInfo.QualityState.HasValue ? pieceInfo.QualityState.Value : 9;
//璧嬪�间笉鍚堟牸鍘熷洜
@@ -748,7 +748,7 @@
//TODO:鍒ゆ柇濡傛灉鏄�60宸ュ簭锛岄偅涔堝氨瑕佹洿鏂皃ro琛ㄧ殑鍒涘缓浜轰负loginfo.MonitoringPoint 銆怑ditby shaocx,2024-06-05銆�
if (logMiddle.WorkingProcedure == "OP60")
{
- pro.CreatedUserName = logMiddle.MonitoringPoint;
+ pro.CreatedUserName = ResetUpdatedUserName(logMiddle);
}
}
@@ -791,6 +791,21 @@
}
}
}
+
+ /// <summary>
+ /// 璧嬪�� 淇敼浜� 銆怑ditby shaocx,2024-07-05銆�
+ /// </summary>
+ /// <param name="logMiddle"></param>
+ /// <returns></returns>
+ public static string ResetUpdatedUserName(WorkPieceLogMiddle logMiddle)
+ {
+ if (logMiddle.MonitoringPoint.Equals("OP1003"))
+ {//鍥犱负OP10鍜孫P40鏄竴鍙版満鍣紝OP1003涓撻棬鏄疧P40娴嬮噺鐨勩��
+ return "OP4003";
+ }
+ return logMiddle.MonitoringPoint;
+ }
+
/// <summary>
/// 宸ヤ欢鎺ㄥ嚭NOOK
/// </summary>
--
Gitblit v1.9.3