| | |
| | | |
| | | 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; |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Web.UI.WebControls; |
| | | |
| | | namespace iWare_SCADA_BusinessLogical.BLL.Important |
| | | { |
| | |
| | | |
| | | 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); |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Web.UI.WebControls; |
| | | |
| | | namespace iWare_SCADA_BusinessLogical.BLL.Important |
| | | { |
| | |
| | | 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; |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Web.UI.WebControls; |
| | | |
| | | namespace iWare_SCADA_BusinessLogical.BLL.Important |
| | | { |
| | |
| | | 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; |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Web.UI.WebControls; |
| | | |
| | | namespace iWare_SCADA_BusinessLogical.BLL.Important |
| | | { |
| | |
| | | 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; |
| | |
| | | //特殊处理OP50 【Editby 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); |
| | | |
| | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | |
| | | { |
| | | |
| | | /// <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> |
| | |
| | | |
| | | process.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | process.CreatedUserName = _user; |
| | | process.JiaJuGongWei = ""; |
| | | process.DataCapturePointCname = "打码完成标记"; |
| | | process.CreatedTime = _time; |
| | | process.UpdatedUserName = _user; |
| | |
| | | |
| | | process.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | process.CreatedUserName = _user; |
| | | process.JiaJuGongWei = ""; |
| | | process.DataCapturePointCname = "工序完成标记"; |
| | | process.CreatedTime = _end_time; |
| | | process.UpdatedUserName = _user; |
| | |
| | | [MaxLength(255)] |
| | | public string PieceLogTypeName { get; set; } |
| | | |
| | | |
| | | public string JiaJuGongWei { get; set; } |
| | | |
| | | } |
| | | } |