| | |
| | | |
| | | using iWare_SCADA_Model; |
| | | using log4net; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | Log4NetHelper.WriteInfoLog(_LogType, str); |
| | | |
| | | //不正常的码写入数据库 |
| | | var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(workPieceID); |
| | | if (isRight == false) |
| | | { |
| | | WorkPieceLog workPieceLog = new WorkPieceLog() |
| | | { |
| | | Id = Yitter.IdGenerator.YitIdHelper.NextId(), |
| | | WorkPieceID = workPieceID, |
| | | WorkingProcedure = _dataCaptureConfig.WorkingProcedure, |
| | | CreatedTime = DateTime.Now, |
| | | CreatedUserName = _dataCaptureConfig.DataCapturePointCode, |
| | | MyRemarks = "读码值异常", |
| | | Remarks = "读码值异常" |
| | | }; |
| | | using (DbModel db = new DbModel()) |
| | | { |
| | | db.WorkPieceLog.Add(workPieceLog); |
| | | db.SaveChanges(); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |