|
|
@@ -81,33 +81,35 @@ namespace HKCardOUT.ViewModels |
|
|
|
sb2.Append((!Main.GetInstance.GetIsConnect(3) ? "3号未连接" : (Main.GetInstance.GetIsSwipe(3) ? "3号正常" : "3号异常")) + "\r"); |
|
|
|
RAdinfo.Msg = sb2.ToString(); |
|
|
|
|
|
|
|
DataBus.saleLogDtos.TryDequeue(out SaleLogDto info); |
|
|
|
ScreenInfoDto data = new ScreenInfoDto |
|
|
|
if (DataBus.saleLogDtos.Count > 0) |
|
|
|
{ |
|
|
|
CardNo = info.CardNo, |
|
|
|
UserName = "", |
|
|
|
Location = info.Location, |
|
|
|
}; |
|
|
|
data.UserName = DataBus.UserListDto |
|
|
|
.Where(t => t.Cards.Select(x => x.CardNum).Contains(data.CardNo)) |
|
|
|
.Select(x => x.Name).FirstOrDefault(); |
|
|
|
|
|
|
|
App.Current.Dispatcher.Invoke(() => |
|
|
|
{ |
|
|
|
if (LAdInfo.Info != null && !string.IsNullOrEmpty(LAdInfo.Info.UserName)) |
|
|
|
{ |
|
|
|
LAdInfo.AInfo.Insert(0, LAdInfo.Info); |
|
|
|
LAdInfo.Info.Time = DateTime.Now.ToString("HH:mm:ss"); |
|
|
|
} |
|
|
|
if (RAdinfo.Info != null && !string.IsNullOrEmpty(RAdinfo.Info.UserName)) |
|
|
|
DataBus.saleLogDtos.TryDequeue(out SaleLogDto info); |
|
|
|
ScreenInfoDto data = new ScreenInfoDto |
|
|
|
{ |
|
|
|
RAdinfo.AInfo.Insert(0, RAdinfo.Info); |
|
|
|
RAdinfo.Info.Time = DateTime.Now.ToString("HH:mm:ss"); |
|
|
|
} |
|
|
|
}); |
|
|
|
LAdInfo.Info = data.Location == "4"||data.Location=="5"||data.Location=="6" ? data : new ScreenInfoDto(); |
|
|
|
RAdinfo.Info = data.Location == "1" || data.Location == "2" || data.Location == "3" ? data : new ScreenInfoDto(); |
|
|
|
CardNo = info.CardNo, |
|
|
|
UserName = "", |
|
|
|
Location = info.Location, |
|
|
|
}; |
|
|
|
data.UserName = DataBus.UserListDto |
|
|
|
.Where(t => t.Cards.Select(x => x.CardNum).Contains(data.CardNo)) |
|
|
|
.Select(x => x.Name).FirstOrDefault(); |
|
|
|
|
|
|
|
App.Current.Dispatcher.Invoke(() => |
|
|
|
{ |
|
|
|
if (LAdInfo.Info != null && !string.IsNullOrEmpty(LAdInfo.Info.UserName)) |
|
|
|
{ |
|
|
|
LAdInfo.AInfo.Insert(0, LAdInfo.Info); |
|
|
|
LAdInfo.Info.Time = DateTime.Now.ToString("HH:mm:ss"); |
|
|
|
} |
|
|
|
if (RAdinfo.Info != null && !string.IsNullOrEmpty(RAdinfo.Info.UserName)) |
|
|
|
{ |
|
|
|
RAdinfo.AInfo.Insert(0, RAdinfo.Info); |
|
|
|
RAdinfo.Info.Time = DateTime.Now.ToString("HH:mm:ss"); |
|
|
|
} |
|
|
|
}); |
|
|
|
LAdInfo.Info = data.Location == "4" || data.Location == "5" || data.Location == "6" ? data : new ScreenInfoDto(); |
|
|
|
RAdinfo.Info = data.Location == "1" || data.Location == "2" || data.Location == "3" ? data : new ScreenInfoDto(); |
|
|
|
} |
|
|
|
Thread.Sleep(10); |
|
|
|
}, $"屏幕刷卡信息", true); |
|
|
|
} |
|
|
|