using Aborlen.Model; using FrameWork.Log; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WorkStationBase; namespace Aborlen.WorkStation { public partial class WorkStation07 : StationBase { /// /// 扫描条码 /// /// /// /// public void BarCode(string stationCode, object value, DateTime triggerTime) { try { string barcode = value.ToString(); if (PresentOrder.vta_enable == 1) { if (barcode.Contains(PresentOrder.vta_rule)) { Barcode_Record = barcode; //写入扫描完成 Write(1080, (byte)1); View.Barcodes.Where(p => p.PartCodeRule == PresentOrder.vta_rule).First().PartCode = barcode; //向前端发送更改 SendMsg.SendMsgToStation(StationInfo.StationCode, "Barcodes", View.Barcodes); SendMsg.SendMsgToStation(StationInfo.StationCode, "AlarmMsg", ""); } else { SendMsg.SendMsgToStation(StationInfo.StationCode, "AlarmMsg", "扫描条码错误。"); } } } catch (Exception ex) { LogHelper.WriteLog(LogHelper.GetMethodInfo(), ex); } } } }