From f04d2a8fce3ffe25ea0b43ed16fd4f65a2574468 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 03 9月 2024 10:03:19 +0800 Subject: [PATCH] //修正:查询的工序是当前线程的工序,而不是当前数据的工序 【Editby shaocx,2024-09-03】 --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs | 93 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 93 insertions(+), 0 deletions(-) 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 25095eb..854b9bb 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs @@ -3,8 +3,10 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; using System.Text; using System.Threading.Tasks; +using System.Web.UI.WebControls; namespace iWare_SCADA_BusinessLogical.Utils { @@ -15,6 +17,97 @@ { /// <summary> + /// 鏍¢獙璇诲彇鐨勪簩缁寸爜鏄惁姝g‘ + /// </summary> + /// <param name="workPieceID"></param> + /// <returns></returns> + public static bool ValidateIsRightWorkPieceID(string workPieceID) + { + if (string.IsNullOrEmpty(workPieceID)) + { + return false; + } + if (workPieceID.Length == 22) + { + var n_workPieceID = workPieceID.Trim(); + if (n_workPieceID.Length == 22) + { + if (n_workPieceID.IndexOf("ERROR") > -1) + { + return false; + } + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } + + /// <summary> + /// 璁剧疆 WorkPieceInfo 鐨凞ataCapturePointCname + /// </summary> + /// <param name="workPieceLog"></param> + /// <param name="_DataCapturePointCode"></param> + /// <param name="_DataCapturePointName"></param> + public static void SetWorkPieceInfoMiddleForCreatedUserName(ref WorkPieceInfo workPiece, string _DataCapturePointName) + { + workPiece.DataCapturePointCname = _DataCapturePointName; + } + + /// <summary> + /// 璁剧疆 WorkPieceInfo 鐨刄pdateDataCapturePointCname + /// </summary> + /// <param name="workPieceLog"></param> + /// <param name="_DataCapturePointCode"></param> + /// <param name="_DataCapturePointName"></param> + public static void SetWorkPieceInfoMiddleForUpdateDataCapturePointCname(ref WorkPieceInfo workPiece, string _DataCapturePointName) + { + workPiece.UpdateDataCapturePointCname = _DataCapturePointName; + } + + /// <summary> + /// 璁剧疆WorkPieceLog 鐨勫垱寤轰汉 + /// </summary> + /// <param name="workPieceLog"></param> + /// <param name="_DataCapturePointCode"></param> + /// <param name="_DataCapturePointName"></param> + public static void SetWorkPieceLogMiddleForCreatedUserName(ref WorkPieceLogMiddle workPieceLog, string _DataCapturePointCode, string _DataCapturePointName) + { + workPieceLog.CreatedUserName = _DataCapturePointCode; + workPieceLog.DataCapturePointCname = _DataCapturePointName; + } + /// <summary> + /// 璁剧疆WorkPieceLog 鐨勫垱寤轰汉 + /// </summary> + /// <param name="workPieceLog"></param> + /// <param name="_DataCapturePointCode"></param> + /// <param name="_DataCapturePointName"></param> + public static void SetWorkPieceLogMiddleForCreatedUserName(ref WorkPieceLog workPieceLog, string _DataCapturePointCode, string _DataCapturePointName) + { + workPieceLog.CreatedUserName = _DataCapturePointCode; + workPieceLog.DataCapturePointCname = _DataCapturePointName; + } + + /// <summary> + /// 璁剧疆WorkPieceLog 鐨勬洿鏂颁汉 + /// </summary> + /// <param name="workPieceLog"></param> + /// <param name="_DataCapturePointCode"></param> + /// <param name="_DataCapturePointName"></param> + public static void SetWorkPieceLogMiddleForUpdatedUserName(ref WorkPieceLogMiddle workPieceLog, string _DataCapturePointCode, string _DataCapturePointName) + { + workPieceLog.UpdatedUserName = _DataCapturePointCode; + workPieceLog.UpdateDataCapturePointCname = _DataCapturePointName; + } + + + /// <summary> /// 鏄惁鍏佽淇敼WorkPieceState 涓篧IP /// </summary> /// <param name="info"></param> -- Gitblit v1.9.3