From dfbe7cb2992df2d4195b12026d1f9e0a7423460e Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 11 9月 2024 18:48:13 +0800
Subject: [PATCH] 增加 JiaJuGongWei
---
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/3_WorkingProcedureCompleteManager.cs | 2 ++
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/OP80QualityDataHandler.cs | 1 +
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/WorkPieceProcessHelper.cs | 2 ++
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs | 42 ++++++++++++++++++++++++++++++++++++++++++
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/1_ReadQRcodeManager.cs | 1 +
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceLog.cs | 3 +++
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/4_WorkPiecePushOffManager.cs | 2 ++
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/5_WorkPieceSPCPushOffManager.cs | 2 ++
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs | 1 +
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_02.cs | 2 +-
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/2_QualityInfoCompleteManager.cs | 2 ++
11 files changed, 59 insertions(+), 1 deletions(-)
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/1_ReadQRcodeManager.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/1_ReadQRcodeManager.cs
index a64e6ee..a34fd66 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/1_ReadQRcodeManager.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/1_ReadQRcodeManager.cs
@@ -145,6 +145,7 @@
new_process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
new_process.CreatedUserName = loginfo.MonitoringPoint;
+ new_process.JiaJuGongWei = loginfo.JiaJuGongWei;
new_process.DataCapturePointCname = loginfo.DataCapturePointCname;
new_process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
new_process.UpdatedUserName = loginfo.MonitoringPoint;
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/2_QualityInfoCompleteManager.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/2_QualityInfoCompleteManager.cs
index e299e6c..c391f66 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/2_QualityInfoCompleteManager.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/2_QualityInfoCompleteManager.cs
@@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Web.UI.WebControls;
namespace iWare_SCADA_BusinessLogical.BLL.Important
{
@@ -303,6 +304,7 @@
process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
process.CreatedUserName = WorkPieceInfoManager.ResetUpdatedUserName(logMiddle);
+ process.JiaJuGongWei = process.JiaJuGongWei;
process.DataCapturePointCname = logMiddle.DataCapturePointCname;
process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
process.UpdatedUserName = WorkPieceInfoManager.ResetUpdatedUserName(logMiddle);
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/3_WorkingProcedureCompleteManager.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/3_WorkingProcedureCompleteManager.cs
index 22446d0..99f8ee0 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/3_WorkingProcedureCompleteManager.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/3_WorkingProcedureCompleteManager.cs
@@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Web.UI.WebControls;
namespace iWare_SCADA_BusinessLogical.BLL.Important
{
@@ -204,6 +205,7 @@
add_process.QualityState = WorkPieceInfoManager.GetQualityStateValue(logMiddle.QualityState);
}
add_process.CreatedUserName = logMiddle.MonitoringPoint;
+ add_process.JiaJuGongWei = logMiddle.JiaJuGongWei;
add_process.DataCapturePointCname = logMiddle.DataCapturePointCname;
add_process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
add_process.UpdatedUserName = logMiddle.MonitoringPoint;
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/4_WorkPiecePushOffManager.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/4_WorkPiecePushOffManager.cs
index f10ab83..c79eb20 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/4_WorkPiecePushOffManager.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/4_WorkPiecePushOffManager.cs
@@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Web.UI.WebControls;
namespace iWare_SCADA_BusinessLogical.BLL.Important
{
@@ -124,6 +125,7 @@
add_process.QualityState = WorkPieceInfoManager.GetQualityStateValue(logMiddle.QualityState);
add_process.CreatedUserName = logMiddle.MonitoringPoint;
+ add_process.JiaJuGongWei = logMiddle.JiaJuGongWei;
add_process.DataCapturePointCname = logMiddle.DataCapturePointCname;
add_process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
add_process.UpdatedUserName = logMiddle.MonitoringPoint;
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/5_WorkPieceSPCPushOffManager.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/5_WorkPieceSPCPushOffManager.cs
index dad6360..5594eca 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/5_WorkPieceSPCPushOffManager.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/Important/5_WorkPieceSPCPushOffManager.cs
@@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Web.UI.WebControls;
namespace iWare_SCADA_BusinessLogical.BLL.Important
{
@@ -101,6 +102,7 @@
process.QualityState = (int)QualityStateEnum.Suspected;
process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
process.CreatedUserName = logMiddle.MonitoringPoint;
+ process.JiaJuGongWei = logMiddle.JiaJuGongWei;
process.DataCapturePointCname = logMiddle.DataCapturePointCname;
process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
process.UpdatedUserName = logMiddle.MonitoringPoint;
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
index 70f6736..551d455 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
@@ -198,6 +198,7 @@
//鐗规畩澶勭悊OP50 銆怑ditby shaocx,2024-08-16銆�
string sideValue = GetSideForOP50(plcService, wplog);
wplog.MonitoringPoint += sideValue;
+ wplog.JiaJuGongWei = SystemBussinessHelper.GetJiaJuGongWei(wplog.MonitoringPoint, wplog.WorkingProcedure);
//wplog.CreatedUserName = wplog.MonitoringPoint;
SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.MonitoringPoint, DataCapturePointCname);
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_02.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_02.cs
index fc64e9d..b0e3aa5 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_02.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_02.cs
@@ -504,7 +504,7 @@
SystemValue.OP20_Side_Value = sideValue;
}
logMiddle.MonitoringPoint += SystemValue.OP20_Side_Value;
- //logMiddle.JiaJuGongWei
+ logMiddle.JiaJuGongWei = SystemBussinessHelper.GetJiaJuGongWei(logMiddle.MonitoringPoint, logMiddle.WorkingProcedure);
//logMiddle.CreatedUserName = logMiddle.MonitoringPoint;
SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref logMiddle, logMiddle.MonitoringPoint, DataCapturePointCname);
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/OP80QualityDataHandler.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/OP80QualityDataHandler.cs
index 6c71323..b846ff4 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/OP80QualityDataHandler.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/OP80QualityDataHandler.cs
@@ -546,6 +546,7 @@
process.StartTime = DateTimeHelper.GetDateTime();
process.EndTime = file.LastWriteTime;
process.CreatedUserName = _DataCapturePointCode;
+ process.JiaJuGongWei = "";
process.DataCapturePointCname = DataCapturePointCname;
process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
process.UpdatedUserName = _DataCapturePointCode;
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs
index 57497b6..5117e74 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs
@@ -17,6 +17,48 @@
{
/// <summary>
+ /// 鑾峰彇澶瑰叿宸ヤ綅
+ /// </summary>
+ /// <param name="str"></param>
+ /// <param name="workingProcedure"></param>
+ /// <returns></returns>
+ public static string GetJiaJuGongWei(string str, string workingProcedure)
+ {
+ try
+ {
+ if (string.IsNullOrEmpty(str))
+ {
+ return "";
+ }
+
+ if (workingProcedure == "OP20")
+ {
+ if (str.Length == "OP2002C2".Length)
+ {
+ int length = str.Length;
+ string lastTwoCharacters = str.Substring(length - 2, 2);
+ return lastTwoCharacters;
+ }
+ }
+ else if (workingProcedure == "OP50")
+ {
+ if (str.Length == "OP5001A3".Length)
+ {
+ int length = str.Length;
+ string lastTwoCharacters = str.Substring(length - 2, 2);
+ return lastTwoCharacters;
+ }
+ }
+ }
+ catch (Exception)
+ {
+ return "";
+ }
+ return "";
+ }
+
+
+ /// <summary>
/// 妯℃嫙鏃堕棿锛堣繑鍥炵锛�
/// </summary>
/// <param name="workingProcedure"></param>
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/WorkPieceProcessHelper.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/WorkPieceProcessHelper.cs
index 7fb6455..9c9068c 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/WorkPieceProcessHelper.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/WorkPieceProcessHelper.cs
@@ -54,6 +54,7 @@
process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
process.CreatedUserName = _user;
+ process.JiaJuGongWei = "";
process.DataCapturePointCname = "鎵撶爜瀹屾垚鏍囪";
process.CreatedTime = _time;
process.UpdatedUserName = _user;
@@ -110,6 +111,7 @@
process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
process.CreatedUserName = _user;
+ process.JiaJuGongWei = "";
process.DataCapturePointCname = "宸ュ簭瀹屾垚鏍囪";
process.CreatedTime = _end_time;
process.UpdatedUserName = _user;
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceLog.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceLog.cs
index 2f700e8..eff2977 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceLog.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceLog.cs
@@ -166,5 +166,8 @@
[MaxLength(255)]
public string PieceLogTypeName { get; set; }
+
+ public string JiaJuGongWei { get; set; }
+
}
}
--
Gitblit v1.9.3